1#! /bin/sh
2# From configure.in Id: configure.in.
3# Guess values for system-dependent variables and create Makefiles.
4# Generated by GNU Autoconf 2.61 for tcldomxml 2.6.
5#
6# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
7# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
8# This configure script is free software; the Free Software Foundation
9# gives unlimited permission to copy, distribute and modify it.
10## --------------------- ##
11## M4sh Initialization.  ##
12## --------------------- ##
13
14# Be more Bourne compatible
15DUALCASE=1; export DUALCASE # for MKS sh
16if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17  emulate sh
18  NULLCMD=:
19  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
20  # is contrary to our usage.  Disable this feature.
21  alias -g '${1+"$@"}'='"$@"'
22  setopt NO_GLOB_SUBST
23else
24  case `(set -o) 2>/dev/null` in
25  *posix*) set -o posix ;;
26esac
27
28fi
29
30
31
32
33# PATH needs CR
34# Avoid depending upon Character Ranges.
35as_cr_letters='abcdefghijklmnopqrstuvwxyz'
36as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
37as_cr_Letters=$as_cr_letters$as_cr_LETTERS
38as_cr_digits='0123456789'
39as_cr_alnum=$as_cr_Letters$as_cr_digits
40
41# The user is always right.
42if test "${PATH_SEPARATOR+set}" != set; then
43  echo "#! /bin/sh" >conf$$.sh
44  echo  "exit 0"   >>conf$$.sh
45  chmod +x conf$$.sh
46  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
47    PATH_SEPARATOR=';'
48  else
49    PATH_SEPARATOR=:
50  fi
51  rm -f conf$$.sh
52fi
53
54# Support unset when possible.
55if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
56  as_unset=unset
57else
58  as_unset=false
59fi
60
61
62# IFS
63# We need space, tab and new line, in precisely that order.  Quoting is
64# there to prevent editors from complaining about space-tab.
65# (If _AS_PATH_WALK were called with IFS unset, it would disable word
66# splitting by setting IFS to empty value.)
67as_nl='
68'
69IFS=" ""	$as_nl"
70
71# Find who we are.  Look in the path if we contain no directory separator.
72case $0 in
73  *[\\/]* ) as_myself=$0 ;;
74  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
75for as_dir in $PATH
76do
77  IFS=$as_save_IFS
78  test -z "$as_dir" && as_dir=.
79  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
80done
81IFS=$as_save_IFS
82
83     ;;
84esac
85# We did not find ourselves, most probably we were run as `sh COMMAND'
86# in which case we are not to be found in the path.
87if test "x$as_myself" = x; then
88  as_myself=$0
89fi
90if test ! -f "$as_myself"; then
91  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
92  { (exit 1); exit 1; }
93fi
94
95# Work around bugs in pre-3.0 UWIN ksh.
96for as_var in ENV MAIL MAILPATH
97do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
98done
99PS1='$ '
100PS2='> '
101PS4='+ '
102
103# NLS nuisances.
104for as_var in \
105  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
106  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
107  LC_TELEPHONE LC_TIME
108do
109  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
110    eval $as_var=C; export $as_var
111  else
112    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
113  fi
114done
115
116# Required to use basename.
117if expr a : '\(a\)' >/dev/null 2>&1 &&
118   test "X`expr 00001 : '.*\(...\)'`" = X001; then
119  as_expr=expr
120else
121  as_expr=false
122fi
123
124if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
125  as_basename=basename
126else
127  as_basename=false
128fi
129
130
131# Name of the executable.
132as_me=`$as_basename -- "$0" ||
133$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
134	 X"$0" : 'X\(//\)$' \| \
135	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
136echo X/"$0" |
137    sed '/^.*\/\([^/][^/]*\)\/*$/{
138	    s//\1/
139	    q
140	  }
141	  /^X\/\(\/\/\)$/{
142	    s//\1/
143	    q
144	  }
145	  /^X\/\(\/\).*/{
146	    s//\1/
147	    q
148	  }
149	  s/.*/./; q'`
150
151# CDPATH.
152$as_unset CDPATH
153
154
155if test "x$CONFIG_SHELL" = x; then
156  if (eval ":") 2>/dev/null; then
157  as_have_required=yes
158else
159  as_have_required=no
160fi
161
162  if test $as_have_required = yes && 	 (eval ":
163(as_func_return () {
164  (exit \$1)
165}
166as_func_success () {
167  as_func_return 0
168}
169as_func_failure () {
170  as_func_return 1
171}
172as_func_ret_success () {
173  return 0
174}
175as_func_ret_failure () {
176  return 1
177}
178
179exitcode=0
180if as_func_success; then
181  :
182else
183  exitcode=1
184  echo as_func_success failed.
185fi
186
187if as_func_failure; then
188  exitcode=1
189  echo as_func_failure succeeded.
190fi
191
192if as_func_ret_success; then
193  :
194else
195  exitcode=1
196  echo as_func_ret_success failed.
197fi
198
199if as_func_ret_failure; then
200  exitcode=1
201  echo as_func_ret_failure succeeded.
202fi
203
204if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
205  :
206else
207  exitcode=1
208  echo positional parameters were not saved.
209fi
210
211test \$exitcode = 0) || { (exit 1); exit 1; }
212
213(
214  as_lineno_1=\$LINENO
215  as_lineno_2=\$LINENO
216  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
217  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
218") 2> /dev/null; then
219  :
220else
221  as_candidate_shells=
222    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
223for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
224do
225  IFS=$as_save_IFS
226  test -z "$as_dir" && as_dir=.
227  case $as_dir in
228	 /*)
229	   for as_base in sh bash ksh sh5; do
230	     as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
231	   done;;
232       esac
233done
234IFS=$as_save_IFS
235
236
237      for as_shell in $as_candidate_shells $SHELL; do
238	 # Try only shells that exist, to save several forks.
239	 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
240		{ ("$as_shell") 2> /dev/null <<\_ASEOF
241if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
242  emulate sh
243  NULLCMD=:
244  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
245  # is contrary to our usage.  Disable this feature.
246  alias -g '${1+"$@"}'='"$@"'
247  setopt NO_GLOB_SUBST
248else
249  case `(set -o) 2>/dev/null` in
250  *posix*) set -o posix ;;
251esac
252
253fi
254
255
256:
257_ASEOF
258}; then
259  CONFIG_SHELL=$as_shell
260	       as_have_required=yes
261	       if { "$as_shell" 2> /dev/null <<\_ASEOF
262if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
263  emulate sh
264  NULLCMD=:
265  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
266  # is contrary to our usage.  Disable this feature.
267  alias -g '${1+"$@"}'='"$@"'
268  setopt NO_GLOB_SUBST
269else
270  case `(set -o) 2>/dev/null` in
271  *posix*) set -o posix ;;
272esac
273
274fi
275
276
277:
278(as_func_return () {
279  (exit $1)
280}
281as_func_success () {
282  as_func_return 0
283}
284as_func_failure () {
285  as_func_return 1
286}
287as_func_ret_success () {
288  return 0
289}
290as_func_ret_failure () {
291  return 1
292}
293
294exitcode=0
295if as_func_success; then
296  :
297else
298  exitcode=1
299  echo as_func_success failed.
300fi
301
302if as_func_failure; then
303  exitcode=1
304  echo as_func_failure succeeded.
305fi
306
307if as_func_ret_success; then
308  :
309else
310  exitcode=1
311  echo as_func_ret_success failed.
312fi
313
314if as_func_ret_failure; then
315  exitcode=1
316  echo as_func_ret_failure succeeded.
317fi
318
319if ( set x; as_func_ret_success y && test x = "$1" ); then
320  :
321else
322  exitcode=1
323  echo positional parameters were not saved.
324fi
325
326test $exitcode = 0) || { (exit 1); exit 1; }
327
328(
329  as_lineno_1=$LINENO
330  as_lineno_2=$LINENO
331  test "x$as_lineno_1" != "x$as_lineno_2" &&
332  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
333
334_ASEOF
335}; then
336  break
337fi
338
339fi
340
341      done
342
343      if test "x$CONFIG_SHELL" != x; then
344  for as_var in BASH_ENV ENV
345        do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
346        done
347        export CONFIG_SHELL
348        exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
349fi
350
351
352    if test $as_have_required = no; then
353  echo This script requires a shell more modern than all the
354      echo shells that I found on your system.  Please install a
355      echo modern shell, or manually run the script under such a
356      echo shell if you do have one.
357      { (exit 1); exit 1; }
358fi
359
360
361fi
362
363fi
364
365
366
367(eval "as_func_return () {
368  (exit \$1)
369}
370as_func_success () {
371  as_func_return 0
372}
373as_func_failure () {
374  as_func_return 1
375}
376as_func_ret_success () {
377  return 0
378}
379as_func_ret_failure () {
380  return 1
381}
382
383exitcode=0
384if as_func_success; then
385  :
386else
387  exitcode=1
388  echo as_func_success failed.
389fi
390
391if as_func_failure; then
392  exitcode=1
393  echo as_func_failure succeeded.
394fi
395
396if as_func_ret_success; then
397  :
398else
399  exitcode=1
400  echo as_func_ret_success failed.
401fi
402
403if as_func_ret_failure; then
404  exitcode=1
405  echo as_func_ret_failure succeeded.
406fi
407
408if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
409  :
410else
411  exitcode=1
412  echo positional parameters were not saved.
413fi
414
415test \$exitcode = 0") || {
416  echo No shell found that supports shell functions.
417  echo Please tell autoconf@gnu.org about your system,
418  echo including any error possibly output before this
419  echo message
420}
421
422
423
424  as_lineno_1=$LINENO
425  as_lineno_2=$LINENO
426  test "x$as_lineno_1" != "x$as_lineno_2" &&
427  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
428
429  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
430  # uniformly replaced by the line number.  The first 'sed' inserts a
431  # line-number line after each line using $LINENO; the second 'sed'
432  # does the real work.  The second script uses 'N' to pair each
433  # line-number line with the line containing $LINENO, and appends
434  # trailing '-' during substitution so that $LINENO is not a special
435  # case at line end.
436  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
437  # scripts with optimization help from Paolo Bonzini.  Blame Lee
438  # E. McMahon (1931-1989) for sed's syntax.  :-)
439  sed -n '
440    p
441    /[$]LINENO/=
442  ' <$as_myself |
443    sed '
444      s/[$]LINENO.*/&-/
445      t lineno
446      b
447      :lineno
448      N
449      :loop
450      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
451      t loop
452      s/-\n.*//
453    ' >$as_me.lineno &&
454  chmod +x "$as_me.lineno" ||
455    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
456   { (exit 1); exit 1; }; }
457
458  # Don't try to exec as it changes $[0], causing all sort of problems
459  # (the dirname of $[0] is not the place where we might find the
460  # original and so on.  Autoconf is especially sensitive to this).
461  . "./$as_me.lineno"
462  # Exit status is that of the last command.
463  exit
464}
465
466
467if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
468  as_dirname=dirname
469else
470  as_dirname=false
471fi
472
473ECHO_C= ECHO_N= ECHO_T=
474case `echo -n x` in
475-n*)
476  case `echo 'x\c'` in
477  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
478  *)   ECHO_C='\c';;
479  esac;;
480*)
481  ECHO_N='-n';;
482esac
483
484if expr a : '\(a\)' >/dev/null 2>&1 &&
485   test "X`expr 00001 : '.*\(...\)'`" = X001; then
486  as_expr=expr
487else
488  as_expr=false
489fi
490
491rm -f conf$$ conf$$.exe conf$$.file
492if test -d conf$$.dir; then
493  rm -f conf$$.dir/conf$$.file
494else
495  rm -f conf$$.dir
496  mkdir conf$$.dir
497fi
498echo >conf$$.file
499if ln -s conf$$.file conf$$ 2>/dev/null; then
500  as_ln_s='ln -s'
501  # ... but there are two gotchas:
502  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
503  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
504  # In both cases, we have to default to `cp -p'.
505  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
506    as_ln_s='cp -p'
507elif ln conf$$.file conf$$ 2>/dev/null; then
508  as_ln_s=ln
509else
510  as_ln_s='cp -p'
511fi
512rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
513rmdir conf$$.dir 2>/dev/null
514
515if mkdir -p . 2>/dev/null; then
516  as_mkdir_p=:
517else
518  test -d ./-p && rmdir ./-p
519  as_mkdir_p=false
520fi
521
522if test -x / >/dev/null 2>&1; then
523  as_test_x='test -x'
524else
525  if ls -dL / >/dev/null 2>&1; then
526    as_ls_L_option=L
527  else
528    as_ls_L_option=
529  fi
530  as_test_x='
531    eval sh -c '\''
532      if test -d "$1"; then
533        test -d "$1/.";
534      else
535	case $1 in
536        -*)set "./$1";;
537	esac;
538	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
539	???[sx]*):;;*)false;;esac;fi
540    '\'' sh
541  '
542fi
543as_executable_p=$as_test_x
544
545# Sed expression to map a string onto a valid CPP name.
546as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
547
548# Sed expression to map a string onto a valid variable name.
549as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
550
551
552
553exec 7<&0 </dev/null 6>&1
554
555# Name of the host.
556# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
557# so uname gets run too.
558ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
559
560#
561# Initializations.
562#
563ac_default_prefix=/usr/local
564ac_clean_files=
565ac_config_libobj_dir=.
566LIBOBJS=
567cross_compiling=no
568subdirs=
569MFLAGS=
570MAKEFLAGS=
571SHELL=${CONFIG_SHELL-/bin/sh}
572
573# Identity of this package.
574PACKAGE_NAME='tcldomxml'
575PACKAGE_TARNAME='tcldomxml'
576PACKAGE_VERSION='2.6'
577PACKAGE_STRING='tcldomxml 2.6'
578PACKAGE_BUGREPORT=''
579
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
656TCLDOMXML_VERSION
657tcldomxml_LIB_FILE
658tcldomxmlstub_LIB_FILE
659CYGPATH
660EXEEXT
661PKG_LIB_FILE
662PKG_STUB_LIB_FILE
663PKG_STUB_SOURCES
664PKG_STUB_OBJECTS
665PKG_TCL_SOURCES
666PKG_HEADERS
667PKG_INCLUDES
668PKG_LIBS
669PKG_CFLAGS
670TCL_VERSION
671TCL_PATCH_LEVEL
672TCL_BIN_DIR
673TCL_SRC_DIR
674TCL_LIB_FILE
675TCL_LIB_FLAG
676TCL_LIB_SPEC
677TCL_STUB_LIB_FILE
678TCL_STUB_LIB_FLAG
679TCL_STUB_LIB_SPEC
680CLEANFILES
681TCL_LIBS
682TCL_DEFS
683TCL_EXTRA_CFLAGS
684TCL_LD_FLAGS
685TCL_SHLIB_LD_LIBS
686CC
687CFLAGS
688LDFLAGS
689CPPFLAGS
690ac_ct_CC
691OBJEXT
692CPP
693INSTALL_PROGRAM
694INSTALL_SCRIPT
695INSTALL_DATA
696SET_MAKE
697RANLIB
698GREP
699EGREP
700MATH_LIBS
701Tcldom_VERSION
702Tcldom_BIN_DIR
703Tcldom_SRC_DIR
704Tcldom_LIB_FILE
705Tcldom_LIB_SPEC
706Tcldom_STUB_LIB_FILE
707Tcldom_STUB_LIB_SPEC
708Tcldom_STUB_LIB_PATH
709TCL_INCLUDES
710EXTRA_SOURCES
711TCL_THREADS
712SHARED_BUILD
713AR
714CELIB_DIR
715CFLAGS_DEBUG
716CFLAGS_OPTIMIZE
717CFLAGS_WARNING
718STLIB_LD
719SHLIB_LD
720SHLIB_LD_LIBS
721SHLIB_CFLAGS
722LD_LIBRARY_PATH_VAR
723CFLAGS_DEFAULT
724LDFLAGS_DEFAULT
725TCL_DBGX
726MAKE_LIB
727MAKE_SHARED_LIB
728MAKE_STATIC_LIB
729MAKE_STUB_LIB
730RANLIB_STUB
731VC_MANIFEST_EMBED_DLL
732VC_MANIFEST_EMBED_EXE
733LIBXML2_INCLUDEDIR
734LIBXML2_LIBDIR
735ICONV_LIBDIR
736TCLSH_PROG
737tcldomxml_BUILD_LIB_SPEC
738tcldomxml_LIB_SPEC
739tcldomxml_BUILD_STUB_LIB_SPEC
740tcldomxml_STUB_LIB_SPEC
741tcldomxml_BUILD_STUB_LIB_PATH
742tcldomxml_STUB_LIB_PATH
743MAJOR_VERSION
744MINOR_VERSION
745PATCHLEVEL
746LIBOBJS
747LTLIBOBJS'
748ac_subst_files=''
749      ac_precious_vars='build_alias
750host_alias
751target_alias
752CC
753CFLAGS
754LDFLAGS
755LIBS
756CPPFLAGS
757CPP'
758
759
760# Initialize some variables set by options.
761ac_init_help=
762ac_init_version=false
763# The variables have the same names as the options, with
764# dashes changed to underlines.
765cache_file=/dev/null
766exec_prefix=NONE
767no_create=
768no_recursion=
769prefix=NONE
770program_prefix=NONE
771program_suffix=NONE
772program_transform_name=s,x,x,
773silent=
774site=
775srcdir=
776verbose=
777x_includes=NONE
778x_libraries=NONE
779
780# Installation directory options.
781# These are left unexpanded so users can "make install exec_prefix=/foo"
782# and all the variables that are supposed to be based on exec_prefix
783# by default will actually change.
784# Use braces instead of parens because sh, perl, etc. also accept them.
785# (The list follows the same order as the GNU Coding Standards.)
786bindir='${exec_prefix}/bin'
787sbindir='${exec_prefix}/sbin'
788libexecdir='${exec_prefix}/libexec'
789datarootdir='${prefix}/share'
790datadir='${datarootdir}'
791sysconfdir='${prefix}/etc'
792sharedstatedir='${prefix}/com'
793localstatedir='${prefix}/var'
794includedir='${prefix}/include'
795oldincludedir='/usr/include'
796docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
797infodir='${datarootdir}/info'
798htmldir='${docdir}'
799dvidir='${docdir}'
800pdfdir='${docdir}'
801psdir='${docdir}'
802libdir='${exec_prefix}/lib'
803localedir='${datarootdir}/locale'
804mandir='${datarootdir}/man'
805
806ac_prev=
807ac_dashdash=
808for ac_option
809do
810  # If the previous option needs an argument, assign it.
811  if test -n "$ac_prev"; then
812    eval $ac_prev=\$ac_option
813    ac_prev=
814    continue
815  fi
816
817  case $ac_option in
818  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
819  *)	ac_optarg=yes ;;
820  esac
821
822  # Accept the important Cygnus configure options, so we can diagnose typos.
823
824  case $ac_dashdash$ac_option in
825  --)
826    ac_dashdash=yes ;;
827
828  -bindir | --bindir | --bindi | --bind | --bin | --bi)
829    ac_prev=bindir ;;
830  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
831    bindir=$ac_optarg ;;
832
833  -build | --build | --buil | --bui | --bu)
834    ac_prev=build_alias ;;
835  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
836    build_alias=$ac_optarg ;;
837
838  -cache-file | --cache-file | --cache-fil | --cache-fi \
839  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
840    ac_prev=cache_file ;;
841  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
842  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
843    cache_file=$ac_optarg ;;
844
845  --config-cache | -C)
846    cache_file=config.cache ;;
847
848  -datadir | --datadir | --datadi | --datad)
849    ac_prev=datadir ;;
850  -datadir=* | --datadir=* | --datadi=* | --datad=*)
851    datadir=$ac_optarg ;;
852
853  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
854  | --dataroo | --dataro | --datar)
855    ac_prev=datarootdir ;;
856  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
857  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
858    datarootdir=$ac_optarg ;;
859
860  -disable-* | --disable-*)
861    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
862    # Reject names that are not valid shell variable names.
863    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
864      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
865   { (exit 1); exit 1; }; }
866    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
867    eval enable_$ac_feature=no ;;
868
869  -docdir | --docdir | --docdi | --doc | --do)
870    ac_prev=docdir ;;
871  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
872    docdir=$ac_optarg ;;
873
874  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
875    ac_prev=dvidir ;;
876  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
877    dvidir=$ac_optarg ;;
878
879  -enable-* | --enable-*)
880    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
881    # Reject names that are not valid shell variable names.
882    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
883      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
884   { (exit 1); exit 1; }; }
885    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
886    eval enable_$ac_feature=\$ac_optarg ;;
887
888  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
889  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
890  | --exec | --exe | --ex)
891    ac_prev=exec_prefix ;;
892  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
893  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
894  | --exec=* | --exe=* | --ex=*)
895    exec_prefix=$ac_optarg ;;
896
897  -gas | --gas | --ga | --g)
898    # Obsolete; use --with-gas.
899    with_gas=yes ;;
900
901  -help | --help | --hel | --he | -h)
902    ac_init_help=long ;;
903  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
904    ac_init_help=recursive ;;
905  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
906    ac_init_help=short ;;
907
908  -host | --host | --hos | --ho)
909    ac_prev=host_alias ;;
910  -host=* | --host=* | --hos=* | --ho=*)
911    host_alias=$ac_optarg ;;
912
913  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
914    ac_prev=htmldir ;;
915  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
916  | --ht=*)
917    htmldir=$ac_optarg ;;
918
919  -includedir | --includedir | --includedi | --included | --include \
920  | --includ | --inclu | --incl | --inc)
921    ac_prev=includedir ;;
922  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
923  | --includ=* | --inclu=* | --incl=* | --inc=*)
924    includedir=$ac_optarg ;;
925
926  -infodir | --infodir | --infodi | --infod | --info | --inf)
927    ac_prev=infodir ;;
928  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
929    infodir=$ac_optarg ;;
930
931  -libdir | --libdir | --libdi | --libd)
932    ac_prev=libdir ;;
933  -libdir=* | --libdir=* | --libdi=* | --libd=*)
934    libdir=$ac_optarg ;;
935
936  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
937  | --libexe | --libex | --libe)
938    ac_prev=libexecdir ;;
939  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
940  | --libexe=* | --libex=* | --libe=*)
941    libexecdir=$ac_optarg ;;
942
943  -localedir | --localedir | --localedi | --localed | --locale)
944    ac_prev=localedir ;;
945  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
946    localedir=$ac_optarg ;;
947
948  -localstatedir | --localstatedir | --localstatedi | --localstated \
949  | --localstate | --localstat | --localsta | --localst | --locals)
950    ac_prev=localstatedir ;;
951  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
952  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
953    localstatedir=$ac_optarg ;;
954
955  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
956    ac_prev=mandir ;;
957  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
958    mandir=$ac_optarg ;;
959
960  -nfp | --nfp | --nf)
961    # Obsolete; use --without-fp.
962    with_fp=no ;;
963
964  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
965  | --no-cr | --no-c | -n)
966    no_create=yes ;;
967
968  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
969  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
970    no_recursion=yes ;;
971
972  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
973  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
974  | --oldin | --oldi | --old | --ol | --o)
975    ac_prev=oldincludedir ;;
976  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
977  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
978  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
979    oldincludedir=$ac_optarg ;;
980
981  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
982    ac_prev=prefix ;;
983  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
984    prefix=$ac_optarg ;;
985
986  -program-prefix | --program-prefix | --program-prefi | --program-pref \
987  | --program-pre | --program-pr | --program-p)
988    ac_prev=program_prefix ;;
989  -program-prefix=* | --program-prefix=* | --program-prefi=* \
990  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
991    program_prefix=$ac_optarg ;;
992
993  -program-suffix | --program-suffix | --program-suffi | --program-suff \
994  | --program-suf | --program-su | --program-s)
995    ac_prev=program_suffix ;;
996  -program-suffix=* | --program-suffix=* | --program-suffi=* \
997  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
998    program_suffix=$ac_optarg ;;
999
1000  -program-transform-name | --program-transform-name \
1001  | --program-transform-nam | --program-transform-na \
1002  | --program-transform-n | --program-transform- \
1003  | --program-transform | --program-transfor \
1004  | --program-transfo | --program-transf \
1005  | --program-trans | --program-tran \
1006  | --progr-tra | --program-tr | --program-t)
1007    ac_prev=program_transform_name ;;
1008  -program-transform-name=* | --program-transform-name=* \
1009  | --program-transform-nam=* | --program-transform-na=* \
1010  | --program-transform-n=* | --program-transform-=* \
1011  | --program-transform=* | --program-transfor=* \
1012  | --program-transfo=* | --program-transf=* \
1013  | --program-trans=* | --program-tran=* \
1014  | --progr-tra=* | --program-tr=* | --program-t=*)
1015    program_transform_name=$ac_optarg ;;
1016
1017  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1018    ac_prev=pdfdir ;;
1019  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1020    pdfdir=$ac_optarg ;;
1021
1022  -psdir | --psdir | --psdi | --psd | --ps)
1023    ac_prev=psdir ;;
1024  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1025    psdir=$ac_optarg ;;
1026
1027  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1028  | -silent | --silent | --silen | --sile | --sil)
1029    silent=yes ;;
1030
1031  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1032    ac_prev=sbindir ;;
1033  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1034  | --sbi=* | --sb=*)
1035    sbindir=$ac_optarg ;;
1036
1037  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1038  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1039  | --sharedst | --shareds | --shared | --share | --shar \
1040  | --sha | --sh)
1041    ac_prev=sharedstatedir ;;
1042  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1043  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1044  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1045  | --sha=* | --sh=*)
1046    sharedstatedir=$ac_optarg ;;
1047
1048  -site | --site | --sit)
1049    ac_prev=site ;;
1050  -site=* | --site=* | --sit=*)
1051    site=$ac_optarg ;;
1052
1053  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1054    ac_prev=srcdir ;;
1055  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1056    srcdir=$ac_optarg ;;
1057
1058  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1059  | --syscon | --sysco | --sysc | --sys | --sy)
1060    ac_prev=sysconfdir ;;
1061  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1062  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1063    sysconfdir=$ac_optarg ;;
1064
1065  -target | --target | --targe | --targ | --tar | --ta | --t)
1066    ac_prev=target_alias ;;
1067  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1068    target_alias=$ac_optarg ;;
1069
1070  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1071    verbose=yes ;;
1072
1073  -version | --version | --versio | --versi | --vers | -V)
1074    ac_init_version=: ;;
1075
1076  -with-* | --with-*)
1077    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1078    # Reject names that are not valid shell variable names.
1079    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1080      { echo "$as_me: error: invalid package name: $ac_package" >&2
1081   { (exit 1); exit 1; }; }
1082    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1083    eval with_$ac_package=\$ac_optarg ;;
1084
1085  -without-* | --without-*)
1086    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1087    # Reject names that are not valid shell variable names.
1088    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1089      { echo "$as_me: error: invalid package name: $ac_package" >&2
1090   { (exit 1); exit 1; }; }
1091    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1092    eval with_$ac_package=no ;;
1093
1094  --x)
1095    # Obsolete; use --with-x.
1096    with_x=yes ;;
1097
1098  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1099  | --x-incl | --x-inc | --x-in | --x-i)
1100    ac_prev=x_includes ;;
1101  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1102  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1103    x_includes=$ac_optarg ;;
1104
1105  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1106  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1107    ac_prev=x_libraries ;;
1108  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1109  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1110    x_libraries=$ac_optarg ;;
1111
1112  -*) { echo "$as_me: error: unrecognized option: $ac_option
1113Try \`$0 --help' for more information." >&2
1114   { (exit 1); exit 1; }; }
1115    ;;
1116
1117  *=*)
1118    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1119    # Reject names that are not valid shell variable names.
1120    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1121      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1122   { (exit 1); exit 1; }; }
1123    eval $ac_envvar=\$ac_optarg
1124    export $ac_envvar ;;
1125
1126  *)
1127    # FIXME: should be removed in autoconf 3.0.
1128    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1129    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1130      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1131    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1132    ;;
1133
1134  esac
1135done
1136
1137if test -n "$ac_prev"; then
1138  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1139  { echo "$as_me: error: missing argument to $ac_option" >&2
1140   { (exit 1); exit 1; }; }
1141fi
1142
1143# Be sure to have absolute directory names.
1144for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1145		datadir sysconfdir sharedstatedir localstatedir includedir \
1146		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1147		libdir localedir mandir
1148do
1149  eval ac_val=\$$ac_var
1150  case $ac_val in
1151    [\\/$]* | ?:[\\/]* )  continue;;
1152    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1153  esac
1154  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1155   { (exit 1); exit 1; }; }
1156done
1157
1158# There might be people who depend on the old broken behavior: `$host'
1159# used to hold the argument of --host etc.
1160# FIXME: To remove some day.
1161build=$build_alias
1162host=$host_alias
1163target=$target_alias
1164
1165# FIXME: To remove some day.
1166if test "x$host_alias" != x; then
1167  if test "x$build_alias" = x; then
1168    cross_compiling=maybe
1169    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1170    If a cross compiler is detected then cross compile mode will be used." >&2
1171  elif test "x$build_alias" != "x$host_alias"; then
1172    cross_compiling=yes
1173  fi
1174fi
1175
1176ac_tool_prefix=
1177test -n "$host_alias" && ac_tool_prefix=$host_alias-
1178
1179test "$silent" = yes && exec 6>/dev/null
1180
1181
1182ac_pwd=`pwd` && test -n "$ac_pwd" &&
1183ac_ls_di=`ls -di .` &&
1184ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1185  { echo "$as_me: error: Working directory cannot be determined" >&2
1186   { (exit 1); exit 1; }; }
1187test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1188  { echo "$as_me: error: pwd does not report name of working directory" >&2
1189   { (exit 1); exit 1; }; }
1190
1191
1192# Find the source files, if location was not specified.
1193if test -z "$srcdir"; then
1194  ac_srcdir_defaulted=yes
1195  # Try the directory containing this script, then the parent directory.
1196  ac_confdir=`$as_dirname -- "$0" ||
1197$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1198	 X"$0" : 'X\(//\)[^/]' \| \
1199	 X"$0" : 'X\(//\)$' \| \
1200	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1201echo X"$0" |
1202    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1203	    s//\1/
1204	    q
1205	  }
1206	  /^X\(\/\/\)[^/].*/{
1207	    s//\1/
1208	    q
1209	  }
1210	  /^X\(\/\/\)$/{
1211	    s//\1/
1212	    q
1213	  }
1214	  /^X\(\/\).*/{
1215	    s//\1/
1216	    q
1217	  }
1218	  s/.*/./; q'`
1219  srcdir=$ac_confdir
1220  if test ! -r "$srcdir/$ac_unique_file"; then
1221    srcdir=..
1222  fi
1223else
1224  ac_srcdir_defaulted=no
1225fi
1226if test ! -r "$srcdir/$ac_unique_file"; then
1227  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1228  { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1229   { (exit 1); exit 1; }; }
1230fi
1231ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1232ac_abs_confdir=`(
1233	cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
1234   { (exit 1); exit 1; }; }
1235	pwd)`
1236# When building in place, set srcdir=.
1237if test "$ac_abs_confdir" = "$ac_pwd"; then
1238  srcdir=.
1239fi
1240# Remove unnecessary trailing slashes from srcdir.
1241# Double slashes in file names in object file debugging info
1242# mess up M-x gdb in Emacs.
1243case $srcdir in
1244*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1245esac
1246for ac_var in $ac_precious_vars; do
1247  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1248  eval ac_env_${ac_var}_value=\$${ac_var}
1249  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1250  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1251done
1252
1253#
1254# Report the --help message.
1255#
1256if test "$ac_init_help" = "long"; then
1257  # Omit some internal or obsolete options to make the list less imposing.
1258  # This message is too long to be a string in the A/UX 3.1 sh.
1259  cat <<_ACEOF
1260\`configure' configures tcldomxml 2.6 to adapt to many kinds of systems.
1261
1262Usage: $0 [OPTION]... [VAR=VALUE]...
1263
1264To assign environment variables (e.g., CC, CFLAGS...), specify them as
1265VAR=VALUE.  See below for descriptions of some of the useful variables.
1266
1267Defaults for the options are specified in brackets.
1268
1269Configuration:
1270  -h, --help              display this help and exit
1271      --help=short        display options specific to this package
1272      --help=recursive    display the short help of all the included packages
1273  -V, --version           display version information and exit
1274  -q, --quiet, --silent   do not print \`checking...' messages
1275      --cache-file=FILE   cache test results in FILE [disabled]
1276  -C, --config-cache      alias for \`--cache-file=config.cache'
1277  -n, --no-create         do not create output files
1278      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1279
1280Installation directories:
1281  --prefix=PREFIX         install architecture-independent files in PREFIX
1282			  [$ac_default_prefix]
1283  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1284			  [PREFIX]
1285
1286By default, \`make install' will install all the files in
1287\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1288an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1289for instance \`--prefix=\$HOME'.
1290
1291For better control, use the options below.
1292
1293Fine tuning of the installation directories:
1294  --bindir=DIR           user executables [EPREFIX/bin]
1295  --sbindir=DIR          system admin executables [EPREFIX/sbin]
1296  --libexecdir=DIR       program executables [EPREFIX/libexec]
1297  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
1298  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
1299  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
1300  --libdir=DIR           object code libraries [EPREFIX/lib]
1301  --includedir=DIR       C header files [PREFIX/include]
1302  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
1303  --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
1304  --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
1305  --infodir=DIR          info documentation [DATAROOTDIR/info]
1306  --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
1307  --mandir=DIR           man documentation [DATAROOTDIR/man]
1308  --docdir=DIR           documentation root [DATAROOTDIR/doc/tcldomxml]
1309  --htmldir=DIR          html documentation [DOCDIR]
1310  --dvidir=DIR           dvi documentation [DOCDIR]
1311  --pdfdir=DIR           pdf documentation [DOCDIR]
1312  --psdir=DIR            ps documentation [DOCDIR]
1313_ACEOF
1314
1315  cat <<\_ACEOF
1316_ACEOF
1317fi
1318
1319if test -n "$ac_init_help"; then
1320  case $ac_init_help in
1321     short | recursive ) echo "Configuration of tcldomxml 2.6:";;
1322   esac
1323  cat <<\_ACEOF
1324
1325Optional Features:
1326  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1327  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1328  --enable-threads        build with threads
1329  --enable-shared         build and link with shared libraries (default: on)
1330  --enable-64bit          enable 64bit support (default: off)
1331  --enable-64bit-vis      enable 64bit Sparc VIS support (default: off)
1332  --disable-rpath         disable rpath support (default: on)
1333  --enable-wince          enable Win/CE support (where applicable)
1334  --enable-symbols        build with debugging symbols (default: off)
1335  --enable-framework      build as a Mac OS X framework
1336
1337Optional Packages:
1338  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1339  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1340  --with-tcl              directory containing tcl configuration
1341                          (tclConfig.sh)
1342  --with-Tcldom              directory containing Tcldom configuration (TcldomConfig.sh)
1343  --with-tclinclude       directory containing the public Tcl header files
1344  --with-celib=DIR        use Windows/CE support library from DIR
1345  --with-libxml2-include      directory containing the libxml2 header files
1346  --with-libxml2-lib      directory containing the libxml2 library
1347  --with-iconv-lib      directory containing the iconv library
1348
1349Some influential environment variables:
1350  CC          C compiler command
1351  CFLAGS      C compiler flags
1352  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1353              nonstandard directory <lib dir>
1354  LIBS        libraries to pass to the linker, e.g. -l<library>
1355  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1356              you have headers in a nonstandard directory <include dir>
1357  CPP         C preprocessor
1358
1359Use these variables to override the choices made by `configure' or to help
1360it to find libraries and programs with nonstandard names/locations.
1361
1362_ACEOF
1363ac_status=$?
1364fi
1365
1366if test "$ac_init_help" = "recursive"; then
1367  # If there are subdirs, report their specific --help.
1368  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1369    test -d "$ac_dir" || continue
1370    ac_builddir=.
1371
1372case "$ac_dir" in
1373.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1374*)
1375  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
1376  # A ".." for each directory in $ac_dir_suffix.
1377  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1378  case $ac_top_builddir_sub in
1379  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1380  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1381  esac ;;
1382esac
1383ac_abs_top_builddir=$ac_pwd
1384ac_abs_builddir=$ac_pwd$ac_dir_suffix
1385# for backward compatibility:
1386ac_top_builddir=$ac_top_build_prefix
1387
1388case $srcdir in
1389  .)  # We are building in place.
1390    ac_srcdir=.
1391    ac_top_srcdir=$ac_top_builddir_sub
1392    ac_abs_top_srcdir=$ac_pwd ;;
1393  [\\/]* | ?:[\\/]* )  # Absolute name.
1394    ac_srcdir=$srcdir$ac_dir_suffix;
1395    ac_top_srcdir=$srcdir
1396    ac_abs_top_srcdir=$srcdir ;;
1397  *) # Relative name.
1398    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1399    ac_top_srcdir=$ac_top_build_prefix$srcdir
1400    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1401esac
1402ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1403
1404    cd "$ac_dir" || { ac_status=$?; continue; }
1405    # Check for guested configure.
1406    if test -f "$ac_srcdir/configure.gnu"; then
1407      echo &&
1408      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1409    elif test -f "$ac_srcdir/configure"; then
1410      echo &&
1411      $SHELL "$ac_srcdir/configure" --help=recursive
1412    else
1413      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1414    fi || ac_status=$?
1415    cd "$ac_pwd" || { ac_status=$?; break; }
1416  done
1417fi
1418
1419test -n "$ac_init_help" && exit $ac_status
1420if $ac_init_version; then
1421  cat <<\_ACEOF
1422tcldomxml configure 2.6
1423generated by GNU Autoconf 2.61
1424
1425Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14262002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1427This configure script is free software; the Free Software Foundation
1428gives unlimited permission to copy, distribute and modify it.
1429_ACEOF
1430  exit
1431fi
1432cat >config.log <<_ACEOF
1433This file contains any messages produced by compilers while
1434running configure, to aid debugging if configure makes a mistake.
1435
1436It was created by tcldomxml $as_me 2.6, which was
1437generated by GNU Autoconf 2.61.  Invocation command line was
1438
1439  $ $0 $@
1440
1441_ACEOF
1442exec 5>>config.log
1443{
1444cat <<_ASUNAME
1445## --------- ##
1446## Platform. ##
1447## --------- ##
1448
1449hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1450uname -m = `(uname -m) 2>/dev/null || echo unknown`
1451uname -r = `(uname -r) 2>/dev/null || echo unknown`
1452uname -s = `(uname -s) 2>/dev/null || echo unknown`
1453uname -v = `(uname -v) 2>/dev/null || echo unknown`
1454
1455/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1456/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1457
1458/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1459/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1460/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1461/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1462/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1463/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1464/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1465
1466_ASUNAME
1467
1468as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1469for as_dir in $PATH
1470do
1471  IFS=$as_save_IFS
1472  test -z "$as_dir" && as_dir=.
1473  echo "PATH: $as_dir"
1474done
1475IFS=$as_save_IFS
1476
1477} >&5
1478
1479cat >&5 <<_ACEOF
1480
1481
1482## ----------- ##
1483## Core tests. ##
1484## ----------- ##
1485
1486_ACEOF
1487
1488
1489# Keep a trace of the command line.
1490# Strip out --no-create and --no-recursion so they do not pile up.
1491# Strip out --silent because we don't want to record it for future runs.
1492# Also quote any args containing shell meta-characters.
1493# Make two passes to allow for proper duplicate-argument suppression.
1494ac_configure_args=
1495ac_configure_args0=
1496ac_configure_args1=
1497ac_must_keep_next=false
1498for ac_pass in 1 2
1499do
1500  for ac_arg
1501  do
1502    case $ac_arg in
1503    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1504    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1505    | -silent | --silent | --silen | --sile | --sil)
1506      continue ;;
1507    *\'*)
1508      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1509    esac
1510    case $ac_pass in
1511    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1512    2)
1513      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1514      if test $ac_must_keep_next = true; then
1515	ac_must_keep_next=false # Got value, back to normal.
1516      else
1517	case $ac_arg in
1518	  *=* | --config-cache | -C | -disable-* | --disable-* \
1519	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1520	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1521	  | -with-* | --with-* | -without-* | --without-* | --x)
1522	    case "$ac_configure_args0 " in
1523	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1524	    esac
1525	    ;;
1526	  -* ) ac_must_keep_next=true ;;
1527	esac
1528      fi
1529      ac_configure_args="$ac_configure_args '$ac_arg'"
1530      ;;
1531    esac
1532  done
1533done
1534$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1535$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1536
1537# When interrupted or exit'd, cleanup temporary files, and complete
1538# config.log.  We remove comments because anyway the quotes in there
1539# would cause problems or look ugly.
1540# WARNING: Use '\'' to represent an apostrophe within the trap.
1541# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1542trap 'exit_status=$?
1543  # Save into config.log some information that might help in debugging.
1544  {
1545    echo
1546
1547    cat <<\_ASBOX
1548## ---------------- ##
1549## Cache variables. ##
1550## ---------------- ##
1551_ASBOX
1552    echo
1553    # The following way of writing the cache mishandles newlines in values,
1554(
1555  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1556    eval ac_val=\$$ac_var
1557    case $ac_val in #(
1558    *${as_nl}*)
1559      case $ac_var in #(
1560      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1561echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1562      esac
1563      case $ac_var in #(
1564      _ | IFS | as_nl) ;; #(
1565      *) $as_unset $ac_var ;;
1566      esac ;;
1567    esac
1568  done
1569  (set) 2>&1 |
1570    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1571    *${as_nl}ac_space=\ *)
1572      sed -n \
1573	"s/'\''/'\''\\\\'\'''\''/g;
1574	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1575      ;; #(
1576    *)
1577      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1578      ;;
1579    esac |
1580    sort
1581)
1582    echo
1583
1584    cat <<\_ASBOX
1585## ----------------- ##
1586## Output variables. ##
1587## ----------------- ##
1588_ASBOX
1589    echo
1590    for ac_var in $ac_subst_vars
1591    do
1592      eval ac_val=\$$ac_var
1593      case $ac_val in
1594      *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1595      esac
1596      echo "$ac_var='\''$ac_val'\''"
1597    done | sort
1598    echo
1599
1600    if test -n "$ac_subst_files"; then
1601      cat <<\_ASBOX
1602## ------------------- ##
1603## File substitutions. ##
1604## ------------------- ##
1605_ASBOX
1606      echo
1607      for ac_var in $ac_subst_files
1608      do
1609	eval ac_val=\$$ac_var
1610	case $ac_val in
1611	*\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1612	esac
1613	echo "$ac_var='\''$ac_val'\''"
1614      done | sort
1615      echo
1616    fi
1617
1618    if test -s confdefs.h; then
1619      cat <<\_ASBOX
1620## ----------- ##
1621## confdefs.h. ##
1622## ----------- ##
1623_ASBOX
1624      echo
1625      cat confdefs.h
1626      echo
1627    fi
1628    test "$ac_signal" != 0 &&
1629      echo "$as_me: caught signal $ac_signal"
1630    echo "$as_me: exit $exit_status"
1631  } >&5
1632  rm -f core *.core core.conftest.* &&
1633    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1634    exit $exit_status
1635' 0
1636for ac_signal in 1 2 13 15; do
1637  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1638done
1639ac_signal=0
1640
1641# confdefs.h avoids OS command line length limits that DEFS can exceed.
1642rm -f -r conftest* confdefs.h
1643
1644# Predefined preprocessor variables.
1645
1646cat >>confdefs.h <<_ACEOF
1647#define PACKAGE_NAME "$PACKAGE_NAME"
1648_ACEOF
1649
1650
1651cat >>confdefs.h <<_ACEOF
1652#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1653_ACEOF
1654
1655
1656cat >>confdefs.h <<_ACEOF
1657#define PACKAGE_VERSION "$PACKAGE_VERSION"
1658_ACEOF
1659
1660
1661cat >>confdefs.h <<_ACEOF
1662#define PACKAGE_STRING "$PACKAGE_STRING"
1663_ACEOF
1664
1665
1666cat >>confdefs.h <<_ACEOF
1667#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1668_ACEOF
1669
1670
1671# Let the site file select an alternate cache file if it wants to.
1672# Prefer explicitly selected file to automatically selected ones.
1673if test -n "$CONFIG_SITE"; then
1674  set x "$CONFIG_SITE"
1675elif test "x$prefix" != xNONE; then
1676  set x "$prefix/share/config.site" "$prefix/etc/config.site"
1677else
1678  set x "$ac_default_prefix/share/config.site" \
1679	"$ac_default_prefix/etc/config.site"
1680fi
1681shift
1682for ac_site_file
1683do
1684  if test -r "$ac_site_file"; then
1685    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1686echo "$as_me: loading site script $ac_site_file" >&6;}
1687    sed 's/^/| /' "$ac_site_file" >&5
1688    . "$ac_site_file"
1689  fi
1690done
1691
1692if test -r "$cache_file"; then
1693  # Some versions of bash will fail to source /dev/null (special
1694  # files actually), so we avoid doing that.
1695  if test -f "$cache_file"; then
1696    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1697echo "$as_me: loading cache $cache_file" >&6;}
1698    case $cache_file in
1699      [\\/]* | ?:[\\/]* ) . "$cache_file";;
1700      *)                      . "./$cache_file";;
1701    esac
1702  fi
1703else
1704  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1705echo "$as_me: creating cache $cache_file" >&6;}
1706  >$cache_file
1707fi
1708
1709# Check that the precious variables saved in the cache have kept the same
1710# value.
1711ac_cache_corrupted=false
1712for ac_var in $ac_precious_vars; do
1713  eval ac_old_set=\$ac_cv_env_${ac_var}_set
1714  eval ac_new_set=\$ac_env_${ac_var}_set
1715  eval ac_old_val=\$ac_cv_env_${ac_var}_value
1716  eval ac_new_val=\$ac_env_${ac_var}_value
1717  case $ac_old_set,$ac_new_set in
1718    set,)
1719      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1720echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1721      ac_cache_corrupted=: ;;
1722    ,set)
1723      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1724echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1725      ac_cache_corrupted=: ;;
1726    ,);;
1727    *)
1728      if test "x$ac_old_val" != "x$ac_new_val"; then
1729	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1730echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1731	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1732echo "$as_me:   former value:  $ac_old_val" >&2;}
1733	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1734echo "$as_me:   current value: $ac_new_val" >&2;}
1735	ac_cache_corrupted=:
1736      fi;;
1737  esac
1738  # Pass precious variables to config.status.
1739  if test "$ac_new_set" = set; then
1740    case $ac_new_val in
1741    *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1742    *) ac_arg=$ac_var=$ac_new_val ;;
1743    esac
1744    case " $ac_configure_args " in
1745      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1746      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1747    esac
1748  fi
1749done
1750if $ac_cache_corrupted; then
1751  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1752echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1753  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1754echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1755   { (exit 1); exit 1; }; }
1756fi
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782ac_ext=c
1783ac_cpp='$CPP $CPPFLAGS'
1784ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1785ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1786ac_compiler_gnu=$ac_cv_c_compiler_gnu
1787
1788
1789
1790ac_aux_dir=
1791for ac_dir in ../tclconfig "$srcdir"/../tclconfig; do
1792  if test -f "$ac_dir/install-sh"; then
1793    ac_aux_dir=$ac_dir
1794    ac_install_sh="$ac_aux_dir/install-sh -c"
1795    break
1796  elif test -f "$ac_dir/install.sh"; then
1797    ac_aux_dir=$ac_dir
1798    ac_install_sh="$ac_aux_dir/install.sh -c"
1799    break
1800  elif test -f "$ac_dir/shtool"; then
1801    ac_aux_dir=$ac_dir
1802    ac_install_sh="$ac_aux_dir/shtool install -c"
1803    break
1804  fi
1805done
1806if test -z "$ac_aux_dir"; then
1807  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in ../tclconfig \"$srcdir\"/../tclconfig" >&5
1808echo "$as_me: error: cannot find install-sh or install.sh in ../tclconfig \"$srcdir\"/../tclconfig" >&2;}
1809   { (exit 1); exit 1; }; }
1810fi
1811
1812# These three variables are undocumented and unsupported,
1813# and are intended to be withdrawn in a future Autoconf release.
1814# They can cause serious problems if a builder's source tree is in a directory
1815# whose full name contains unusual characters.
1816ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
1817ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
1818ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
1819
1820
1821CONFIGDIR=${srcdir}/../tclconfig
1822
1823
1824#--------------------------------------------------------------------
1825# Setting our package name and version numbers.  The NODOT_VERSION is
1826# required for constructing the library name on systems that don't like
1827# dots in library names (Windows).  The VERSION variable is used on the
1828# other systems.
1829#--------------------------------------------------------------------
1830
1831PACKAGE=tcldomxml
1832
1833MAJOR_VERSION=2
1834MINOR_VERSION=6
1835#MAJOR_VERSION=10
1836#MINOR_VERSION=0
1837PATCHLEVEL=
1838
1839VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
1840NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
1841TCLDOMXML_VERSION=${VERSION}
1842
1843
1844
1845
1846
1847# This package name must be replaced statically for AC_SUBST to work
1848
1849# Substitute stub_LIB_FILE if your package creates a stub library too.
1850
1851
1852#--------------------------------------------------------------------
1853# This was placed here so that we can compile with -DVERSION="1.2" to
1854# encode the package version directly into the source files.
1855#--------------------------------------------------------------------
1856
1857eval cat >>confdefs.h <<_ACEOF
1858#define VERSION "${VERSION}"
1859_ACEOF
1860
1861eval cat >>confdefs.h <<_ACEOF
1862#define TCLDOMXML_VERSION "${TCLDOMXML_VERSION}"
1863_ACEOF
1864
1865
1866#--------------------------------------------------------------------
1867# Call TEA_INIT as the first TEA_ macro to set up initial vars.
1868# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
1869#--------------------------------------------------------------------
1870
1871
1872    # TEA extensions pass this us the version of TEA they think they
1873    # are compatible with.
1874    TEA_VERSION="3.9"
1875
1876    { echo "$as_me:$LINENO: checking for correct TEA configuration" >&5
1877echo $ECHO_N "checking for correct TEA configuration... $ECHO_C" >&6; }
1878    if test x"${PACKAGE_NAME}" = x ; then
1879	{ { echo "$as_me:$LINENO: error:
1880The PACKAGE_NAME variable must be defined by your TEA configure.in" >&5
1881echo "$as_me: error:
1882The PACKAGE_NAME variable must be defined by your TEA configure.in" >&2;}
1883   { (exit 1); exit 1; }; }
1884    fi
1885    if test x"3.9" = x ; then
1886	{ { echo "$as_me:$LINENO: error:
1887TEA version not specified." >&5
1888echo "$as_me: error:
1889TEA version not specified." >&2;}
1890   { (exit 1); exit 1; }; }
1891    elif test "3.9" != "${TEA_VERSION}" ; then
1892	{ echo "$as_me:$LINENO: result: warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&5
1893echo "${ECHO_T}warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&6; }
1894    else
1895	{ echo "$as_me:$LINENO: result: ok (TEA ${TEA_VERSION})" >&5
1896echo "${ECHO_T}ok (TEA ${TEA_VERSION})" >&6; }
1897    fi
1898    case "`uname -s`" in
1899	*win32*|*WIN32*|*MINGW32_*)
1900	    # Extract the first word of "cygpath", so it can be a program name with args.
1901set dummy cygpath; ac_word=$2
1902{ echo "$as_me:$LINENO: checking for $ac_word" >&5
1903echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
1904if test "${ac_cv_prog_CYGPATH+set}" = set; then
1905  echo $ECHO_N "(cached) $ECHO_C" >&6
1906else
1907  if test -n "$CYGPATH"; then
1908  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
1909else
1910as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1911for as_dir in $PATH
1912do
1913  IFS=$as_save_IFS
1914  test -z "$as_dir" && as_dir=.
1915  for ac_exec_ext in '' $ac_executable_extensions; do
1916  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
1917    ac_cv_prog_CYGPATH="cygpath -w"
1918    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1919    break 2
1920  fi
1921done
1922done
1923IFS=$as_save_IFS
1924
1925  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
1926fi
1927fi
1928CYGPATH=$ac_cv_prog_CYGPATH
1929if test -n "$CYGPATH"; then
1930  { echo "$as_me:$LINENO: result: $CYGPATH" >&5
1931echo "${ECHO_T}$CYGPATH" >&6; }
1932else
1933  { echo "$as_me:$LINENO: result: no" >&5
1934echo "${ECHO_T}no" >&6; }
1935fi
1936
1937
1938	    EXEEXT=".exe"
1939	    TEA_PLATFORM="windows"
1940	    ;;
1941	*CYGWIN_*)
1942	    CYGPATH=echo
1943	    EXEEXT=".exe"
1944	    # TEA_PLATFORM is determined later in LOAD_TCLCONFIG
1945	    ;;
1946	*)
1947	    CYGPATH=echo
1948	    EXEEXT=""
1949	    TEA_PLATFORM="unix"
1950	    ;;
1951    esac
1952
1953    # Check if exec_prefix is set. If not use fall back to prefix.
1954    # Note when adjusted, so that TEA_PREFIX can correct for this.
1955    # This is needed for recursive configures, since autoconf propagates
1956    # $prefix, but not $exec_prefix (doh!).
1957    if test x$exec_prefix = xNONE ; then
1958	exec_prefix_default=yes
1959	exec_prefix=$prefix
1960    fi
1961
1962
1963
1964
1965    # This package name must be replaced statically for AC_SUBST to work
1966
1967    # Substitute STUB_LIB_FILE in case package creates a stub library too.
1968
1969
1970    # We AC_SUBST these here to ensure they are subst'ed,
1971    # in case the user doesn't call TEA_ADD_...
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981#--------------------------------------------------------------------
1982# Load the tclConfig.sh file
1983#--------------------------------------------------------------------
1984
1985
1986
1987    #
1988    # Ok, lets find the tcl configuration
1989    # First, look for one uninstalled.
1990    # the alternative search directory is invoked by --with-tcl
1991    #
1992
1993    if test x"${no_tcl}" = x ; then
1994	# we reset no_tcl in case something fails here
1995	no_tcl=true
1996
1997# Check whether --with-tcl was given.
1998if test "${with_tcl+set}" = set; then
1999  withval=$with_tcl; with_tclconfig="${withval}"
2000fi
2001
2002	{ echo "$as_me:$LINENO: checking for Tcl configuration" >&5
2003echo $ECHO_N "checking for Tcl configuration... $ECHO_C" >&6; }
2004	if test "${ac_cv_c_tclconfig+set}" = set; then
2005  echo $ECHO_N "(cached) $ECHO_C" >&6
2006else
2007
2008
2009	    # First check to see if --with-tcl was specified.
2010	    if test x"${with_tclconfig}" != x ; then
2011		case "${with_tclconfig}" in
2012		    */tclConfig.sh )
2013			if test -f "${with_tclconfig}"; then
2014			    { echo "$as_me:$LINENO: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&5
2015echo "$as_me: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&2;}
2016			    with_tclconfig="`echo "${with_tclconfig}" | sed 's!/tclConfig\.sh$!!'`"
2017			fi ;;
2018		esac
2019		if test -f "${with_tclconfig}/tclConfig.sh" ; then
2020		    ac_cv_c_tclconfig="`(cd "${with_tclconfig}"; pwd)`"
2021		else
2022		    { { echo "$as_me:$LINENO: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&5
2023echo "$as_me: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&2;}
2024   { (exit 1); exit 1; }; }
2025		fi
2026	    fi
2027
2028	    # then check for a private Tcl installation
2029	    if test x"${ac_cv_c_tclconfig}" = x ; then
2030		for i in \
2031			../tcl \
2032			`ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2033			`ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
2034			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
2035			../../tcl \
2036			`ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2037			`ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
2038			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
2039			../../../tcl \
2040			`ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2041			`ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
2042			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
2043		    if test "${TEA_PLATFORM}" = "windows" \
2044			    -a -f "$i/win/tclConfig.sh" ; then
2045			ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
2046			break
2047		    fi
2048		    if test -f "$i/unix/tclConfig.sh" ; then
2049			ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
2050			break
2051		    fi
2052		done
2053	    fi
2054
2055	    # on Darwin, check in Framework installation locations
2056	    if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
2057		for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
2058			`ls -d /Library/Frameworks 2>/dev/null` \
2059			`ls -d /Network/Library/Frameworks 2>/dev/null` \
2060			`ls -d /System/Library/Frameworks 2>/dev/null` \
2061			; do
2062		    if test -f "$i/Tcl.framework/tclConfig.sh" ; then
2063			ac_cv_c_tclconfig="`(cd $i/Tcl.framework; pwd)`"
2064			break
2065		    fi
2066		done
2067	    fi
2068
2069	    # TEA specific: on Windows, check in common installation locations
2070	    if test "${TEA_PLATFORM}" = "windows" \
2071		-a x"${ac_cv_c_tclconfig}" = x ; then
2072		for i in `ls -d C:/Tcl/lib 2>/dev/null` \
2073			`ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
2074			; do
2075		    if test -f "$i/tclConfig.sh" ; then
2076			ac_cv_c_tclconfig="`(cd $i; pwd)`"
2077			break
2078		    fi
2079		done
2080	    fi
2081
2082	    # check in a few common install locations
2083	    if test x"${ac_cv_c_tclconfig}" = x ; then
2084		for i in `ls -d ${libdir} 2>/dev/null` \
2085			`ls -d ${exec_prefix}/lib 2>/dev/null` \
2086			`ls -d ${prefix}/lib 2>/dev/null` \
2087			`ls -d /usr/local/lib 2>/dev/null` \
2088			`ls -d /usr/contrib/lib 2>/dev/null` \
2089			`ls -d /usr/lib 2>/dev/null` \
2090			`ls -d /usr/lib64 2>/dev/null` \
2091			; do
2092		    if test -f "$i/tclConfig.sh" ; then
2093			ac_cv_c_tclconfig="`(cd $i; pwd)`"
2094			break
2095		    fi
2096		done
2097	    fi
2098
2099	    # check in a few other private locations
2100	    if test x"${ac_cv_c_tclconfig}" = x ; then
2101		for i in \
2102			${srcdir}/../tcl \
2103			`ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2104			`ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
2105			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
2106		    if test "${TEA_PLATFORM}" = "windows" \
2107			    -a -f "$i/win/tclConfig.sh" ; then
2108			ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
2109			break
2110		    fi
2111		    if test -f "$i/unix/tclConfig.sh" ; then
2112			ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
2113			break
2114		    fi
2115		done
2116	    fi
2117
2118fi
2119
2120
2121	if test x"${ac_cv_c_tclconfig}" = x ; then
2122	    TCL_BIN_DIR="# no Tcl configs found"
2123	    { { echo "$as_me:$LINENO: error: Can't find Tcl configuration definitions" >&5
2124echo "$as_me: error: Can't find Tcl configuration definitions" >&2;}
2125   { (exit 1); exit 1; }; }
2126	else
2127	    no_tcl=
2128	    TCL_BIN_DIR="${ac_cv_c_tclconfig}"
2129	    { echo "$as_me:$LINENO: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
2130echo "${ECHO_T}found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
2131	fi
2132    fi
2133
2134
2135    { echo "$as_me:$LINENO: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
2136echo $ECHO_N "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... $ECHO_C" >&6; }
2137
2138    if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
2139        { echo "$as_me:$LINENO: result: loading" >&5
2140echo "${ECHO_T}loading" >&6; }
2141	. "${TCL_BIN_DIR}/tclConfig.sh"
2142    else
2143        { echo "$as_me:$LINENO: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
2144echo "${ECHO_T}could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
2145    fi
2146
2147    # eval is required to do the TCL_DBGX substitution
2148    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
2149    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
2150
2151    # If the TCL_BIN_DIR is the build directory (not the install directory),
2152    # then set the common variable name to the value of the build variables.
2153    # For example, the variable TCL_LIB_SPEC will be set to the value
2154    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
2155    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
2156    # installed and uninstalled version of Tcl.
2157    if test -f "${TCL_BIN_DIR}/Makefile" ; then
2158        TCL_LIB_SPEC="${TCL_BUILD_LIB_SPEC}"
2159        TCL_STUB_LIB_SPEC="${TCL_BUILD_STUB_LIB_SPEC}"
2160        TCL_STUB_LIB_PATH="${TCL_BUILD_STUB_LIB_PATH}"
2161    elif test "`uname -s`" = "Darwin"; then
2162	# If Tcl was built as a framework, attempt to use the libraries
2163	# from the framework at the given location so that linking works
2164	# against Tcl.framework installed in an arbitrary location.
2165	case ${TCL_DEFS} in
2166	    *TCL_FRAMEWORK*)
2167		if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
2168		    for i in "`cd "${TCL_BIN_DIR}"; pwd`" \
2169			     "`cd "${TCL_BIN_DIR}"/../..; pwd`"; do
2170			if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
2171			    TCL_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TCL_LIB_FILE}"
2172			    break
2173			fi
2174		    done
2175		fi
2176		if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
2177		    TCL_STUB_LIB_SPEC="-L`echo "${TCL_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
2178		    TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
2179		fi
2180		;;
2181	esac
2182    fi
2183
2184    # eval is required to do the TCL_DBGX substitution
2185    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
2186    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
2187    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
2188    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203    case "`uname -s`" in
2204	*CYGWIN_*)
2205	    { echo "$as_me:$LINENO: checking for cygwin variant" >&5
2206echo $ECHO_N "checking for cygwin variant... $ECHO_C" >&6; }
2207	    case ${TCL_EXTRA_CFLAGS} in
2208		*-mwin32*|*-mno-cygwin*)
2209		    TEA_PLATFORM="windows"
2210		    CFLAGS="$CFLAGS -mwin32"
2211		    { echo "$as_me:$LINENO: result: win32" >&5
2212echo "${ECHO_T}win32" >&6; }
2213		    ;;
2214		*)
2215		    TEA_PLATFORM="unix"
2216		    { echo "$as_me:$LINENO: result: unix" >&5
2217echo "${ECHO_T}unix" >&6; }
2218		    ;;
2219	    esac
2220	    EXEEXT=".exe"
2221	    ;;
2222	*)
2223	    ;;
2224    esac
2225
2226    # Do this here as we have fully defined TEA_PLATFORM now
2227    if test "${TEA_PLATFORM}" = "windows" ; then
2228	# The BUILD_$pkg is to define the correct extern storage class
2229	# handling when making this package
2230
2231cat >>confdefs.h <<_ACEOF
2232#define BUILD_${PACKAGE_NAME}
2233_ACEOF
2234
2235	CLEANFILES="$CLEANFILES *.lib *.dll *.pdb *.exp"
2236    fi
2237
2238    # TEA specific:
2239
2240
2241
2242
2243
2244
2245
2246
2247#-----------------------------------------------------------------------
2248# Handle the --prefix=... option by defaulting to what Tcl gave.
2249# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
2250#-----------------------------------------------------------------------
2251
2252
2253    if test "${prefix}" = "NONE"; then
2254	prefix_default=yes
2255	if test x"${TCL_PREFIX}" != x; then
2256	    { echo "$as_me:$LINENO: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&5
2257echo "$as_me: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&6;}
2258	    prefix=${TCL_PREFIX}
2259	else
2260	    { echo "$as_me:$LINENO: --prefix defaulting to /usr/local" >&5
2261echo "$as_me: --prefix defaulting to /usr/local" >&6;}
2262	    prefix=/usr/local
2263	fi
2264    fi
2265    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \
2266	-o x"${exec_prefix_default}" = x"yes" ; then
2267	if test x"${TCL_EXEC_PREFIX}" != x; then
2268	    { echo "$as_me:$LINENO: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&5
2269echo "$as_me: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&6;}
2270	    exec_prefix=${TCL_EXEC_PREFIX}
2271	else
2272	    { echo "$as_me:$LINENO: --exec-prefix defaulting to ${prefix}" >&5
2273echo "$as_me: --exec-prefix defaulting to ${prefix}" >&6;}
2274	    exec_prefix=$prefix
2275	fi
2276    fi
2277
2278
2279#-----------------------------------------------------------------------
2280# Standard compiler checks.
2281# This sets up CC by using the CC env var, or looks for gcc otherwise.
2282# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
2283# the basic setup necessary to compile executables.
2284#-----------------------------------------------------------------------
2285
2286
2287    # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE)
2288    # in this macro, they need to go into TEA_SETUP_COMPILER instead.
2289
2290    # If the user did not set CFLAGS, set it now to keep
2291    # the AC_PROG_CC macro from adding "-g -O2".
2292    if test "${CFLAGS+set}" != "set" ; then
2293	CFLAGS=""
2294    fi
2295
2296    ac_ext=c
2297ac_cpp='$CPP $CPPFLAGS'
2298ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2299ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2300ac_compiler_gnu=$ac_cv_c_compiler_gnu
2301if test -n "$ac_tool_prefix"; then
2302  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2303set dummy ${ac_tool_prefix}gcc; ac_word=$2
2304{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2305echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2306if test "${ac_cv_prog_CC+set}" = set; then
2307  echo $ECHO_N "(cached) $ECHO_C" >&6
2308else
2309  if test -n "$CC"; then
2310  ac_cv_prog_CC="$CC" # Let the user override the test.
2311else
2312as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2313for as_dir in $PATH
2314do
2315  IFS=$as_save_IFS
2316  test -z "$as_dir" && as_dir=.
2317  for ac_exec_ext in '' $ac_executable_extensions; do
2318  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2319    ac_cv_prog_CC="${ac_tool_prefix}gcc"
2320    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2321    break 2
2322  fi
2323done
2324done
2325IFS=$as_save_IFS
2326
2327fi
2328fi
2329CC=$ac_cv_prog_CC
2330if test -n "$CC"; then
2331  { echo "$as_me:$LINENO: result: $CC" >&5
2332echo "${ECHO_T}$CC" >&6; }
2333else
2334  { echo "$as_me:$LINENO: result: no" >&5
2335echo "${ECHO_T}no" >&6; }
2336fi
2337
2338
2339fi
2340if test -z "$ac_cv_prog_CC"; then
2341  ac_ct_CC=$CC
2342  # Extract the first word of "gcc", so it can be a program name with args.
2343set dummy gcc; ac_word=$2
2344{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2345echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2346if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2347  echo $ECHO_N "(cached) $ECHO_C" >&6
2348else
2349  if test -n "$ac_ct_CC"; then
2350  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2351else
2352as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2353for as_dir in $PATH
2354do
2355  IFS=$as_save_IFS
2356  test -z "$as_dir" && as_dir=.
2357  for ac_exec_ext in '' $ac_executable_extensions; do
2358  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2359    ac_cv_prog_ac_ct_CC="gcc"
2360    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2361    break 2
2362  fi
2363done
2364done
2365IFS=$as_save_IFS
2366
2367fi
2368fi
2369ac_ct_CC=$ac_cv_prog_ac_ct_CC
2370if test -n "$ac_ct_CC"; then
2371  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2372echo "${ECHO_T}$ac_ct_CC" >&6; }
2373else
2374  { echo "$as_me:$LINENO: result: no" >&5
2375echo "${ECHO_T}no" >&6; }
2376fi
2377
2378  if test "x$ac_ct_CC" = x; then
2379    CC=""
2380  else
2381    case $cross_compiling:$ac_tool_warned in
2382yes:)
2383{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2384whose name does not start with the host triplet.  If you think this
2385configuration is useful to you, please write to autoconf@gnu.org." >&5
2386echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2387whose name does not start with the host triplet.  If you think this
2388configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2389ac_tool_warned=yes ;;
2390esac
2391    CC=$ac_ct_CC
2392  fi
2393else
2394  CC="$ac_cv_prog_CC"
2395fi
2396
2397if test -z "$CC"; then
2398          if test -n "$ac_tool_prefix"; then
2399    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2400set dummy ${ac_tool_prefix}cc; ac_word=$2
2401{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2402echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2403if test "${ac_cv_prog_CC+set}" = set; then
2404  echo $ECHO_N "(cached) $ECHO_C" >&6
2405else
2406  if test -n "$CC"; then
2407  ac_cv_prog_CC="$CC" # Let the user override the test.
2408else
2409as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2410for as_dir in $PATH
2411do
2412  IFS=$as_save_IFS
2413  test -z "$as_dir" && as_dir=.
2414  for ac_exec_ext in '' $ac_executable_extensions; do
2415  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2416    ac_cv_prog_CC="${ac_tool_prefix}cc"
2417    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2418    break 2
2419  fi
2420done
2421done
2422IFS=$as_save_IFS
2423
2424fi
2425fi
2426CC=$ac_cv_prog_CC
2427if test -n "$CC"; then
2428  { echo "$as_me:$LINENO: result: $CC" >&5
2429echo "${ECHO_T}$CC" >&6; }
2430else
2431  { echo "$as_me:$LINENO: result: no" >&5
2432echo "${ECHO_T}no" >&6; }
2433fi
2434
2435
2436  fi
2437fi
2438if test -z "$CC"; then
2439  # Extract the first word of "cc", so it can be a program name with args.
2440set dummy cc; ac_word=$2
2441{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2442echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2443if test "${ac_cv_prog_CC+set}" = set; then
2444  echo $ECHO_N "(cached) $ECHO_C" >&6
2445else
2446  if test -n "$CC"; then
2447  ac_cv_prog_CC="$CC" # Let the user override the test.
2448else
2449  ac_prog_rejected=no
2450as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2451for as_dir in $PATH
2452do
2453  IFS=$as_save_IFS
2454  test -z "$as_dir" && as_dir=.
2455  for ac_exec_ext in '' $ac_executable_extensions; do
2456  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2457    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2458       ac_prog_rejected=yes
2459       continue
2460     fi
2461    ac_cv_prog_CC="cc"
2462    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2463    break 2
2464  fi
2465done
2466done
2467IFS=$as_save_IFS
2468
2469if test $ac_prog_rejected = yes; then
2470  # We found a bogon in the path, so make sure we never use it.
2471  set dummy $ac_cv_prog_CC
2472  shift
2473  if test $# != 0; then
2474    # We chose a different compiler from the bogus one.
2475    # However, it has the same basename, so the bogon will be chosen
2476    # first if we set CC to just the basename; use the full file name.
2477    shift
2478    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2479  fi
2480fi
2481fi
2482fi
2483CC=$ac_cv_prog_CC
2484if test -n "$CC"; then
2485  { echo "$as_me:$LINENO: result: $CC" >&5
2486echo "${ECHO_T}$CC" >&6; }
2487else
2488  { echo "$as_me:$LINENO: result: no" >&5
2489echo "${ECHO_T}no" >&6; }
2490fi
2491
2492
2493fi
2494if test -z "$CC"; then
2495  if test -n "$ac_tool_prefix"; then
2496  for ac_prog in cl.exe
2497  do
2498    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2499set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2500{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2501echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2502if test "${ac_cv_prog_CC+set}" = set; then
2503  echo $ECHO_N "(cached) $ECHO_C" >&6
2504else
2505  if test -n "$CC"; then
2506  ac_cv_prog_CC="$CC" # Let the user override the test.
2507else
2508as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2509for as_dir in $PATH
2510do
2511  IFS=$as_save_IFS
2512  test -z "$as_dir" && as_dir=.
2513  for ac_exec_ext in '' $ac_executable_extensions; do
2514  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2515    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2516    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2517    break 2
2518  fi
2519done
2520done
2521IFS=$as_save_IFS
2522
2523fi
2524fi
2525CC=$ac_cv_prog_CC
2526if test -n "$CC"; then
2527  { echo "$as_me:$LINENO: result: $CC" >&5
2528echo "${ECHO_T}$CC" >&6; }
2529else
2530  { echo "$as_me:$LINENO: result: no" >&5
2531echo "${ECHO_T}no" >&6; }
2532fi
2533
2534
2535    test -n "$CC" && break
2536  done
2537fi
2538if test -z "$CC"; then
2539  ac_ct_CC=$CC
2540  for ac_prog in cl.exe
2541do
2542  # Extract the first word of "$ac_prog", so it can be a program name with args.
2543set dummy $ac_prog; ac_word=$2
2544{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2545echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2546if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2547  echo $ECHO_N "(cached) $ECHO_C" >&6
2548else
2549  if test -n "$ac_ct_CC"; then
2550  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2551else
2552as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2553for as_dir in $PATH
2554do
2555  IFS=$as_save_IFS
2556  test -z "$as_dir" && as_dir=.
2557  for ac_exec_ext in '' $ac_executable_extensions; do
2558  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2559    ac_cv_prog_ac_ct_CC="$ac_prog"
2560    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2561    break 2
2562  fi
2563done
2564done
2565IFS=$as_save_IFS
2566
2567fi
2568fi
2569ac_ct_CC=$ac_cv_prog_ac_ct_CC
2570if test -n "$ac_ct_CC"; then
2571  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2572echo "${ECHO_T}$ac_ct_CC" >&6; }
2573else
2574  { echo "$as_me:$LINENO: result: no" >&5
2575echo "${ECHO_T}no" >&6; }
2576fi
2577
2578
2579  test -n "$ac_ct_CC" && break
2580done
2581
2582  if test "x$ac_ct_CC" = x; then
2583    CC=""
2584  else
2585    case $cross_compiling:$ac_tool_warned in
2586yes:)
2587{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2588whose name does not start with the host triplet.  If you think this
2589configuration is useful to you, please write to autoconf@gnu.org." >&5
2590echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2591whose name does not start with the host triplet.  If you think this
2592configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2593ac_tool_warned=yes ;;
2594esac
2595    CC=$ac_ct_CC
2596  fi
2597fi
2598
2599fi
2600
2601
2602test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2603See \`config.log' for more details." >&5
2604echo "$as_me: error: no acceptable C compiler found in \$PATH
2605See \`config.log' for more details." >&2;}
2606   { (exit 1); exit 1; }; }
2607
2608# Provide some information about the compiler.
2609echo "$as_me:$LINENO: checking for C compiler version" >&5
2610ac_compiler=`set X $ac_compile; echo $2`
2611{ (ac_try="$ac_compiler --version >&5"
2612case "(($ac_try" in
2613  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2614  *) ac_try_echo=$ac_try;;
2615esac
2616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2617  (eval "$ac_compiler --version >&5") 2>&5
2618  ac_status=$?
2619  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2620  (exit $ac_status); }
2621{ (ac_try="$ac_compiler -v >&5"
2622case "(($ac_try" in
2623  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2624  *) ac_try_echo=$ac_try;;
2625esac
2626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2627  (eval "$ac_compiler -v >&5") 2>&5
2628  ac_status=$?
2629  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2630  (exit $ac_status); }
2631{ (ac_try="$ac_compiler -V >&5"
2632case "(($ac_try" in
2633  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2634  *) ac_try_echo=$ac_try;;
2635esac
2636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2637  (eval "$ac_compiler -V >&5") 2>&5
2638  ac_status=$?
2639  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2640  (exit $ac_status); }
2641
2642cat >conftest.$ac_ext <<_ACEOF
2643/* confdefs.h.  */
2644_ACEOF
2645cat confdefs.h >>conftest.$ac_ext
2646cat >>conftest.$ac_ext <<_ACEOF
2647/* end confdefs.h.  */
2648
2649int
2650main ()
2651{
2652
2653  ;
2654  return 0;
2655}
2656_ACEOF
2657ac_clean_files_save=$ac_clean_files
2658ac_clean_files="$ac_clean_files a.out a.exe b.out"
2659# Try to create an executable without -o first, disregard a.out.
2660# It will help us diagnose broken compilers, and finding out an intuition
2661# of exeext.
2662{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2663echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2664ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2665#
2666# List of possible output files, starting from the most likely.
2667# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2668# only as a last resort.  b.out is created by i960 compilers.
2669ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2670#
2671# The IRIX 6 linker writes into existing files which may not be
2672# executable, retaining their permissions.  Remove them first so a
2673# subsequent execution test works.
2674ac_rmfiles=
2675for ac_file in $ac_files
2676do
2677  case $ac_file in
2678    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2679    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2680  esac
2681done
2682rm -f $ac_rmfiles
2683
2684if { (ac_try="$ac_link_default"
2685case "(($ac_try" in
2686  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2687  *) ac_try_echo=$ac_try;;
2688esac
2689eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2690  (eval "$ac_link_default") 2>&5
2691  ac_status=$?
2692  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2693  (exit $ac_status); }; then
2694  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2695# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2696# in a Makefile.  We should not override ac_cv_exeext if it was cached,
2697# so that the user can short-circuit this test for compilers unknown to
2698# Autoconf.
2699for ac_file in $ac_files ''
2700do
2701  test -f "$ac_file" || continue
2702  case $ac_file in
2703    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
2704	;;
2705    [ab].out )
2706	# We found the default executable, but exeext='' is most
2707	# certainly right.
2708	break;;
2709    *.* )
2710        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2711	then :; else
2712	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2713	fi
2714	# We set ac_cv_exeext here because the later test for it is not
2715	# safe: cross compilers may not add the suffix if given an `-o'
2716	# argument, so we may need to know it at that point already.
2717	# Even if this section looks crufty: it has the advantage of
2718	# actually working.
2719	break;;
2720    * )
2721	break;;
2722  esac
2723done
2724test "$ac_cv_exeext" = no && ac_cv_exeext=
2725
2726else
2727  ac_file=''
2728fi
2729
2730{ echo "$as_me:$LINENO: result: $ac_file" >&5
2731echo "${ECHO_T}$ac_file" >&6; }
2732if test -z "$ac_file"; then
2733  echo "$as_me: failed program was:" >&5
2734sed 's/^/| /' conftest.$ac_ext >&5
2735
2736{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2737See \`config.log' for more details." >&5
2738echo "$as_me: error: C compiler cannot create executables
2739See \`config.log' for more details." >&2;}
2740   { (exit 77); exit 77; }; }
2741fi
2742
2743ac_exeext=$ac_cv_exeext
2744
2745# Check that the compiler produces executables we can run.  If not, either
2746# the compiler is broken, or we cross compile.
2747{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2748echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
2749# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2750# If not cross compiling, check that we can run a simple program.
2751if test "$cross_compiling" != yes; then
2752  if { ac_try='./$ac_file'
2753  { (case "(($ac_try" in
2754  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2755  *) ac_try_echo=$ac_try;;
2756esac
2757eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2758  (eval "$ac_try") 2>&5
2759  ac_status=$?
2760  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2761  (exit $ac_status); }; }; then
2762    cross_compiling=no
2763  else
2764    if test "$cross_compiling" = maybe; then
2765	cross_compiling=yes
2766    else
2767	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2768If you meant to cross compile, use \`--host'.
2769See \`config.log' for more details." >&5
2770echo "$as_me: error: cannot run C compiled programs.
2771If you meant to cross compile, use \`--host'.
2772See \`config.log' for more details." >&2;}
2773   { (exit 1); exit 1; }; }
2774    fi
2775  fi
2776fi
2777{ echo "$as_me:$LINENO: result: yes" >&5
2778echo "${ECHO_T}yes" >&6; }
2779
2780rm -f a.out a.exe conftest$ac_cv_exeext b.out
2781ac_clean_files=$ac_clean_files_save
2782# Check that the compiler produces executables we can run.  If not, either
2783# the compiler is broken, or we cross compile.
2784{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2785echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2786{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2787echo "${ECHO_T}$cross_compiling" >&6; }
2788
2789{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2790echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2791if { (ac_try="$ac_link"
2792case "(($ac_try" in
2793  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2794  *) ac_try_echo=$ac_try;;
2795esac
2796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2797  (eval "$ac_link") 2>&5
2798  ac_status=$?
2799  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2800  (exit $ac_status); }; then
2801  # If both `conftest.exe' and `conftest' are `present' (well, observable)
2802# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2803# work properly (i.e., refer to `conftest.exe'), while it won't with
2804# `rm'.
2805for ac_file in conftest.exe conftest conftest.*; do
2806  test -f "$ac_file" || continue
2807  case $ac_file in
2808    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2809    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2810	  break;;
2811    * ) break;;
2812  esac
2813done
2814else
2815  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2816See \`config.log' for more details." >&5
2817echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2818See \`config.log' for more details." >&2;}
2819   { (exit 1); exit 1; }; }
2820fi
2821
2822rm -f conftest$ac_cv_exeext
2823{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2824echo "${ECHO_T}$ac_cv_exeext" >&6; }
2825
2826rm -f conftest.$ac_ext
2827EXEEXT=$ac_cv_exeext
2828ac_exeext=$EXEEXT
2829{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2830echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
2831if test "${ac_cv_objext+set}" = set; then
2832  echo $ECHO_N "(cached) $ECHO_C" >&6
2833else
2834  cat >conftest.$ac_ext <<_ACEOF
2835/* confdefs.h.  */
2836_ACEOF
2837cat confdefs.h >>conftest.$ac_ext
2838cat >>conftest.$ac_ext <<_ACEOF
2839/* end confdefs.h.  */
2840
2841int
2842main ()
2843{
2844
2845  ;
2846  return 0;
2847}
2848_ACEOF
2849rm -f conftest.o conftest.obj
2850if { (ac_try="$ac_compile"
2851case "(($ac_try" in
2852  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2853  *) ac_try_echo=$ac_try;;
2854esac
2855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2856  (eval "$ac_compile") 2>&5
2857  ac_status=$?
2858  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2859  (exit $ac_status); }; then
2860  for ac_file in conftest.o conftest.obj conftest.*; do
2861  test -f "$ac_file" || continue;
2862  case $ac_file in
2863    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
2864    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2865       break;;
2866  esac
2867done
2868else
2869  echo "$as_me: failed program was:" >&5
2870sed 's/^/| /' conftest.$ac_ext >&5
2871
2872{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2873See \`config.log' for more details." >&5
2874echo "$as_me: error: cannot compute suffix of object files: cannot compile
2875See \`config.log' for more details." >&2;}
2876   { (exit 1); exit 1; }; }
2877fi
2878
2879rm -f conftest.$ac_cv_objext conftest.$ac_ext
2880fi
2881{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2882echo "${ECHO_T}$ac_cv_objext" >&6; }
2883OBJEXT=$ac_cv_objext
2884ac_objext=$OBJEXT
2885{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2886echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
2887if test "${ac_cv_c_compiler_gnu+set}" = set; then
2888  echo $ECHO_N "(cached) $ECHO_C" >&6
2889else
2890  cat >conftest.$ac_ext <<_ACEOF
2891/* confdefs.h.  */
2892_ACEOF
2893cat confdefs.h >>conftest.$ac_ext
2894cat >>conftest.$ac_ext <<_ACEOF
2895/* end confdefs.h.  */
2896
2897int
2898main ()
2899{
2900#ifndef __GNUC__
2901       choke me
2902#endif
2903
2904  ;
2905  return 0;
2906}
2907_ACEOF
2908rm -f conftest.$ac_objext
2909if { (ac_try="$ac_compile"
2910case "(($ac_try" in
2911  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2912  *) ac_try_echo=$ac_try;;
2913esac
2914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2915  (eval "$ac_compile") 2>conftest.er1
2916  ac_status=$?
2917  grep -v '^ *+' conftest.er1 >conftest.err
2918  rm -f conftest.er1
2919  cat conftest.err >&5
2920  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2921  (exit $ac_status); } && {
2922	 test -z "$ac_c_werror_flag" ||
2923	 test ! -s conftest.err
2924       } && test -s conftest.$ac_objext; then
2925  ac_compiler_gnu=yes
2926else
2927  echo "$as_me: failed program was:" >&5
2928sed 's/^/| /' conftest.$ac_ext >&5
2929
2930	ac_compiler_gnu=no
2931fi
2932
2933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2934ac_cv_c_compiler_gnu=$ac_compiler_gnu
2935
2936fi
2937{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2938echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2939GCC=`test $ac_compiler_gnu = yes && echo yes`
2940ac_test_CFLAGS=${CFLAGS+set}
2941ac_save_CFLAGS=$CFLAGS
2942{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2943echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
2944if test "${ac_cv_prog_cc_g+set}" = set; then
2945  echo $ECHO_N "(cached) $ECHO_C" >&6
2946else
2947  ac_save_c_werror_flag=$ac_c_werror_flag
2948   ac_c_werror_flag=yes
2949   ac_cv_prog_cc_g=no
2950   CFLAGS="-g"
2951   cat >conftest.$ac_ext <<_ACEOF
2952/* confdefs.h.  */
2953_ACEOF
2954cat confdefs.h >>conftest.$ac_ext
2955cat >>conftest.$ac_ext <<_ACEOF
2956/* end confdefs.h.  */
2957
2958int
2959main ()
2960{
2961
2962  ;
2963  return 0;
2964}
2965_ACEOF
2966rm -f conftest.$ac_objext
2967if { (ac_try="$ac_compile"
2968case "(($ac_try" in
2969  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2970  *) ac_try_echo=$ac_try;;
2971esac
2972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2973  (eval "$ac_compile") 2>conftest.er1
2974  ac_status=$?
2975  grep -v '^ *+' conftest.er1 >conftest.err
2976  rm -f conftest.er1
2977  cat conftest.err >&5
2978  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2979  (exit $ac_status); } && {
2980	 test -z "$ac_c_werror_flag" ||
2981	 test ! -s conftest.err
2982       } && test -s conftest.$ac_objext; then
2983  ac_cv_prog_cc_g=yes
2984else
2985  echo "$as_me: failed program was:" >&5
2986sed 's/^/| /' conftest.$ac_ext >&5
2987
2988	CFLAGS=""
2989      cat >conftest.$ac_ext <<_ACEOF
2990/* confdefs.h.  */
2991_ACEOF
2992cat confdefs.h >>conftest.$ac_ext
2993cat >>conftest.$ac_ext <<_ACEOF
2994/* end confdefs.h.  */
2995
2996int
2997main ()
2998{
2999
3000  ;
3001  return 0;
3002}
3003_ACEOF
3004rm -f conftest.$ac_objext
3005if { (ac_try="$ac_compile"
3006case "(($ac_try" in
3007  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3008  *) ac_try_echo=$ac_try;;
3009esac
3010eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3011  (eval "$ac_compile") 2>conftest.er1
3012  ac_status=$?
3013  grep -v '^ *+' conftest.er1 >conftest.err
3014  rm -f conftest.er1
3015  cat conftest.err >&5
3016  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3017  (exit $ac_status); } && {
3018	 test -z "$ac_c_werror_flag" ||
3019	 test ! -s conftest.err
3020       } && test -s conftest.$ac_objext; then
3021  :
3022else
3023  echo "$as_me: failed program was:" >&5
3024sed 's/^/| /' conftest.$ac_ext >&5
3025
3026	ac_c_werror_flag=$ac_save_c_werror_flag
3027	 CFLAGS="-g"
3028	 cat >conftest.$ac_ext <<_ACEOF
3029/* confdefs.h.  */
3030_ACEOF
3031cat confdefs.h >>conftest.$ac_ext
3032cat >>conftest.$ac_ext <<_ACEOF
3033/* end confdefs.h.  */
3034
3035int
3036main ()
3037{
3038
3039  ;
3040  return 0;
3041}
3042_ACEOF
3043rm -f conftest.$ac_objext
3044if { (ac_try="$ac_compile"
3045case "(($ac_try" in
3046  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3047  *) ac_try_echo=$ac_try;;
3048esac
3049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3050  (eval "$ac_compile") 2>conftest.er1
3051  ac_status=$?
3052  grep -v '^ *+' conftest.er1 >conftest.err
3053  rm -f conftest.er1
3054  cat conftest.err >&5
3055  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3056  (exit $ac_status); } && {
3057	 test -z "$ac_c_werror_flag" ||
3058	 test ! -s conftest.err
3059       } && test -s conftest.$ac_objext; then
3060  ac_cv_prog_cc_g=yes
3061else
3062  echo "$as_me: failed program was:" >&5
3063sed 's/^/| /' conftest.$ac_ext >&5
3064
3065
3066fi
3067
3068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3069fi
3070
3071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3072fi
3073
3074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3075   ac_c_werror_flag=$ac_save_c_werror_flag
3076fi
3077{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3078echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
3079if test "$ac_test_CFLAGS" = set; then
3080  CFLAGS=$ac_save_CFLAGS
3081elif test $ac_cv_prog_cc_g = yes; then
3082  if test "$GCC" = yes; then
3083    CFLAGS="-g -O2"
3084  else
3085    CFLAGS="-g"
3086  fi
3087else
3088  if test "$GCC" = yes; then
3089    CFLAGS="-O2"
3090  else
3091    CFLAGS=
3092  fi
3093fi
3094{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3095echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3096if test "${ac_cv_prog_cc_c89+set}" = set; then
3097  echo $ECHO_N "(cached) $ECHO_C" >&6
3098else
3099  ac_cv_prog_cc_c89=no
3100ac_save_CC=$CC
3101cat >conftest.$ac_ext <<_ACEOF
3102/* confdefs.h.  */
3103_ACEOF
3104cat confdefs.h >>conftest.$ac_ext
3105cat >>conftest.$ac_ext <<_ACEOF
3106/* end confdefs.h.  */
3107#include <stdarg.h>
3108#include <stdio.h>
3109#include <sys/types.h>
3110#include <sys/stat.h>
3111/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3112struct buf { int x; };
3113FILE * (*rcsopen) (struct buf *, struct stat *, int);
3114static char *e (p, i)
3115     char **p;
3116     int i;
3117{
3118  return p[i];
3119}
3120static char *f (char * (*g) (char **, int), char **p, ...)
3121{
3122  char *s;
3123  va_list v;
3124  va_start (v,p);
3125  s = g (p, va_arg (v,int));
3126  va_end (v);
3127  return s;
3128}
3129
3130/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3131   function prototypes and stuff, but not '\xHH' hex character constants.
3132   These don't provoke an error unfortunately, instead are silently treated
3133   as 'x'.  The following induces an error, until -std is added to get
3134   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3135   array size at least.  It's necessary to write '\x00'==0 to get something
3136   that's true only with -std.  */
3137int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3138
3139/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3140   inside strings and character constants.  */
3141#define FOO(x) 'x'
3142int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3143
3144int test (int i, double x);
3145struct s1 {int (*f) (int a);};
3146struct s2 {int (*f) (double a);};
3147int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3148int argc;
3149char **argv;
3150int
3151main ()
3152{
3153return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3154  ;
3155  return 0;
3156}
3157_ACEOF
3158for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3159	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3160do
3161  CC="$ac_save_CC $ac_arg"
3162  rm -f conftest.$ac_objext
3163if { (ac_try="$ac_compile"
3164case "(($ac_try" in
3165  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3166  *) ac_try_echo=$ac_try;;
3167esac
3168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3169  (eval "$ac_compile") 2>conftest.er1
3170  ac_status=$?
3171  grep -v '^ *+' conftest.er1 >conftest.err
3172  rm -f conftest.er1
3173  cat conftest.err >&5
3174  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3175  (exit $ac_status); } && {
3176	 test -z "$ac_c_werror_flag" ||
3177	 test ! -s conftest.err
3178       } && test -s conftest.$ac_objext; then
3179  ac_cv_prog_cc_c89=$ac_arg
3180else
3181  echo "$as_me: failed program was:" >&5
3182sed 's/^/| /' conftest.$ac_ext >&5
3183
3184
3185fi
3186
3187rm -f core conftest.err conftest.$ac_objext
3188  test "x$ac_cv_prog_cc_c89" != "xno" && break
3189done
3190rm -f conftest.$ac_ext
3191CC=$ac_save_CC
3192
3193fi
3194# AC_CACHE_VAL
3195case "x$ac_cv_prog_cc_c89" in
3196  x)
3197    { echo "$as_me:$LINENO: result: none needed" >&5
3198echo "${ECHO_T}none needed" >&6; } ;;
3199  xno)
3200    { echo "$as_me:$LINENO: result: unsupported" >&5
3201echo "${ECHO_T}unsupported" >&6; } ;;
3202  *)
3203    CC="$CC $ac_cv_prog_cc_c89"
3204    { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3205echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
3206esac
3207
3208
3209ac_ext=c
3210ac_cpp='$CPP $CPPFLAGS'
3211ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3212ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3213ac_compiler_gnu=$ac_cv_c_compiler_gnu
3214
3215    ac_ext=c
3216ac_cpp='$CPP $CPPFLAGS'
3217ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3218ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3219ac_compiler_gnu=$ac_cv_c_compiler_gnu
3220{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3221echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
3222# On Suns, sometimes $CPP names a directory.
3223if test -n "$CPP" && test -d "$CPP"; then
3224  CPP=
3225fi
3226if test -z "$CPP"; then
3227  if test "${ac_cv_prog_CPP+set}" = set; then
3228  echo $ECHO_N "(cached) $ECHO_C" >&6
3229else
3230      # Double quotes because CPP needs to be expanded
3231    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3232    do
3233      ac_preproc_ok=false
3234for ac_c_preproc_warn_flag in '' yes
3235do
3236  # Use a header file that comes with gcc, so configuring glibc
3237  # with a fresh cross-compiler works.
3238  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3239  # <limits.h> exists even on freestanding compilers.
3240  # On the NeXT, cc -E runs the code through the compiler's parser,
3241  # not just through cpp. "Syntax error" is here to catch this case.
3242  cat >conftest.$ac_ext <<_ACEOF
3243/* confdefs.h.  */
3244_ACEOF
3245cat confdefs.h >>conftest.$ac_ext
3246cat >>conftest.$ac_ext <<_ACEOF
3247/* end confdefs.h.  */
3248#ifdef __STDC__
3249# include <limits.h>
3250#else
3251# include <assert.h>
3252#endif
3253		     Syntax error
3254_ACEOF
3255if { (ac_try="$ac_cpp conftest.$ac_ext"
3256case "(($ac_try" in
3257  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3258  *) ac_try_echo=$ac_try;;
3259esac
3260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3261  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3262  ac_status=$?
3263  grep -v '^ *+' conftest.er1 >conftest.err
3264  rm -f conftest.er1
3265  cat conftest.err >&5
3266  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3267  (exit $ac_status); } >/dev/null && {
3268	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3269	 test ! -s conftest.err
3270       }; then
3271  :
3272else
3273  echo "$as_me: failed program was:" >&5
3274sed 's/^/| /' conftest.$ac_ext >&5
3275
3276  # Broken: fails on valid input.
3277continue
3278fi
3279
3280rm -f conftest.err conftest.$ac_ext
3281
3282  # OK, works on sane cases.  Now check whether nonexistent headers
3283  # can be detected and how.
3284  cat >conftest.$ac_ext <<_ACEOF
3285/* confdefs.h.  */
3286_ACEOF
3287cat confdefs.h >>conftest.$ac_ext
3288cat >>conftest.$ac_ext <<_ACEOF
3289/* end confdefs.h.  */
3290#include <ac_nonexistent.h>
3291_ACEOF
3292if { (ac_try="$ac_cpp conftest.$ac_ext"
3293case "(($ac_try" in
3294  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3295  *) ac_try_echo=$ac_try;;
3296esac
3297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3298  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3299  ac_status=$?
3300  grep -v '^ *+' conftest.er1 >conftest.err
3301  rm -f conftest.er1
3302  cat conftest.err >&5
3303  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3304  (exit $ac_status); } >/dev/null && {
3305	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3306	 test ! -s conftest.err
3307       }; then
3308  # Broken: success on invalid input.
3309continue
3310else
3311  echo "$as_me: failed program was:" >&5
3312sed 's/^/| /' conftest.$ac_ext >&5
3313
3314  # Passes both tests.
3315ac_preproc_ok=:
3316break
3317fi
3318
3319rm -f conftest.err conftest.$ac_ext
3320
3321done
3322# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3323rm -f conftest.err conftest.$ac_ext
3324if $ac_preproc_ok; then
3325  break
3326fi
3327
3328    done
3329    ac_cv_prog_CPP=$CPP
3330
3331fi
3332  CPP=$ac_cv_prog_CPP
3333else
3334  ac_cv_prog_CPP=$CPP
3335fi
3336{ echo "$as_me:$LINENO: result: $CPP" >&5
3337echo "${ECHO_T}$CPP" >&6; }
3338ac_preproc_ok=false
3339for ac_c_preproc_warn_flag in '' yes
3340do
3341  # Use a header file that comes with gcc, so configuring glibc
3342  # with a fresh cross-compiler works.
3343  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3344  # <limits.h> exists even on freestanding compilers.
3345  # On the NeXT, cc -E runs the code through the compiler's parser,
3346  # not just through cpp. "Syntax error" is here to catch this case.
3347  cat >conftest.$ac_ext <<_ACEOF
3348/* confdefs.h.  */
3349_ACEOF
3350cat confdefs.h >>conftest.$ac_ext
3351cat >>conftest.$ac_ext <<_ACEOF
3352/* end confdefs.h.  */
3353#ifdef __STDC__
3354# include <limits.h>
3355#else
3356# include <assert.h>
3357#endif
3358		     Syntax error
3359_ACEOF
3360if { (ac_try="$ac_cpp conftest.$ac_ext"
3361case "(($ac_try" in
3362  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3363  *) ac_try_echo=$ac_try;;
3364esac
3365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3366  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3367  ac_status=$?
3368  grep -v '^ *+' conftest.er1 >conftest.err
3369  rm -f conftest.er1
3370  cat conftest.err >&5
3371  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3372  (exit $ac_status); } >/dev/null && {
3373	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3374	 test ! -s conftest.err
3375       }; then
3376  :
3377else
3378  echo "$as_me: failed program was:" >&5
3379sed 's/^/| /' conftest.$ac_ext >&5
3380
3381  # Broken: fails on valid input.
3382continue
3383fi
3384
3385rm -f conftest.err conftest.$ac_ext
3386
3387  # OK, works on sane cases.  Now check whether nonexistent headers
3388  # can be detected and how.
3389  cat >conftest.$ac_ext <<_ACEOF
3390/* confdefs.h.  */
3391_ACEOF
3392cat confdefs.h >>conftest.$ac_ext
3393cat >>conftest.$ac_ext <<_ACEOF
3394/* end confdefs.h.  */
3395#include <ac_nonexistent.h>
3396_ACEOF
3397if { (ac_try="$ac_cpp conftest.$ac_ext"
3398case "(($ac_try" in
3399  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3400  *) ac_try_echo=$ac_try;;
3401esac
3402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3403  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3404  ac_status=$?
3405  grep -v '^ *+' conftest.er1 >conftest.err
3406  rm -f conftest.er1
3407  cat conftest.err >&5
3408  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3409  (exit $ac_status); } >/dev/null && {
3410	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3411	 test ! -s conftest.err
3412       }; then
3413  # Broken: success on invalid input.
3414continue
3415else
3416  echo "$as_me: failed program was:" >&5
3417sed 's/^/| /' conftest.$ac_ext >&5
3418
3419  # Passes both tests.
3420ac_preproc_ok=:
3421break
3422fi
3423
3424rm -f conftest.err conftest.$ac_ext
3425
3426done
3427# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3428rm -f conftest.err conftest.$ac_ext
3429if $ac_preproc_ok; then
3430  :
3431else
3432  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3433See \`config.log' for more details." >&5
3434echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3435See \`config.log' for more details." >&2;}
3436   { (exit 1); exit 1; }; }
3437fi
3438
3439ac_ext=c
3440ac_cpp='$CPP $CPPFLAGS'
3441ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3442ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3443ac_compiler_gnu=$ac_cv_c_compiler_gnu
3444
3445
3446    # Find a good install program.  We prefer a C program (faster),
3447# so one script is as good as another.  But avoid the broken or
3448# incompatible versions:
3449# SysV /etc/install, /usr/sbin/install
3450# SunOS /usr/etc/install
3451# IRIX /sbin/install
3452# AIX /bin/install
3453# AmigaOS /C/install, which installs bootblocks on floppy discs
3454# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3455# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3456# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3457# OS/2's system install, which has a completely different semantic
3458# ./install, which can be erroneously created by make from ./install.sh.
3459{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3460echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
3461if test -z "$INSTALL"; then
3462if test "${ac_cv_path_install+set}" = set; then
3463  echo $ECHO_N "(cached) $ECHO_C" >&6
3464else
3465  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3466for as_dir in $PATH
3467do
3468  IFS=$as_save_IFS
3469  test -z "$as_dir" && as_dir=.
3470  # Account for people who put trailing slashes in PATH elements.
3471case $as_dir/ in
3472  ./ | .// | /cC/* | \
3473  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3474  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
3475  /usr/ucb/* ) ;;
3476  *)
3477    # OSF1 and SCO ODT 3.0 have their own names for install.
3478    # Don't use installbsd from OSF since it installs stuff as root
3479    # by default.
3480    for ac_prog in ginstall scoinst install; do
3481      for ac_exec_ext in '' $ac_executable_extensions; do
3482	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3483	  if test $ac_prog = install &&
3484	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3485	    # AIX install.  It has an incompatible calling convention.
3486	    :
3487	  elif test $ac_prog = install &&
3488	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3489	    # program-specific install script used by HP pwplus--don't use.
3490	    :
3491	  else
3492	    ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3493	    break 3
3494	  fi
3495	fi
3496      done
3497    done
3498    ;;
3499esac
3500done
3501IFS=$as_save_IFS
3502
3503
3504fi
3505  if test "${ac_cv_path_install+set}" = set; then
3506    INSTALL=$ac_cv_path_install
3507  else
3508    # As a last resort, use the slow shell script.  Don't cache a
3509    # value for INSTALL within a source directory, because that will
3510    # break other packages using the cache if that directory is
3511    # removed, or if the value is a relative name.
3512    INSTALL=$ac_install_sh
3513  fi
3514fi
3515{ echo "$as_me:$LINENO: result: $INSTALL" >&5
3516echo "${ECHO_T}$INSTALL" >&6; }
3517
3518# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3519# It thinks the first close brace ends the variable substitution.
3520test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3521
3522test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3523
3524test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3525
3526
3527    #--------------------------------------------------------------------
3528    # Checks to see if the make program sets the $MAKE variable.
3529    #--------------------------------------------------------------------
3530
3531    { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3532echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
3533set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3534if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
3535  echo $ECHO_N "(cached) $ECHO_C" >&6
3536else
3537  cat >conftest.make <<\_ACEOF
3538SHELL = /bin/sh
3539all:
3540	@echo '@@@%%%=$(MAKE)=@@@%%%'
3541_ACEOF
3542# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3543case `${MAKE-make} -f conftest.make 2>/dev/null` in
3544  *@@@%%%=?*=@@@%%%*)
3545    eval ac_cv_prog_make_${ac_make}_set=yes;;
3546  *)
3547    eval ac_cv_prog_make_${ac_make}_set=no;;
3548esac
3549rm -f conftest.make
3550fi
3551if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3552  { echo "$as_me:$LINENO: result: yes" >&5
3553echo "${ECHO_T}yes" >&6; }
3554  SET_MAKE=
3555else
3556  { echo "$as_me:$LINENO: result: no" >&5
3557echo "${ECHO_T}no" >&6; }
3558  SET_MAKE="MAKE=${MAKE-make}"
3559fi
3560
3561
3562    #--------------------------------------------------------------------
3563    # Find ranlib
3564    #--------------------------------------------------------------------
3565
3566    if test -n "$ac_tool_prefix"; then
3567  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3568set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3569{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3570echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3571if test "${ac_cv_prog_RANLIB+set}" = set; then
3572  echo $ECHO_N "(cached) $ECHO_C" >&6
3573else
3574  if test -n "$RANLIB"; then
3575  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3576else
3577as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3578for as_dir in $PATH
3579do
3580  IFS=$as_save_IFS
3581  test -z "$as_dir" && as_dir=.
3582  for ac_exec_ext in '' $ac_executable_extensions; do
3583  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3584    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3585    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3586    break 2
3587  fi
3588done
3589done
3590IFS=$as_save_IFS
3591
3592fi
3593fi
3594RANLIB=$ac_cv_prog_RANLIB
3595if test -n "$RANLIB"; then
3596  { echo "$as_me:$LINENO: result: $RANLIB" >&5
3597echo "${ECHO_T}$RANLIB" >&6; }
3598else
3599  { echo "$as_me:$LINENO: result: no" >&5
3600echo "${ECHO_T}no" >&6; }
3601fi
3602
3603
3604fi
3605if test -z "$ac_cv_prog_RANLIB"; then
3606  ac_ct_RANLIB=$RANLIB
3607  # Extract the first word of "ranlib", so it can be a program name with args.
3608set dummy ranlib; ac_word=$2
3609{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3610echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3611if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3612  echo $ECHO_N "(cached) $ECHO_C" >&6
3613else
3614  if test -n "$ac_ct_RANLIB"; then
3615  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3616else
3617as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3618for as_dir in $PATH
3619do
3620  IFS=$as_save_IFS
3621  test -z "$as_dir" && as_dir=.
3622  for ac_exec_ext in '' $ac_executable_extensions; do
3623  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3624    ac_cv_prog_ac_ct_RANLIB="ranlib"
3625    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3626    break 2
3627  fi
3628done
3629done
3630IFS=$as_save_IFS
3631
3632fi
3633fi
3634ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3635if test -n "$ac_ct_RANLIB"; then
3636  { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3637echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
3638else
3639  { echo "$as_me:$LINENO: result: no" >&5
3640echo "${ECHO_T}no" >&6; }
3641fi
3642
3643  if test "x$ac_ct_RANLIB" = x; then
3644    RANLIB=":"
3645  else
3646    case $cross_compiling:$ac_tool_warned in
3647yes:)
3648{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3649whose name does not start with the host triplet.  If you think this
3650configuration is useful to you, please write to autoconf@gnu.org." >&5
3651echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3652whose name does not start with the host triplet.  If you think this
3653configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3654ac_tool_warned=yes ;;
3655esac
3656    RANLIB=$ac_ct_RANLIB
3657  fi
3658else
3659  RANLIB="$ac_cv_prog_RANLIB"
3660fi
3661
3662
3663    #--------------------------------------------------------------------
3664    # Determines the correct binary file extension (.o, .obj, .exe etc.)
3665    #--------------------------------------------------------------------
3666
3667
3668
3669
3670
3671
3672{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3673echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3674if test "${ac_cv_path_GREP+set}" = set; then
3675  echo $ECHO_N "(cached) $ECHO_C" >&6
3676else
3677  # Extract the first word of "grep ggrep" to use in msg output
3678if test -z "$GREP"; then
3679set dummy grep ggrep; ac_prog_name=$2
3680if test "${ac_cv_path_GREP+set}" = set; then
3681  echo $ECHO_N "(cached) $ECHO_C" >&6
3682else
3683  ac_path_GREP_found=false
3684# Loop through the user's path and test for each of PROGNAME-LIST
3685as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3686for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3687do
3688  IFS=$as_save_IFS
3689  test -z "$as_dir" && as_dir=.
3690  for ac_prog in grep ggrep; do
3691  for ac_exec_ext in '' $ac_executable_extensions; do
3692    ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3693    { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3694    # Check for GNU ac_path_GREP and select it if it is found.
3695  # Check for GNU $ac_path_GREP
3696case `"$ac_path_GREP" --version 2>&1` in
3697*GNU*)
3698  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3699*)
3700  ac_count=0
3701  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3702  while :
3703  do
3704    cat "conftest.in" "conftest.in" >"conftest.tmp"
3705    mv "conftest.tmp" "conftest.in"
3706    cp "conftest.in" "conftest.nl"
3707    echo 'GREP' >> "conftest.nl"
3708    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3709    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3710    ac_count=`expr $ac_count + 1`
3711    if test $ac_count -gt ${ac_path_GREP_max-0}; then
3712      # Best one so far, save it but keep looking for a better one
3713      ac_cv_path_GREP="$ac_path_GREP"
3714      ac_path_GREP_max=$ac_count
3715    fi
3716    # 10*(2^10) chars as input seems more than enough
3717    test $ac_count -gt 10 && break
3718  done
3719  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3720esac
3721
3722
3723    $ac_path_GREP_found && break 3
3724  done
3725done
3726
3727done
3728IFS=$as_save_IFS
3729
3730
3731fi
3732
3733GREP="$ac_cv_path_GREP"
3734if test -z "$GREP"; then
3735  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3736echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3737   { (exit 1); exit 1; }; }
3738fi
3739
3740else
3741  ac_cv_path_GREP=$GREP
3742fi
3743
3744
3745fi
3746{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3747echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3748 GREP="$ac_cv_path_GREP"
3749
3750
3751{ echo "$as_me:$LINENO: checking for egrep" >&5
3752echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3753if test "${ac_cv_path_EGREP+set}" = set; then
3754  echo $ECHO_N "(cached) $ECHO_C" >&6
3755else
3756  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3757   then ac_cv_path_EGREP="$GREP -E"
3758   else
3759     # Extract the first word of "egrep" to use in msg output
3760if test -z "$EGREP"; then
3761set dummy egrep; ac_prog_name=$2
3762if test "${ac_cv_path_EGREP+set}" = set; then
3763  echo $ECHO_N "(cached) $ECHO_C" >&6
3764else
3765  ac_path_EGREP_found=false
3766# Loop through the user's path and test for each of PROGNAME-LIST
3767as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3768for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3769do
3770  IFS=$as_save_IFS
3771  test -z "$as_dir" && as_dir=.
3772  for ac_prog in egrep; do
3773  for ac_exec_ext in '' $ac_executable_extensions; do
3774    ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3775    { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3776    # Check for GNU ac_path_EGREP and select it if it is found.
3777  # Check for GNU $ac_path_EGREP
3778case `"$ac_path_EGREP" --version 2>&1` in
3779*GNU*)
3780  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3781*)
3782  ac_count=0
3783  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3784  while :
3785  do
3786    cat "conftest.in" "conftest.in" >"conftest.tmp"
3787    mv "conftest.tmp" "conftest.in"
3788    cp "conftest.in" "conftest.nl"
3789    echo 'EGREP' >> "conftest.nl"
3790    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3791    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3792    ac_count=`expr $ac_count + 1`
3793    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3794      # Best one so far, save it but keep looking for a better one
3795      ac_cv_path_EGREP="$ac_path_EGREP"
3796      ac_path_EGREP_max=$ac_count
3797    fi
3798    # 10*(2^10) chars as input seems more than enough
3799    test $ac_count -gt 10 && break
3800  done
3801  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3802esac
3803
3804
3805    $ac_path_EGREP_found && break 3
3806  done
3807done
3808
3809done
3810IFS=$as_save_IFS
3811
3812
3813fi
3814
3815EGREP="$ac_cv_path_EGREP"
3816if test -z "$EGREP"; then
3817  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3818echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3819   { (exit 1); exit 1; }; }
3820fi
3821
3822else
3823  ac_cv_path_EGREP=$EGREP
3824fi
3825
3826
3827   fi
3828fi
3829{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3830echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3831 EGREP="$ac_cv_path_EGREP"
3832
3833
3834{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3835echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
3836if test "${ac_cv_header_stdc+set}" = set; then
3837  echo $ECHO_N "(cached) $ECHO_C" >&6
3838else
3839  cat >conftest.$ac_ext <<_ACEOF
3840/* confdefs.h.  */
3841_ACEOF
3842cat confdefs.h >>conftest.$ac_ext
3843cat >>conftest.$ac_ext <<_ACEOF
3844/* end confdefs.h.  */
3845#include <stdlib.h>
3846#include <stdarg.h>
3847#include <string.h>
3848#include <float.h>
3849
3850int
3851main ()
3852{
3853
3854  ;
3855  return 0;
3856}
3857_ACEOF
3858rm -f conftest.$ac_objext
3859if { (ac_try="$ac_compile"
3860case "(($ac_try" in
3861  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3862  *) ac_try_echo=$ac_try;;
3863esac
3864eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3865  (eval "$ac_compile") 2>conftest.er1
3866  ac_status=$?
3867  grep -v '^ *+' conftest.er1 >conftest.err
3868  rm -f conftest.er1
3869  cat conftest.err >&5
3870  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3871  (exit $ac_status); } && {
3872	 test -z "$ac_c_werror_flag" ||
3873	 test ! -s conftest.err
3874       } && test -s conftest.$ac_objext; then
3875  ac_cv_header_stdc=yes
3876else
3877  echo "$as_me: failed program was:" >&5
3878sed 's/^/| /' conftest.$ac_ext >&5
3879
3880	ac_cv_header_stdc=no
3881fi
3882
3883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3884
3885if test $ac_cv_header_stdc = yes; then
3886  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3887  cat >conftest.$ac_ext <<_ACEOF
3888/* confdefs.h.  */
3889_ACEOF
3890cat confdefs.h >>conftest.$ac_ext
3891cat >>conftest.$ac_ext <<_ACEOF
3892/* end confdefs.h.  */
3893#include <string.h>
3894
3895_ACEOF
3896if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3897  $EGREP "memchr" >/dev/null 2>&1; then
3898  :
3899else
3900  ac_cv_header_stdc=no
3901fi
3902rm -f -r conftest*
3903
3904fi
3905
3906if test $ac_cv_header_stdc = yes; then
3907  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3908  cat >conftest.$ac_ext <<_ACEOF
3909/* confdefs.h.  */
3910_ACEOF
3911cat confdefs.h >>conftest.$ac_ext
3912cat >>conftest.$ac_ext <<_ACEOF
3913/* end confdefs.h.  */
3914#include <stdlib.h>
3915
3916_ACEOF
3917if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3918  $EGREP "free" >/dev/null 2>&1; then
3919  :
3920else
3921  ac_cv_header_stdc=no
3922fi
3923rm -f -r conftest*
3924
3925fi
3926
3927if test $ac_cv_header_stdc = yes; then
3928  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3929  if test "$cross_compiling" = yes; then
3930  :
3931else
3932  cat >conftest.$ac_ext <<_ACEOF
3933/* confdefs.h.  */
3934_ACEOF
3935cat confdefs.h >>conftest.$ac_ext
3936cat >>conftest.$ac_ext <<_ACEOF
3937/* end confdefs.h.  */
3938#include <ctype.h>
3939#include <stdlib.h>
3940#if ((' ' & 0x0FF) == 0x020)
3941# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3942# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3943#else
3944# define ISLOWER(c) \
3945		   (('a' <= (c) && (c) <= 'i') \
3946		     || ('j' <= (c) && (c) <= 'r') \
3947		     || ('s' <= (c) && (c) <= 'z'))
3948# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3949#endif
3950
3951#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3952int
3953main ()
3954{
3955  int i;
3956  for (i = 0; i < 256; i++)
3957    if (XOR (islower (i), ISLOWER (i))
3958	|| toupper (i) != TOUPPER (i))
3959      return 2;
3960  return 0;
3961}
3962_ACEOF
3963rm -f conftest$ac_exeext
3964if { (ac_try="$ac_link"
3965case "(($ac_try" in
3966  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3967  *) ac_try_echo=$ac_try;;
3968esac
3969eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3970  (eval "$ac_link") 2>&5
3971  ac_status=$?
3972  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3973  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3974  { (case "(($ac_try" in
3975  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3976  *) ac_try_echo=$ac_try;;
3977esac
3978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3979  (eval "$ac_try") 2>&5
3980  ac_status=$?
3981  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3982  (exit $ac_status); }; }; then
3983  :
3984else
3985  echo "$as_me: program exited with status $ac_status" >&5
3986echo "$as_me: failed program was:" >&5
3987sed 's/^/| /' conftest.$ac_ext >&5
3988
3989( exit $ac_status )
3990ac_cv_header_stdc=no
3991fi
3992rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3993fi
3994
3995
3996fi
3997fi
3998{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3999echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
4000if test $ac_cv_header_stdc = yes; then
4001
4002cat >>confdefs.h <<\_ACEOF
4003#define STDC_HEADERS 1
4004_ACEOF
4005
4006fi
4007
4008# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4019		  inttypes.h stdint.h unistd.h
4020do
4021as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4022{ echo "$as_me:$LINENO: checking for $ac_header" >&5
4023echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4024if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4025  echo $ECHO_N "(cached) $ECHO_C" >&6
4026else
4027  cat >conftest.$ac_ext <<_ACEOF
4028/* confdefs.h.  */
4029_ACEOF
4030cat confdefs.h >>conftest.$ac_ext
4031cat >>conftest.$ac_ext <<_ACEOF
4032/* end confdefs.h.  */
4033$ac_includes_default
4034
4035#include <$ac_header>
4036_ACEOF
4037rm -f conftest.$ac_objext
4038if { (ac_try="$ac_compile"
4039case "(($ac_try" in
4040  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4041  *) ac_try_echo=$ac_try;;
4042esac
4043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4044  (eval "$ac_compile") 2>conftest.er1
4045  ac_status=$?
4046  grep -v '^ *+' conftest.er1 >conftest.err
4047  rm -f conftest.er1
4048  cat conftest.err >&5
4049  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4050  (exit $ac_status); } && {
4051	 test -z "$ac_c_werror_flag" ||
4052	 test ! -s conftest.err
4053       } && test -s conftest.$ac_objext; then
4054  eval "$as_ac_Header=yes"
4055else
4056  echo "$as_me: failed program was:" >&5
4057sed 's/^/| /' conftest.$ac_ext >&5
4058
4059	eval "$as_ac_Header=no"
4060fi
4061
4062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4063fi
4064ac_res=`eval echo '${'$as_ac_Header'}'`
4065	       { echo "$as_me:$LINENO: result: $ac_res" >&5
4066echo "${ECHO_T}$ac_res" >&6; }
4067if test `eval echo '${'$as_ac_Header'}'` = yes; then
4068  cat >>confdefs.h <<_ACEOF
4069#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4070_ACEOF
4071
4072fi
4073
4074done
4075
4076
4077
4078    # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here.
4079
4080
4081    #------------------------------------------------------------------------
4082    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
4083    # It makes compiling go faster.  (This is only a performance feature.)
4084    #------------------------------------------------------------------------
4085
4086    if test -z "$no_pipe" -a -n "$GCC"; then
4087	{ echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5
4088echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6; }
4089if test "${tcl_cv_cc_pipe+set}" = set; then
4090  echo $ECHO_N "(cached) $ECHO_C" >&6
4091else
4092
4093	    hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
4094	    cat >conftest.$ac_ext <<_ACEOF
4095/* confdefs.h.  */
4096_ACEOF
4097cat confdefs.h >>conftest.$ac_ext
4098cat >>conftest.$ac_ext <<_ACEOF
4099/* end confdefs.h.  */
4100
4101int
4102main ()
4103{
4104
4105  ;
4106  return 0;
4107}
4108_ACEOF
4109rm -f conftest.$ac_objext
4110if { (ac_try="$ac_compile"
4111case "(($ac_try" in
4112  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4113  *) ac_try_echo=$ac_try;;
4114esac
4115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4116  (eval "$ac_compile") 2>conftest.er1
4117  ac_status=$?
4118  grep -v '^ *+' conftest.er1 >conftest.err
4119  rm -f conftest.er1
4120  cat conftest.err >&5
4121  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4122  (exit $ac_status); } && {
4123	 test -z "$ac_c_werror_flag" ||
4124	 test ! -s conftest.err
4125       } && test -s conftest.$ac_objext; then
4126  tcl_cv_cc_pipe=yes
4127else
4128  echo "$as_me: failed program was:" >&5
4129sed 's/^/| /' conftest.$ac_ext >&5
4130
4131	tcl_cv_cc_pipe=no
4132fi
4133
4134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4135	    CFLAGS=$hold_cflags
4136fi
4137{ echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5
4138echo "${ECHO_T}$tcl_cv_cc_pipe" >&6; }
4139	if test $tcl_cv_cc_pipe = yes; then
4140	    CFLAGS="$CFLAGS -pipe"
4141	fi
4142    fi
4143
4144    #--------------------------------------------------------------------
4145    # Common compiler flag setup
4146    #--------------------------------------------------------------------
4147
4148    { echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
4149echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
4150if test "${ac_cv_c_bigendian+set}" = set; then
4151  echo $ECHO_N "(cached) $ECHO_C" >&6
4152else
4153  # See if sys/param.h defines the BYTE_ORDER macro.
4154cat >conftest.$ac_ext <<_ACEOF
4155/* confdefs.h.  */
4156_ACEOF
4157cat confdefs.h >>conftest.$ac_ext
4158cat >>conftest.$ac_ext <<_ACEOF
4159/* end confdefs.h.  */
4160#include <sys/types.h>
4161#include <sys/param.h>
4162
4163int
4164main ()
4165{
4166#if  ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
4167	&& BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
4168 bogus endian macros
4169#endif
4170
4171  ;
4172  return 0;
4173}
4174_ACEOF
4175rm -f conftest.$ac_objext
4176if { (ac_try="$ac_compile"
4177case "(($ac_try" in
4178  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4179  *) ac_try_echo=$ac_try;;
4180esac
4181eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4182  (eval "$ac_compile") 2>conftest.er1
4183  ac_status=$?
4184  grep -v '^ *+' conftest.er1 >conftest.err
4185  rm -f conftest.er1
4186  cat conftest.err >&5
4187  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4188  (exit $ac_status); } && {
4189	 test -z "$ac_c_werror_flag" ||
4190	 test ! -s conftest.err
4191       } && test -s conftest.$ac_objext; then
4192  # It does; now see whether it defined to BIG_ENDIAN or not.
4193cat >conftest.$ac_ext <<_ACEOF
4194/* confdefs.h.  */
4195_ACEOF
4196cat confdefs.h >>conftest.$ac_ext
4197cat >>conftest.$ac_ext <<_ACEOF
4198/* end confdefs.h.  */
4199#include <sys/types.h>
4200#include <sys/param.h>
4201
4202int
4203main ()
4204{
4205#if BYTE_ORDER != BIG_ENDIAN
4206 not big endian
4207#endif
4208
4209  ;
4210  return 0;
4211}
4212_ACEOF
4213rm -f conftest.$ac_objext
4214if { (ac_try="$ac_compile"
4215case "(($ac_try" in
4216  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4217  *) ac_try_echo=$ac_try;;
4218esac
4219eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4220  (eval "$ac_compile") 2>conftest.er1
4221  ac_status=$?
4222  grep -v '^ *+' conftest.er1 >conftest.err
4223  rm -f conftest.er1
4224  cat conftest.err >&5
4225  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4226  (exit $ac_status); } && {
4227	 test -z "$ac_c_werror_flag" ||
4228	 test ! -s conftest.err
4229       } && test -s conftest.$ac_objext; then
4230  ac_cv_c_bigendian=yes
4231else
4232  echo "$as_me: failed program was:" >&5
4233sed 's/^/| /' conftest.$ac_ext >&5
4234
4235	ac_cv_c_bigendian=no
4236fi
4237
4238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4239else
4240  echo "$as_me: failed program was:" >&5
4241sed 's/^/| /' conftest.$ac_ext >&5
4242
4243	# It does not; compile a test program.
4244if test "$cross_compiling" = yes; then
4245  # try to guess the endianness by grepping values into an object file
4246  ac_cv_c_bigendian=unknown
4247  cat >conftest.$ac_ext <<_ACEOF
4248/* confdefs.h.  */
4249_ACEOF
4250cat confdefs.h >>conftest.$ac_ext
4251cat >>conftest.$ac_ext <<_ACEOF
4252/* end confdefs.h.  */
4253short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
4254short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
4255void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
4256short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
4257short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
4258void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
4259int
4260main ()
4261{
4262 _ascii (); _ebcdic ();
4263  ;
4264  return 0;
4265}
4266_ACEOF
4267rm -f conftest.$ac_objext
4268if { (ac_try="$ac_compile"
4269case "(($ac_try" in
4270  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4271  *) ac_try_echo=$ac_try;;
4272esac
4273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4274  (eval "$ac_compile") 2>conftest.er1
4275  ac_status=$?
4276  grep -v '^ *+' conftest.er1 >conftest.err
4277  rm -f conftest.er1
4278  cat conftest.err >&5
4279  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4280  (exit $ac_status); } && {
4281	 test -z "$ac_c_werror_flag" ||
4282	 test ! -s conftest.err
4283       } && test -s conftest.$ac_objext; then
4284  if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
4285  ac_cv_c_bigendian=yes
4286fi
4287if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
4288  if test "$ac_cv_c_bigendian" = unknown; then
4289    ac_cv_c_bigendian=no
4290  else
4291    # finding both strings is unlikely to happen, but who knows?
4292    ac_cv_c_bigendian=unknown
4293  fi
4294fi
4295else
4296  echo "$as_me: failed program was:" >&5
4297sed 's/^/| /' conftest.$ac_ext >&5
4298
4299
4300fi
4301
4302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4303else
4304  cat >conftest.$ac_ext <<_ACEOF
4305/* confdefs.h.  */
4306_ACEOF
4307cat confdefs.h >>conftest.$ac_ext
4308cat >>conftest.$ac_ext <<_ACEOF
4309/* end confdefs.h.  */
4310$ac_includes_default
4311int
4312main ()
4313{
4314
4315  /* Are we little or big endian?  From Harbison&Steele.  */
4316  union
4317  {
4318    long int l;
4319    char c[sizeof (long int)];
4320  } u;
4321  u.l = 1;
4322  return u.c[sizeof (long int) - 1] == 1;
4323
4324  ;
4325  return 0;
4326}
4327_ACEOF
4328rm -f conftest$ac_exeext
4329if { (ac_try="$ac_link"
4330case "(($ac_try" in
4331  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4332  *) ac_try_echo=$ac_try;;
4333esac
4334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4335  (eval "$ac_link") 2>&5
4336  ac_status=$?
4337  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4338  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4339  { (case "(($ac_try" in
4340  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4341  *) ac_try_echo=$ac_try;;
4342esac
4343eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4344  (eval "$ac_try") 2>&5
4345  ac_status=$?
4346  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4347  (exit $ac_status); }; }; then
4348  ac_cv_c_bigendian=no
4349else
4350  echo "$as_me: program exited with status $ac_status" >&5
4351echo "$as_me: failed program was:" >&5
4352sed 's/^/| /' conftest.$ac_ext >&5
4353
4354( exit $ac_status )
4355ac_cv_c_bigendian=yes
4356fi
4357rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4358fi
4359
4360
4361fi
4362
4363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4364fi
4365{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
4366echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
4367case $ac_cv_c_bigendian in
4368  yes)
4369
4370cat >>confdefs.h <<\_ACEOF
4371#define WORDS_BIGENDIAN 1
4372_ACEOF
4373 ;;
4374  no)
4375     ;;
4376  *)
4377    { { echo "$as_me:$LINENO: error: unknown endianness
4378presetting ac_cv_c_bigendian=no (or yes) will help" >&5
4379echo "$as_me: error: unknown endianness
4380presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
4381   { (exit 1); exit 1; }; } ;;
4382esac
4383
4384    if test "${TEA_PLATFORM}" = "unix" ; then
4385
4386    #--------------------------------------------------------------------
4387    # On a few very rare systems, all of the libm.a stuff is
4388    # already in libc.a.  Set compiler flags accordingly.
4389    # Also, Linux requires the "ieee" library for math to work
4390    # right (and it must appear before "-lm").
4391    #--------------------------------------------------------------------
4392
4393    { echo "$as_me:$LINENO: checking for sin" >&5
4394echo $ECHO_N "checking for sin... $ECHO_C" >&6; }
4395if test "${ac_cv_func_sin+set}" = set; then
4396  echo $ECHO_N "(cached) $ECHO_C" >&6
4397else
4398  cat >conftest.$ac_ext <<_ACEOF
4399/* confdefs.h.  */
4400_ACEOF
4401cat confdefs.h >>conftest.$ac_ext
4402cat >>conftest.$ac_ext <<_ACEOF
4403/* end confdefs.h.  */
4404/* Define sin to an innocuous variant, in case <limits.h> declares sin.
4405   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4406#define sin innocuous_sin
4407
4408/* System header to define __stub macros and hopefully few prototypes,
4409    which can conflict with char sin (); below.
4410    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4411    <limits.h> exists even on freestanding compilers.  */
4412
4413#ifdef __STDC__
4414# include <limits.h>
4415#else
4416# include <assert.h>
4417#endif
4418
4419#undef sin
4420
4421/* Override any GCC internal prototype to avoid an error.
4422   Use char because int might match the return type of a GCC
4423   builtin and then its argument prototype would still apply.  */
4424#ifdef __cplusplus
4425extern "C"
4426#endif
4427char sin ();
4428/* The GNU C library defines this for functions which it implements
4429    to always fail with ENOSYS.  Some functions are actually named
4430    something starting with __ and the normal name is an alias.  */
4431#if defined __stub_sin || defined __stub___sin
4432choke me
4433#endif
4434
4435int
4436main ()
4437{
4438return sin ();
4439  ;
4440  return 0;
4441}
4442_ACEOF
4443rm -f conftest.$ac_objext conftest$ac_exeext
4444if { (ac_try="$ac_link"
4445case "(($ac_try" in
4446  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4447  *) ac_try_echo=$ac_try;;
4448esac
4449eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4450  (eval "$ac_link") 2>conftest.er1
4451  ac_status=$?
4452  grep -v '^ *+' conftest.er1 >conftest.err
4453  rm -f conftest.er1
4454  cat conftest.err >&5
4455  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4456  (exit $ac_status); } && {
4457	 test -z "$ac_c_werror_flag" ||
4458	 test ! -s conftest.err
4459       } && test -s conftest$ac_exeext &&
4460       $as_test_x conftest$ac_exeext; then
4461  ac_cv_func_sin=yes
4462else
4463  echo "$as_me: failed program was:" >&5
4464sed 's/^/| /' conftest.$ac_ext >&5
4465
4466	ac_cv_func_sin=no
4467fi
4468
4469rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4470      conftest$ac_exeext conftest.$ac_ext
4471fi
4472{ echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5
4473echo "${ECHO_T}$ac_cv_func_sin" >&6; }
4474if test $ac_cv_func_sin = yes; then
4475  MATH_LIBS=""
4476else
4477  MATH_LIBS="-lm"
4478fi
4479
4480    { echo "$as_me:$LINENO: checking for main in -lieee" >&5
4481echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6; }
4482if test "${ac_cv_lib_ieee_main+set}" = set; then
4483  echo $ECHO_N "(cached) $ECHO_C" >&6
4484else
4485  ac_check_lib_save_LIBS=$LIBS
4486LIBS="-lieee  $LIBS"
4487cat >conftest.$ac_ext <<_ACEOF
4488/* confdefs.h.  */
4489_ACEOF
4490cat confdefs.h >>conftest.$ac_ext
4491cat >>conftest.$ac_ext <<_ACEOF
4492/* end confdefs.h.  */
4493
4494
4495int
4496main ()
4497{
4498return main ();
4499  ;
4500  return 0;
4501}
4502_ACEOF
4503rm -f conftest.$ac_objext conftest$ac_exeext
4504if { (ac_try="$ac_link"
4505case "(($ac_try" in
4506  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4507  *) ac_try_echo=$ac_try;;
4508esac
4509eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4510  (eval "$ac_link") 2>conftest.er1
4511  ac_status=$?
4512  grep -v '^ *+' conftest.er1 >conftest.err
4513  rm -f conftest.er1
4514  cat conftest.err >&5
4515  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4516  (exit $ac_status); } && {
4517	 test -z "$ac_c_werror_flag" ||
4518	 test ! -s conftest.err
4519       } && test -s conftest$ac_exeext &&
4520       $as_test_x conftest$ac_exeext; then
4521  ac_cv_lib_ieee_main=yes
4522else
4523  echo "$as_me: failed program was:" >&5
4524sed 's/^/| /' conftest.$ac_ext >&5
4525
4526	ac_cv_lib_ieee_main=no
4527fi
4528
4529rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4530      conftest$ac_exeext conftest.$ac_ext
4531LIBS=$ac_check_lib_save_LIBS
4532fi
4533{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5
4534echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6; }
4535if test $ac_cv_lib_ieee_main = yes; then
4536  MATH_LIBS="-lieee $MATH_LIBS"
4537fi
4538
4539
4540    #--------------------------------------------------------------------
4541    # Interactive UNIX requires -linet instead of -lsocket, plus it
4542    # needs net/errno.h to define the socket-related error codes.
4543    #--------------------------------------------------------------------
4544
4545    { echo "$as_me:$LINENO: checking for main in -linet" >&5
4546echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6; }
4547if test "${ac_cv_lib_inet_main+set}" = set; then
4548  echo $ECHO_N "(cached) $ECHO_C" >&6
4549else
4550  ac_check_lib_save_LIBS=$LIBS
4551LIBS="-linet  $LIBS"
4552cat >conftest.$ac_ext <<_ACEOF
4553/* confdefs.h.  */
4554_ACEOF
4555cat confdefs.h >>conftest.$ac_ext
4556cat >>conftest.$ac_ext <<_ACEOF
4557/* end confdefs.h.  */
4558
4559
4560int
4561main ()
4562{
4563return main ();
4564  ;
4565  return 0;
4566}
4567_ACEOF
4568rm -f conftest.$ac_objext conftest$ac_exeext
4569if { (ac_try="$ac_link"
4570case "(($ac_try" in
4571  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4572  *) ac_try_echo=$ac_try;;
4573esac
4574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4575  (eval "$ac_link") 2>conftest.er1
4576  ac_status=$?
4577  grep -v '^ *+' conftest.er1 >conftest.err
4578  rm -f conftest.er1
4579  cat conftest.err >&5
4580  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4581  (exit $ac_status); } && {
4582	 test -z "$ac_c_werror_flag" ||
4583	 test ! -s conftest.err
4584       } && test -s conftest$ac_exeext &&
4585       $as_test_x conftest$ac_exeext; then
4586  ac_cv_lib_inet_main=yes
4587else
4588  echo "$as_me: failed program was:" >&5
4589sed 's/^/| /' conftest.$ac_ext >&5
4590
4591	ac_cv_lib_inet_main=no
4592fi
4593
4594rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4595      conftest$ac_exeext conftest.$ac_ext
4596LIBS=$ac_check_lib_save_LIBS
4597fi
4598{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5
4599echo "${ECHO_T}$ac_cv_lib_inet_main" >&6; }
4600if test $ac_cv_lib_inet_main = yes; then
4601  LIBS="$LIBS -linet"
4602fi
4603
4604    if test "${ac_cv_header_net_errno_h+set}" = set; then
4605  { echo "$as_me:$LINENO: checking for net/errno.h" >&5
4606echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; }
4607if test "${ac_cv_header_net_errno_h+set}" = set; then
4608  echo $ECHO_N "(cached) $ECHO_C" >&6
4609fi
4610{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
4611echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; }
4612else
4613  # Is the header compilable?
4614{ echo "$as_me:$LINENO: checking net/errno.h usability" >&5
4615echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6; }
4616cat >conftest.$ac_ext <<_ACEOF
4617/* confdefs.h.  */
4618_ACEOF
4619cat confdefs.h >>conftest.$ac_ext
4620cat >>conftest.$ac_ext <<_ACEOF
4621/* end confdefs.h.  */
4622$ac_includes_default
4623#include <net/errno.h>
4624_ACEOF
4625rm -f conftest.$ac_objext
4626if { (ac_try="$ac_compile"
4627case "(($ac_try" in
4628  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4629  *) ac_try_echo=$ac_try;;
4630esac
4631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4632  (eval "$ac_compile") 2>conftest.er1
4633  ac_status=$?
4634  grep -v '^ *+' conftest.er1 >conftest.err
4635  rm -f conftest.er1
4636  cat conftest.err >&5
4637  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4638  (exit $ac_status); } && {
4639	 test -z "$ac_c_werror_flag" ||
4640	 test ! -s conftest.err
4641       } && test -s conftest.$ac_objext; then
4642  ac_header_compiler=yes
4643else
4644  echo "$as_me: failed program was:" >&5
4645sed 's/^/| /' conftest.$ac_ext >&5
4646
4647	ac_header_compiler=no
4648fi
4649
4650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4651{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4652echo "${ECHO_T}$ac_header_compiler" >&6; }
4653
4654# Is the header present?
4655{ echo "$as_me:$LINENO: checking net/errno.h presence" >&5
4656echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6; }
4657cat >conftest.$ac_ext <<_ACEOF
4658/* confdefs.h.  */
4659_ACEOF
4660cat confdefs.h >>conftest.$ac_ext
4661cat >>conftest.$ac_ext <<_ACEOF
4662/* end confdefs.h.  */
4663#include <net/errno.h>
4664_ACEOF
4665if { (ac_try="$ac_cpp conftest.$ac_ext"
4666case "(($ac_try" in
4667  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4668  *) ac_try_echo=$ac_try;;
4669esac
4670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4671  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4672  ac_status=$?
4673  grep -v '^ *+' conftest.er1 >conftest.err
4674  rm -f conftest.er1
4675  cat conftest.err >&5
4676  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4677  (exit $ac_status); } >/dev/null && {
4678	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4679	 test ! -s conftest.err
4680       }; then
4681  ac_header_preproc=yes
4682else
4683  echo "$as_me: failed program was:" >&5
4684sed 's/^/| /' conftest.$ac_ext >&5
4685
4686  ac_header_preproc=no
4687fi
4688
4689rm -f conftest.err conftest.$ac_ext
4690{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4691echo "${ECHO_T}$ac_header_preproc" >&6; }
4692
4693# So?  What about this header?
4694case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4695  yes:no: )
4696    { echo "$as_me:$LINENO: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
4697echo "$as_me: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4698    { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the compiler's result" >&5
4699echo "$as_me: WARNING: net/errno.h: proceeding with the compiler's result" >&2;}
4700    ac_header_preproc=yes
4701    ;;
4702  no:yes:* )
4703    { echo "$as_me:$LINENO: WARNING: net/errno.h: present but cannot be compiled" >&5
4704echo "$as_me: WARNING: net/errno.h: present but cannot be compiled" >&2;}
4705    { echo "$as_me:$LINENO: WARNING: net/errno.h:     check for missing prerequisite headers?" >&5
4706echo "$as_me: WARNING: net/errno.h:     check for missing prerequisite headers?" >&2;}
4707    { echo "$as_me:$LINENO: WARNING: net/errno.h: see the Autoconf documentation" >&5
4708echo "$as_me: WARNING: net/errno.h: see the Autoconf documentation" >&2;}
4709    { echo "$as_me:$LINENO: WARNING: net/errno.h:     section \"Present But Cannot Be Compiled\"" >&5
4710echo "$as_me: WARNING: net/errno.h:     section \"Present But Cannot Be Compiled\"" >&2;}
4711    { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the preprocessor's result" >&5
4712echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;}
4713    { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5
4714echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;}
4715
4716    ;;
4717esac
4718{ echo "$as_me:$LINENO: checking for net/errno.h" >&5
4719echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; }
4720if test "${ac_cv_header_net_errno_h+set}" = set; then
4721  echo $ECHO_N "(cached) $ECHO_C" >&6
4722else
4723  ac_cv_header_net_errno_h=$ac_header_preproc
4724fi
4725{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
4726echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; }
4727
4728fi
4729if test $ac_cv_header_net_errno_h = yes; then
4730
4731
4732cat >>confdefs.h <<\_ACEOF
4733#define HAVE_NET_ERRNO_H 1
4734_ACEOF
4735
4736fi
4737
4738
4739
4740    #--------------------------------------------------------------------
4741    #	Check for the existence of the -lsocket and -lnsl libraries.
4742    #	The order here is important, so that they end up in the right
4743    #	order in the command line generated by make.  Here are some
4744    #	special considerations:
4745    #	1. Use "connect" and "accept" to check for -lsocket, and
4746    #	   "gethostbyname" to check for -lnsl.
4747    #	2. Use each function name only once:  can't redo a check because
4748    #	   autoconf caches the results of the last check and won't redo it.
4749    #	3. Use -lnsl and -lsocket only if they supply procedures that
4750    #	   aren't already present in the normal libraries.  This is because
4751    #	   IRIX 5.2 has libraries, but they aren't needed and they're
4752    #	   bogus:  they goof up name resolution if used.
4753    #	4. On some SVR4 systems, can't use -lsocket without -lnsl too.
4754    #	   To get around this problem, check for both libraries together
4755    #	   if -lsocket doesn't work by itself.
4756    #--------------------------------------------------------------------
4757
4758    tcl_checkBoth=0
4759    { echo "$as_me:$LINENO: checking for connect" >&5
4760echo $ECHO_N "checking for connect... $ECHO_C" >&6; }
4761if test "${ac_cv_func_connect+set}" = set; then
4762  echo $ECHO_N "(cached) $ECHO_C" >&6
4763else
4764  cat >conftest.$ac_ext <<_ACEOF
4765/* confdefs.h.  */
4766_ACEOF
4767cat confdefs.h >>conftest.$ac_ext
4768cat >>conftest.$ac_ext <<_ACEOF
4769/* end confdefs.h.  */
4770/* Define connect to an innocuous variant, in case <limits.h> declares connect.
4771   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4772#define connect innocuous_connect
4773
4774/* System header to define __stub macros and hopefully few prototypes,
4775    which can conflict with char connect (); below.
4776    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4777    <limits.h> exists even on freestanding compilers.  */
4778
4779#ifdef __STDC__
4780# include <limits.h>
4781#else
4782# include <assert.h>
4783#endif
4784
4785#undef connect
4786
4787/* Override any GCC internal prototype to avoid an error.
4788   Use char because int might match the return type of a GCC
4789   builtin and then its argument prototype would still apply.  */
4790#ifdef __cplusplus
4791extern "C"
4792#endif
4793char connect ();
4794/* The GNU C library defines this for functions which it implements
4795    to always fail with ENOSYS.  Some functions are actually named
4796    something starting with __ and the normal name is an alias.  */
4797#if defined __stub_connect || defined __stub___connect
4798choke me
4799#endif
4800
4801int
4802main ()
4803{
4804return connect ();
4805  ;
4806  return 0;
4807}
4808_ACEOF
4809rm -f conftest.$ac_objext conftest$ac_exeext
4810if { (ac_try="$ac_link"
4811case "(($ac_try" in
4812  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4813  *) ac_try_echo=$ac_try;;
4814esac
4815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4816  (eval "$ac_link") 2>conftest.er1
4817  ac_status=$?
4818  grep -v '^ *+' conftest.er1 >conftest.err
4819  rm -f conftest.er1
4820  cat conftest.err >&5
4821  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4822  (exit $ac_status); } && {
4823	 test -z "$ac_c_werror_flag" ||
4824	 test ! -s conftest.err
4825       } && test -s conftest$ac_exeext &&
4826       $as_test_x conftest$ac_exeext; then
4827  ac_cv_func_connect=yes
4828else
4829  echo "$as_me: failed program was:" >&5
4830sed 's/^/| /' conftest.$ac_ext >&5
4831
4832	ac_cv_func_connect=no
4833fi
4834
4835rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4836      conftest$ac_exeext conftest.$ac_ext
4837fi
4838{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
4839echo "${ECHO_T}$ac_cv_func_connect" >&6; }
4840if test $ac_cv_func_connect = yes; then
4841  tcl_checkSocket=0
4842else
4843  tcl_checkSocket=1
4844fi
4845
4846    if test "$tcl_checkSocket" = 1; then
4847	{ echo "$as_me:$LINENO: checking for setsockopt" >&5
4848echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6; }
4849if test "${ac_cv_func_setsockopt+set}" = set; then
4850  echo $ECHO_N "(cached) $ECHO_C" >&6
4851else
4852  cat >conftest.$ac_ext <<_ACEOF
4853/* confdefs.h.  */
4854_ACEOF
4855cat confdefs.h >>conftest.$ac_ext
4856cat >>conftest.$ac_ext <<_ACEOF
4857/* end confdefs.h.  */
4858/* Define setsockopt to an innocuous variant, in case <limits.h> declares setsockopt.
4859   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4860#define setsockopt innocuous_setsockopt
4861
4862/* System header to define __stub macros and hopefully few prototypes,
4863    which can conflict with char setsockopt (); below.
4864    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4865    <limits.h> exists even on freestanding compilers.  */
4866
4867#ifdef __STDC__
4868# include <limits.h>
4869#else
4870# include <assert.h>
4871#endif
4872
4873#undef setsockopt
4874
4875/* Override any GCC internal prototype to avoid an error.
4876   Use char because int might match the return type of a GCC
4877   builtin and then its argument prototype would still apply.  */
4878#ifdef __cplusplus
4879extern "C"
4880#endif
4881char setsockopt ();
4882/* The GNU C library defines this for functions which it implements
4883    to always fail with ENOSYS.  Some functions are actually named
4884    something starting with __ and the normal name is an alias.  */
4885#if defined __stub_setsockopt || defined __stub___setsockopt
4886choke me
4887#endif
4888
4889int
4890main ()
4891{
4892return setsockopt ();
4893  ;
4894  return 0;
4895}
4896_ACEOF
4897rm -f conftest.$ac_objext conftest$ac_exeext
4898if { (ac_try="$ac_link"
4899case "(($ac_try" in
4900  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4901  *) ac_try_echo=$ac_try;;
4902esac
4903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4904  (eval "$ac_link") 2>conftest.er1
4905  ac_status=$?
4906  grep -v '^ *+' conftest.er1 >conftest.err
4907  rm -f conftest.er1
4908  cat conftest.err >&5
4909  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4910  (exit $ac_status); } && {
4911	 test -z "$ac_c_werror_flag" ||
4912	 test ! -s conftest.err
4913       } && test -s conftest$ac_exeext &&
4914       $as_test_x conftest$ac_exeext; then
4915  ac_cv_func_setsockopt=yes
4916else
4917  echo "$as_me: failed program was:" >&5
4918sed 's/^/| /' conftest.$ac_ext >&5
4919
4920	ac_cv_func_setsockopt=no
4921fi
4922
4923rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4924      conftest$ac_exeext conftest.$ac_ext
4925fi
4926{ echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5
4927echo "${ECHO_T}$ac_cv_func_setsockopt" >&6; }
4928if test $ac_cv_func_setsockopt = yes; then
4929  :
4930else
4931  { echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5
4932echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6; }
4933if test "${ac_cv_lib_socket_setsockopt+set}" = set; then
4934  echo $ECHO_N "(cached) $ECHO_C" >&6
4935else
4936  ac_check_lib_save_LIBS=$LIBS
4937LIBS="-lsocket  $LIBS"
4938cat >conftest.$ac_ext <<_ACEOF
4939/* confdefs.h.  */
4940_ACEOF
4941cat confdefs.h >>conftest.$ac_ext
4942cat >>conftest.$ac_ext <<_ACEOF
4943/* end confdefs.h.  */
4944
4945/* Override any GCC internal prototype to avoid an error.
4946   Use char because int might match the return type of a GCC
4947   builtin and then its argument prototype would still apply.  */
4948#ifdef __cplusplus
4949extern "C"
4950#endif
4951char setsockopt ();
4952int
4953main ()
4954{
4955return setsockopt ();
4956  ;
4957  return 0;
4958}
4959_ACEOF
4960rm -f conftest.$ac_objext conftest$ac_exeext
4961if { (ac_try="$ac_link"
4962case "(($ac_try" in
4963  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4964  *) ac_try_echo=$ac_try;;
4965esac
4966eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4967  (eval "$ac_link") 2>conftest.er1
4968  ac_status=$?
4969  grep -v '^ *+' conftest.er1 >conftest.err
4970  rm -f conftest.er1
4971  cat conftest.err >&5
4972  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4973  (exit $ac_status); } && {
4974	 test -z "$ac_c_werror_flag" ||
4975	 test ! -s conftest.err
4976       } && test -s conftest$ac_exeext &&
4977       $as_test_x conftest$ac_exeext; then
4978  ac_cv_lib_socket_setsockopt=yes
4979else
4980  echo "$as_me: failed program was:" >&5
4981sed 's/^/| /' conftest.$ac_ext >&5
4982
4983	ac_cv_lib_socket_setsockopt=no
4984fi
4985
4986rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4987      conftest$ac_exeext conftest.$ac_ext
4988LIBS=$ac_check_lib_save_LIBS
4989fi
4990{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5
4991echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6; }
4992if test $ac_cv_lib_socket_setsockopt = yes; then
4993  LIBS="$LIBS -lsocket"
4994else
4995  tcl_checkBoth=1
4996fi
4997
4998fi
4999
5000    fi
5001    if test "$tcl_checkBoth" = 1; then
5002	tk_oldLibs=$LIBS
5003	LIBS="$LIBS -lsocket -lnsl"
5004	{ echo "$as_me:$LINENO: checking for accept" >&5
5005echo $ECHO_N "checking for accept... $ECHO_C" >&6; }
5006if test "${ac_cv_func_accept+set}" = set; then
5007  echo $ECHO_N "(cached) $ECHO_C" >&6
5008else
5009  cat >conftest.$ac_ext <<_ACEOF
5010/* confdefs.h.  */
5011_ACEOF
5012cat confdefs.h >>conftest.$ac_ext
5013cat >>conftest.$ac_ext <<_ACEOF
5014/* end confdefs.h.  */
5015/* Define accept to an innocuous variant, in case <limits.h> declares accept.
5016   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5017#define accept innocuous_accept
5018
5019/* System header to define __stub macros and hopefully few prototypes,
5020    which can conflict with char accept (); below.
5021    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5022    <limits.h> exists even on freestanding compilers.  */
5023
5024#ifdef __STDC__
5025# include <limits.h>
5026#else
5027# include <assert.h>
5028#endif
5029
5030#undef accept
5031
5032/* Override any GCC internal prototype to avoid an error.
5033   Use char because int might match the return type of a GCC
5034   builtin and then its argument prototype would still apply.  */
5035#ifdef __cplusplus
5036extern "C"
5037#endif
5038char accept ();
5039/* The GNU C library defines this for functions which it implements
5040    to always fail with ENOSYS.  Some functions are actually named
5041    something starting with __ and the normal name is an alias.  */
5042#if defined __stub_accept || defined __stub___accept
5043choke me
5044#endif
5045
5046int
5047main ()
5048{
5049return accept ();
5050  ;
5051  return 0;
5052}
5053_ACEOF
5054rm -f conftest.$ac_objext conftest$ac_exeext
5055if { (ac_try="$ac_link"
5056case "(($ac_try" in
5057  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5058  *) ac_try_echo=$ac_try;;
5059esac
5060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5061  (eval "$ac_link") 2>conftest.er1
5062  ac_status=$?
5063  grep -v '^ *+' conftest.er1 >conftest.err
5064  rm -f conftest.er1
5065  cat conftest.err >&5
5066  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5067  (exit $ac_status); } && {
5068	 test -z "$ac_c_werror_flag" ||
5069	 test ! -s conftest.err
5070       } && test -s conftest$ac_exeext &&
5071       $as_test_x conftest$ac_exeext; then
5072  ac_cv_func_accept=yes
5073else
5074  echo "$as_me: failed program was:" >&5
5075sed 's/^/| /' conftest.$ac_ext >&5
5076
5077	ac_cv_func_accept=no
5078fi
5079
5080rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5081      conftest$ac_exeext conftest.$ac_ext
5082fi
5083{ echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5
5084echo "${ECHO_T}$ac_cv_func_accept" >&6; }
5085if test $ac_cv_func_accept = yes; then
5086  tcl_checkNsl=0
5087else
5088  LIBS=$tk_oldLibs
5089fi
5090
5091    fi
5092    { echo "$as_me:$LINENO: checking for gethostbyname" >&5
5093echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; }
5094if test "${ac_cv_func_gethostbyname+set}" = set; then
5095  echo $ECHO_N "(cached) $ECHO_C" >&6
5096else
5097  cat >conftest.$ac_ext <<_ACEOF
5098/* confdefs.h.  */
5099_ACEOF
5100cat confdefs.h >>conftest.$ac_ext
5101cat >>conftest.$ac_ext <<_ACEOF
5102/* end confdefs.h.  */
5103/* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
5104   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5105#define gethostbyname innocuous_gethostbyname
5106
5107/* System header to define __stub macros and hopefully few prototypes,
5108    which can conflict with char gethostbyname (); below.
5109    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5110    <limits.h> exists even on freestanding compilers.  */
5111
5112#ifdef __STDC__
5113# include <limits.h>
5114#else
5115# include <assert.h>
5116#endif
5117
5118#undef gethostbyname
5119
5120/* Override any GCC internal prototype to avoid an error.
5121   Use char because int might match the return type of a GCC
5122   builtin and then its argument prototype would still apply.  */
5123#ifdef __cplusplus
5124extern "C"
5125#endif
5126char gethostbyname ();
5127/* The GNU C library defines this for functions which it implements
5128    to always fail with ENOSYS.  Some functions are actually named
5129    something starting with __ and the normal name is an alias.  */
5130#if defined __stub_gethostbyname || defined __stub___gethostbyname
5131choke me
5132#endif
5133
5134int
5135main ()
5136{
5137return gethostbyname ();
5138  ;
5139  return 0;
5140}
5141_ACEOF
5142rm -f conftest.$ac_objext conftest$ac_exeext
5143if { (ac_try="$ac_link"
5144case "(($ac_try" in
5145  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5146  *) ac_try_echo=$ac_try;;
5147esac
5148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5149  (eval "$ac_link") 2>conftest.er1
5150  ac_status=$?
5151  grep -v '^ *+' conftest.er1 >conftest.err
5152  rm -f conftest.er1
5153  cat conftest.err >&5
5154  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5155  (exit $ac_status); } && {
5156	 test -z "$ac_c_werror_flag" ||
5157	 test ! -s conftest.err
5158       } && test -s conftest$ac_exeext &&
5159       $as_test_x conftest$ac_exeext; then
5160  ac_cv_func_gethostbyname=yes
5161else
5162  echo "$as_me: failed program was:" >&5
5163sed 's/^/| /' conftest.$ac_ext >&5
5164
5165	ac_cv_func_gethostbyname=no
5166fi
5167
5168rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5169      conftest$ac_exeext conftest.$ac_ext
5170fi
5171{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
5172echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; }
5173if test $ac_cv_func_gethostbyname = yes; then
5174  :
5175else
5176  { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
5177echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; }
5178if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
5179  echo $ECHO_N "(cached) $ECHO_C" >&6
5180else
5181  ac_check_lib_save_LIBS=$LIBS
5182LIBS="-lnsl  $LIBS"
5183cat >conftest.$ac_ext <<_ACEOF
5184/* confdefs.h.  */
5185_ACEOF
5186cat confdefs.h >>conftest.$ac_ext
5187cat >>conftest.$ac_ext <<_ACEOF
5188/* end confdefs.h.  */
5189
5190/* Override any GCC internal prototype to avoid an error.
5191   Use char because int might match the return type of a GCC
5192   builtin and then its argument prototype would still apply.  */
5193#ifdef __cplusplus
5194extern "C"
5195#endif
5196char gethostbyname ();
5197int
5198main ()
5199{
5200return gethostbyname ();
5201  ;
5202  return 0;
5203}
5204_ACEOF
5205rm -f conftest.$ac_objext conftest$ac_exeext
5206if { (ac_try="$ac_link"
5207case "(($ac_try" in
5208  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5209  *) ac_try_echo=$ac_try;;
5210esac
5211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5212  (eval "$ac_link") 2>conftest.er1
5213  ac_status=$?
5214  grep -v '^ *+' conftest.er1 >conftest.err
5215  rm -f conftest.er1
5216  cat conftest.err >&5
5217  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5218  (exit $ac_status); } && {
5219	 test -z "$ac_c_werror_flag" ||
5220	 test ! -s conftest.err
5221       } && test -s conftest$ac_exeext &&
5222       $as_test_x conftest$ac_exeext; then
5223  ac_cv_lib_nsl_gethostbyname=yes
5224else
5225  echo "$as_me: failed program was:" >&5
5226sed 's/^/| /' conftest.$ac_ext >&5
5227
5228	ac_cv_lib_nsl_gethostbyname=no
5229fi
5230
5231rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5232      conftest$ac_exeext conftest.$ac_ext
5233LIBS=$ac_check_lib_save_LIBS
5234fi
5235{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
5236echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; }
5237if test $ac_cv_lib_nsl_gethostbyname = yes; then
5238  LIBS="$LIBS -lnsl"
5239fi
5240
5241fi
5242
5243
5244    # TEA specific: Don't perform the eval of the libraries here because
5245    # DL_LIBS won't be set until we call TEA_CONFIG_CFLAGS
5246
5247    TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}'
5248
5249
5250
5251
5252    { echo "$as_me:$LINENO: checking dirent.h" >&5
5253echo $ECHO_N "checking dirent.h... $ECHO_C" >&6; }
5254if test "${tcl_cv_dirent_h+set}" = set; then
5255  echo $ECHO_N "(cached) $ECHO_C" >&6
5256else
5257
5258    cat >conftest.$ac_ext <<_ACEOF
5259/* confdefs.h.  */
5260_ACEOF
5261cat confdefs.h >>conftest.$ac_ext
5262cat >>conftest.$ac_ext <<_ACEOF
5263/* end confdefs.h.  */
5264#include <sys/types.h>
5265#include <dirent.h>
5266int
5267main ()
5268{
5269
5270#ifndef _POSIX_SOURCE
5271#   ifdef __Lynx__
5272	/*
5273	 * Generate compilation error to make the test fail:  Lynx headers
5274	 * are only valid if really in the POSIX environment.
5275	 */
5276
5277	missing_procedure();
5278#   endif
5279#endif
5280DIR *d;
5281struct dirent *entryPtr;
5282char *p;
5283d = opendir("foobar");
5284entryPtr = readdir(d);
5285p = entryPtr->d_name;
5286closedir(d);
5287
5288  ;
5289  return 0;
5290}
5291_ACEOF
5292rm -f conftest.$ac_objext conftest$ac_exeext
5293if { (ac_try="$ac_link"
5294case "(($ac_try" in
5295  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5296  *) ac_try_echo=$ac_try;;
5297esac
5298eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5299  (eval "$ac_link") 2>conftest.er1
5300  ac_status=$?
5301  grep -v '^ *+' conftest.er1 >conftest.err
5302  rm -f conftest.er1
5303  cat conftest.err >&5
5304  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5305  (exit $ac_status); } && {
5306	 test -z "$ac_c_werror_flag" ||
5307	 test ! -s conftest.err
5308       } && test -s conftest$ac_exeext &&
5309       $as_test_x conftest$ac_exeext; then
5310  tcl_cv_dirent_h=yes
5311else
5312  echo "$as_me: failed program was:" >&5
5313sed 's/^/| /' conftest.$ac_ext >&5
5314
5315	tcl_cv_dirent_h=no
5316fi
5317
5318rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5319      conftest$ac_exeext conftest.$ac_ext
5320fi
5321{ echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5
5322echo "${ECHO_T}$tcl_cv_dirent_h" >&6; }
5323
5324    if test $tcl_cv_dirent_h = no; then
5325
5326cat >>confdefs.h <<\_ACEOF
5327#define NO_DIRENT_H 1
5328_ACEOF
5329
5330    fi
5331
5332    # TEA specific:
5333    if test "${ac_cv_header_errno_h+set}" = set; then
5334  { echo "$as_me:$LINENO: checking for errno.h" >&5
5335echo $ECHO_N "checking for errno.h... $ECHO_C" >&6; }
5336if test "${ac_cv_header_errno_h+set}" = set; then
5337  echo $ECHO_N "(cached) $ECHO_C" >&6
5338fi
5339{ echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
5340echo "${ECHO_T}$ac_cv_header_errno_h" >&6; }
5341else
5342  # Is the header compilable?
5343{ echo "$as_me:$LINENO: checking errno.h usability" >&5
5344echo $ECHO_N "checking errno.h usability... $ECHO_C" >&6; }
5345cat >conftest.$ac_ext <<_ACEOF
5346/* confdefs.h.  */
5347_ACEOF
5348cat confdefs.h >>conftest.$ac_ext
5349cat >>conftest.$ac_ext <<_ACEOF
5350/* end confdefs.h.  */
5351$ac_includes_default
5352#include <errno.h>
5353_ACEOF
5354rm -f conftest.$ac_objext
5355if { (ac_try="$ac_compile"
5356case "(($ac_try" in
5357  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5358  *) ac_try_echo=$ac_try;;
5359esac
5360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5361  (eval "$ac_compile") 2>conftest.er1
5362  ac_status=$?
5363  grep -v '^ *+' conftest.er1 >conftest.err
5364  rm -f conftest.er1
5365  cat conftest.err >&5
5366  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5367  (exit $ac_status); } && {
5368	 test -z "$ac_c_werror_flag" ||
5369	 test ! -s conftest.err
5370       } && test -s conftest.$ac_objext; then
5371  ac_header_compiler=yes
5372else
5373  echo "$as_me: failed program was:" >&5
5374sed 's/^/| /' conftest.$ac_ext >&5
5375
5376	ac_header_compiler=no
5377fi
5378
5379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5380{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5381echo "${ECHO_T}$ac_header_compiler" >&6; }
5382
5383# Is the header present?
5384{ echo "$as_me:$LINENO: checking errno.h presence" >&5
5385echo $ECHO_N "checking errno.h presence... $ECHO_C" >&6; }
5386cat >conftest.$ac_ext <<_ACEOF
5387/* confdefs.h.  */
5388_ACEOF
5389cat confdefs.h >>conftest.$ac_ext
5390cat >>conftest.$ac_ext <<_ACEOF
5391/* end confdefs.h.  */
5392#include <errno.h>
5393_ACEOF
5394if { (ac_try="$ac_cpp conftest.$ac_ext"
5395case "(($ac_try" in
5396  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5397  *) ac_try_echo=$ac_try;;
5398esac
5399eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5400  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5401  ac_status=$?
5402  grep -v '^ *+' conftest.er1 >conftest.err
5403  rm -f conftest.er1
5404  cat conftest.err >&5
5405  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5406  (exit $ac_status); } >/dev/null && {
5407	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5408	 test ! -s conftest.err
5409       }; then
5410  ac_header_preproc=yes
5411else
5412  echo "$as_me: failed program was:" >&5
5413sed 's/^/| /' conftest.$ac_ext >&5
5414
5415  ac_header_preproc=no
5416fi
5417
5418rm -f conftest.err conftest.$ac_ext
5419{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5420echo "${ECHO_T}$ac_header_preproc" >&6; }
5421
5422# So?  What about this header?
5423case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5424  yes:no: )
5425    { echo "$as_me:$LINENO: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
5426echo "$as_me: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5427    { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the compiler's result" >&5
5428echo "$as_me: WARNING: errno.h: proceeding with the compiler's result" >&2;}
5429    ac_header_preproc=yes
5430    ;;
5431  no:yes:* )
5432    { echo "$as_me:$LINENO: WARNING: errno.h: present but cannot be compiled" >&5
5433echo "$as_me: WARNING: errno.h: present but cannot be compiled" >&2;}
5434    { echo "$as_me:$LINENO: WARNING: errno.h:     check for missing prerequisite headers?" >&5
5435echo "$as_me: WARNING: errno.h:     check for missing prerequisite headers?" >&2;}
5436    { echo "$as_me:$LINENO: WARNING: errno.h: see the Autoconf documentation" >&5
5437echo "$as_me: WARNING: errno.h: see the Autoconf documentation" >&2;}
5438    { echo "$as_me:$LINENO: WARNING: errno.h:     section \"Present But Cannot Be Compiled\"" >&5
5439echo "$as_me: WARNING: errno.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5440    { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the preprocessor's result" >&5
5441echo "$as_me: WARNING: errno.h: proceeding with the preprocessor's result" >&2;}
5442    { echo "$as_me:$LINENO: WARNING: errno.h: in the future, the compiler will take precedence" >&5
5443echo "$as_me: WARNING: errno.h: in the future, the compiler will take precedence" >&2;}
5444
5445    ;;
5446esac
5447{ echo "$as_me:$LINENO: checking for errno.h" >&5
5448echo $ECHO_N "checking for errno.h... $ECHO_C" >&6; }
5449if test "${ac_cv_header_errno_h+set}" = set; then
5450  echo $ECHO_N "(cached) $ECHO_C" >&6
5451else
5452  ac_cv_header_errno_h=$ac_header_preproc
5453fi
5454{ echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
5455echo "${ECHO_T}$ac_cv_header_errno_h" >&6; }
5456
5457fi
5458if test $ac_cv_header_errno_h = yes; then
5459  :
5460else
5461
5462cat >>confdefs.h <<\_ACEOF
5463#define NO_ERRNO_H 1
5464_ACEOF
5465
5466fi
5467
5468
5469    if test "${ac_cv_header_float_h+set}" = set; then
5470  { echo "$as_me:$LINENO: checking for float.h" >&5
5471echo $ECHO_N "checking for float.h... $ECHO_C" >&6; }
5472if test "${ac_cv_header_float_h+set}" = set; then
5473  echo $ECHO_N "(cached) $ECHO_C" >&6
5474fi
5475{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
5476echo "${ECHO_T}$ac_cv_header_float_h" >&6; }
5477else
5478  # Is the header compilable?
5479{ echo "$as_me:$LINENO: checking float.h usability" >&5
5480echo $ECHO_N "checking float.h usability... $ECHO_C" >&6; }
5481cat >conftest.$ac_ext <<_ACEOF
5482/* confdefs.h.  */
5483_ACEOF
5484cat confdefs.h >>conftest.$ac_ext
5485cat >>conftest.$ac_ext <<_ACEOF
5486/* end confdefs.h.  */
5487$ac_includes_default
5488#include <float.h>
5489_ACEOF
5490rm -f conftest.$ac_objext
5491if { (ac_try="$ac_compile"
5492case "(($ac_try" in
5493  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5494  *) ac_try_echo=$ac_try;;
5495esac
5496eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5497  (eval "$ac_compile") 2>conftest.er1
5498  ac_status=$?
5499  grep -v '^ *+' conftest.er1 >conftest.err
5500  rm -f conftest.er1
5501  cat conftest.err >&5
5502  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5503  (exit $ac_status); } && {
5504	 test -z "$ac_c_werror_flag" ||
5505	 test ! -s conftest.err
5506       } && test -s conftest.$ac_objext; then
5507  ac_header_compiler=yes
5508else
5509  echo "$as_me: failed program was:" >&5
5510sed 's/^/| /' conftest.$ac_ext >&5
5511
5512	ac_header_compiler=no
5513fi
5514
5515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5516{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5517echo "${ECHO_T}$ac_header_compiler" >&6; }
5518
5519# Is the header present?
5520{ echo "$as_me:$LINENO: checking float.h presence" >&5
5521echo $ECHO_N "checking float.h presence... $ECHO_C" >&6; }
5522cat >conftest.$ac_ext <<_ACEOF
5523/* confdefs.h.  */
5524_ACEOF
5525cat confdefs.h >>conftest.$ac_ext
5526cat >>conftest.$ac_ext <<_ACEOF
5527/* end confdefs.h.  */
5528#include <float.h>
5529_ACEOF
5530if { (ac_try="$ac_cpp conftest.$ac_ext"
5531case "(($ac_try" in
5532  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5533  *) ac_try_echo=$ac_try;;
5534esac
5535eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5536  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5537  ac_status=$?
5538  grep -v '^ *+' conftest.er1 >conftest.err
5539  rm -f conftest.er1
5540  cat conftest.err >&5
5541  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5542  (exit $ac_status); } >/dev/null && {
5543	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5544	 test ! -s conftest.err
5545       }; then
5546  ac_header_preproc=yes
5547else
5548  echo "$as_me: failed program was:" >&5
5549sed 's/^/| /' conftest.$ac_ext >&5
5550
5551  ac_header_preproc=no
5552fi
5553
5554rm -f conftest.err conftest.$ac_ext
5555{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5556echo "${ECHO_T}$ac_header_preproc" >&6; }
5557
5558# So?  What about this header?
5559case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5560  yes:no: )
5561    { echo "$as_me:$LINENO: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&5
5562echo "$as_me: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5563    { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the compiler's result" >&5
5564echo "$as_me: WARNING: float.h: proceeding with the compiler's result" >&2;}
5565    ac_header_preproc=yes
5566    ;;
5567  no:yes:* )
5568    { echo "$as_me:$LINENO: WARNING: float.h: present but cannot be compiled" >&5
5569echo "$as_me: WARNING: float.h: present but cannot be compiled" >&2;}
5570    { echo "$as_me:$LINENO: WARNING: float.h:     check for missing prerequisite headers?" >&5
5571echo "$as_me: WARNING: float.h:     check for missing prerequisite headers?" >&2;}
5572    { echo "$as_me:$LINENO: WARNING: float.h: see the Autoconf documentation" >&5
5573echo "$as_me: WARNING: float.h: see the Autoconf documentation" >&2;}
5574    { echo "$as_me:$LINENO: WARNING: float.h:     section \"Present But Cannot Be Compiled\"" >&5
5575echo "$as_me: WARNING: float.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5576    { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the preprocessor's result" >&5
5577echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;}
5578    { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5
5579echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;}
5580
5581    ;;
5582esac
5583{ echo "$as_me:$LINENO: checking for float.h" >&5
5584echo $ECHO_N "checking for float.h... $ECHO_C" >&6; }
5585if test "${ac_cv_header_float_h+set}" = set; then
5586  echo $ECHO_N "(cached) $ECHO_C" >&6
5587else
5588  ac_cv_header_float_h=$ac_header_preproc
5589fi
5590{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
5591echo "${ECHO_T}$ac_cv_header_float_h" >&6; }
5592
5593fi
5594if test $ac_cv_header_float_h = yes; then
5595  :
5596else
5597
5598cat >>confdefs.h <<\_ACEOF
5599#define NO_FLOAT_H 1
5600_ACEOF
5601
5602fi
5603
5604
5605    if test "${ac_cv_header_values_h+set}" = set; then
5606  { echo "$as_me:$LINENO: checking for values.h" >&5
5607echo $ECHO_N "checking for values.h... $ECHO_C" >&6; }
5608if test "${ac_cv_header_values_h+set}" = set; then
5609  echo $ECHO_N "(cached) $ECHO_C" >&6
5610fi
5611{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
5612echo "${ECHO_T}$ac_cv_header_values_h" >&6; }
5613else
5614  # Is the header compilable?
5615{ echo "$as_me:$LINENO: checking values.h usability" >&5
5616echo $ECHO_N "checking values.h usability... $ECHO_C" >&6; }
5617cat >conftest.$ac_ext <<_ACEOF
5618/* confdefs.h.  */
5619_ACEOF
5620cat confdefs.h >>conftest.$ac_ext
5621cat >>conftest.$ac_ext <<_ACEOF
5622/* end confdefs.h.  */
5623$ac_includes_default
5624#include <values.h>
5625_ACEOF
5626rm -f conftest.$ac_objext
5627if { (ac_try="$ac_compile"
5628case "(($ac_try" in
5629  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5630  *) ac_try_echo=$ac_try;;
5631esac
5632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5633  (eval "$ac_compile") 2>conftest.er1
5634  ac_status=$?
5635  grep -v '^ *+' conftest.er1 >conftest.err
5636  rm -f conftest.er1
5637  cat conftest.err >&5
5638  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5639  (exit $ac_status); } && {
5640	 test -z "$ac_c_werror_flag" ||
5641	 test ! -s conftest.err
5642       } && test -s conftest.$ac_objext; then
5643  ac_header_compiler=yes
5644else
5645  echo "$as_me: failed program was:" >&5
5646sed 's/^/| /' conftest.$ac_ext >&5
5647
5648	ac_header_compiler=no
5649fi
5650
5651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5652{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5653echo "${ECHO_T}$ac_header_compiler" >&6; }
5654
5655# Is the header present?
5656{ echo "$as_me:$LINENO: checking values.h presence" >&5
5657echo $ECHO_N "checking values.h presence... $ECHO_C" >&6; }
5658cat >conftest.$ac_ext <<_ACEOF
5659/* confdefs.h.  */
5660_ACEOF
5661cat confdefs.h >>conftest.$ac_ext
5662cat >>conftest.$ac_ext <<_ACEOF
5663/* end confdefs.h.  */
5664#include <values.h>
5665_ACEOF
5666if { (ac_try="$ac_cpp conftest.$ac_ext"
5667case "(($ac_try" in
5668  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5669  *) ac_try_echo=$ac_try;;
5670esac
5671eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5672  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5673  ac_status=$?
5674  grep -v '^ *+' conftest.er1 >conftest.err
5675  rm -f conftest.er1
5676  cat conftest.err >&5
5677  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5678  (exit $ac_status); } >/dev/null && {
5679	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5680	 test ! -s conftest.err
5681       }; then
5682  ac_header_preproc=yes
5683else
5684  echo "$as_me: failed program was:" >&5
5685sed 's/^/| /' conftest.$ac_ext >&5
5686
5687  ac_header_preproc=no
5688fi
5689
5690rm -f conftest.err conftest.$ac_ext
5691{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5692echo "${ECHO_T}$ac_header_preproc" >&6; }
5693
5694# So?  What about this header?
5695case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5696  yes:no: )
5697    { echo "$as_me:$LINENO: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&5
5698echo "$as_me: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5699    { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the compiler's result" >&5
5700echo "$as_me: WARNING: values.h: proceeding with the compiler's result" >&2;}
5701    ac_header_preproc=yes
5702    ;;
5703  no:yes:* )
5704    { echo "$as_me:$LINENO: WARNING: values.h: present but cannot be compiled" >&5
5705echo "$as_me: WARNING: values.h: present but cannot be compiled" >&2;}
5706    { echo "$as_me:$LINENO: WARNING: values.h:     check for missing prerequisite headers?" >&5
5707echo "$as_me: WARNING: values.h:     check for missing prerequisite headers?" >&2;}
5708    { echo "$as_me:$LINENO: WARNING: values.h: see the Autoconf documentation" >&5
5709echo "$as_me: WARNING: values.h: see the Autoconf documentation" >&2;}
5710    { echo "$as_me:$LINENO: WARNING: values.h:     section \"Present But Cannot Be Compiled\"" >&5
5711echo "$as_me: WARNING: values.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5712    { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the preprocessor's result" >&5
5713echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;}
5714    { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5
5715echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;}
5716
5717    ;;
5718esac
5719{ echo "$as_me:$LINENO: checking for values.h" >&5
5720echo $ECHO_N "checking for values.h... $ECHO_C" >&6; }
5721if test "${ac_cv_header_values_h+set}" = set; then
5722  echo $ECHO_N "(cached) $ECHO_C" >&6
5723else
5724  ac_cv_header_values_h=$ac_header_preproc
5725fi
5726{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
5727echo "${ECHO_T}$ac_cv_header_values_h" >&6; }
5728
5729fi
5730if test $ac_cv_header_values_h = yes; then
5731  :
5732else
5733
5734cat >>confdefs.h <<\_ACEOF
5735#define NO_VALUES_H 1
5736_ACEOF
5737
5738fi
5739
5740
5741    if test "${ac_cv_header_limits_h+set}" = set; then
5742  { echo "$as_me:$LINENO: checking for limits.h" >&5
5743echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; }
5744if test "${ac_cv_header_limits_h+set}" = set; then
5745  echo $ECHO_N "(cached) $ECHO_C" >&6
5746fi
5747{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
5748echo "${ECHO_T}$ac_cv_header_limits_h" >&6; }
5749else
5750  # Is the header compilable?
5751{ echo "$as_me:$LINENO: checking limits.h usability" >&5
5752echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6; }
5753cat >conftest.$ac_ext <<_ACEOF
5754/* confdefs.h.  */
5755_ACEOF
5756cat confdefs.h >>conftest.$ac_ext
5757cat >>conftest.$ac_ext <<_ACEOF
5758/* end confdefs.h.  */
5759$ac_includes_default
5760#include <limits.h>
5761_ACEOF
5762rm -f conftest.$ac_objext
5763if { (ac_try="$ac_compile"
5764case "(($ac_try" in
5765  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5766  *) ac_try_echo=$ac_try;;
5767esac
5768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5769  (eval "$ac_compile") 2>conftest.er1
5770  ac_status=$?
5771  grep -v '^ *+' conftest.er1 >conftest.err
5772  rm -f conftest.er1
5773  cat conftest.err >&5
5774  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5775  (exit $ac_status); } && {
5776	 test -z "$ac_c_werror_flag" ||
5777	 test ! -s conftest.err
5778       } && test -s conftest.$ac_objext; then
5779  ac_header_compiler=yes
5780else
5781  echo "$as_me: failed program was:" >&5
5782sed 's/^/| /' conftest.$ac_ext >&5
5783
5784	ac_header_compiler=no
5785fi
5786
5787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5788{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5789echo "${ECHO_T}$ac_header_compiler" >&6; }
5790
5791# Is the header present?
5792{ echo "$as_me:$LINENO: checking limits.h presence" >&5
5793echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6; }
5794cat >conftest.$ac_ext <<_ACEOF
5795/* confdefs.h.  */
5796_ACEOF
5797cat confdefs.h >>conftest.$ac_ext
5798cat >>conftest.$ac_ext <<_ACEOF
5799/* end confdefs.h.  */
5800#include <limits.h>
5801_ACEOF
5802if { (ac_try="$ac_cpp conftest.$ac_ext"
5803case "(($ac_try" in
5804  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5805  *) ac_try_echo=$ac_try;;
5806esac
5807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5808  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5809  ac_status=$?
5810  grep -v '^ *+' conftest.er1 >conftest.err
5811  rm -f conftest.er1
5812  cat conftest.err >&5
5813  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5814  (exit $ac_status); } >/dev/null && {
5815	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5816	 test ! -s conftest.err
5817       }; then
5818  ac_header_preproc=yes
5819else
5820  echo "$as_me: failed program was:" >&5
5821sed 's/^/| /' conftest.$ac_ext >&5
5822
5823  ac_header_preproc=no
5824fi
5825
5826rm -f conftest.err conftest.$ac_ext
5827{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5828echo "${ECHO_T}$ac_header_preproc" >&6; }
5829
5830# So?  What about this header?
5831case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5832  yes:no: )
5833    { echo "$as_me:$LINENO: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&5
5834echo "$as_me: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5835    { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the compiler's result" >&5
5836echo "$as_me: WARNING: limits.h: proceeding with the compiler's result" >&2;}
5837    ac_header_preproc=yes
5838    ;;
5839  no:yes:* )
5840    { echo "$as_me:$LINENO: WARNING: limits.h: present but cannot be compiled" >&5
5841echo "$as_me: WARNING: limits.h: present but cannot be compiled" >&2;}
5842    { echo "$as_me:$LINENO: WARNING: limits.h:     check for missing prerequisite headers?" >&5
5843echo "$as_me: WARNING: limits.h:     check for missing prerequisite headers?" >&2;}
5844    { echo "$as_me:$LINENO: WARNING: limits.h: see the Autoconf documentation" >&5
5845echo "$as_me: WARNING: limits.h: see the Autoconf documentation" >&2;}
5846    { echo "$as_me:$LINENO: WARNING: limits.h:     section \"Present But Cannot Be Compiled\"" >&5
5847echo "$as_me: WARNING: limits.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5848    { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the preprocessor's result" >&5
5849echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;}
5850    { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5
5851echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;}
5852
5853    ;;
5854esac
5855{ echo "$as_me:$LINENO: checking for limits.h" >&5
5856echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; }
5857if test "${ac_cv_header_limits_h+set}" = set; then
5858  echo $ECHO_N "(cached) $ECHO_C" >&6
5859else
5860  ac_cv_header_limits_h=$ac_header_preproc
5861fi
5862{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
5863echo "${ECHO_T}$ac_cv_header_limits_h" >&6; }
5864
5865fi
5866if test $ac_cv_header_limits_h = yes; then
5867
5868cat >>confdefs.h <<\_ACEOF
5869#define HAVE_LIMITS_H 1
5870_ACEOF
5871
5872else
5873
5874cat >>confdefs.h <<\_ACEOF
5875#define NO_LIMITS_H 1
5876_ACEOF
5877
5878fi
5879
5880
5881    if test "${ac_cv_header_stdlib_h+set}" = set; then
5882  { echo "$as_me:$LINENO: checking for stdlib.h" >&5
5883echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; }
5884if test "${ac_cv_header_stdlib_h+set}" = set; then
5885  echo $ECHO_N "(cached) $ECHO_C" >&6
5886fi
5887{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
5888echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; }
5889else
5890  # Is the header compilable?
5891{ echo "$as_me:$LINENO: checking stdlib.h usability" >&5
5892echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6; }
5893cat >conftest.$ac_ext <<_ACEOF
5894/* confdefs.h.  */
5895_ACEOF
5896cat confdefs.h >>conftest.$ac_ext
5897cat >>conftest.$ac_ext <<_ACEOF
5898/* end confdefs.h.  */
5899$ac_includes_default
5900#include <stdlib.h>
5901_ACEOF
5902rm -f conftest.$ac_objext
5903if { (ac_try="$ac_compile"
5904case "(($ac_try" in
5905  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5906  *) ac_try_echo=$ac_try;;
5907esac
5908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5909  (eval "$ac_compile") 2>conftest.er1
5910  ac_status=$?
5911  grep -v '^ *+' conftest.er1 >conftest.err
5912  rm -f conftest.er1
5913  cat conftest.err >&5
5914  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5915  (exit $ac_status); } && {
5916	 test -z "$ac_c_werror_flag" ||
5917	 test ! -s conftest.err
5918       } && test -s conftest.$ac_objext; then
5919  ac_header_compiler=yes
5920else
5921  echo "$as_me: failed program was:" >&5
5922sed 's/^/| /' conftest.$ac_ext >&5
5923
5924	ac_header_compiler=no
5925fi
5926
5927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5928{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5929echo "${ECHO_T}$ac_header_compiler" >&6; }
5930
5931# Is the header present?
5932{ echo "$as_me:$LINENO: checking stdlib.h presence" >&5
5933echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6; }
5934cat >conftest.$ac_ext <<_ACEOF
5935/* confdefs.h.  */
5936_ACEOF
5937cat confdefs.h >>conftest.$ac_ext
5938cat >>conftest.$ac_ext <<_ACEOF
5939/* end confdefs.h.  */
5940#include <stdlib.h>
5941_ACEOF
5942if { (ac_try="$ac_cpp conftest.$ac_ext"
5943case "(($ac_try" in
5944  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5945  *) ac_try_echo=$ac_try;;
5946esac
5947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5948  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5949  ac_status=$?
5950  grep -v '^ *+' conftest.er1 >conftest.err
5951  rm -f conftest.er1
5952  cat conftest.err >&5
5953  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5954  (exit $ac_status); } >/dev/null && {
5955	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5956	 test ! -s conftest.err
5957       }; then
5958  ac_header_preproc=yes
5959else
5960  echo "$as_me: failed program was:" >&5
5961sed 's/^/| /' conftest.$ac_ext >&5
5962
5963  ac_header_preproc=no
5964fi
5965
5966rm -f conftest.err conftest.$ac_ext
5967{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5968echo "${ECHO_T}$ac_header_preproc" >&6; }
5969
5970# So?  What about this header?
5971case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5972  yes:no: )
5973    { echo "$as_me:$LINENO: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
5974echo "$as_me: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5975    { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the compiler's result" >&5
5976echo "$as_me: WARNING: stdlib.h: proceeding with the compiler's result" >&2;}
5977    ac_header_preproc=yes
5978    ;;
5979  no:yes:* )
5980    { echo "$as_me:$LINENO: WARNING: stdlib.h: present but cannot be compiled" >&5
5981echo "$as_me: WARNING: stdlib.h: present but cannot be compiled" >&2;}
5982    { echo "$as_me:$LINENO: WARNING: stdlib.h:     check for missing prerequisite headers?" >&5
5983echo "$as_me: WARNING: stdlib.h:     check for missing prerequisite headers?" >&2;}
5984    { echo "$as_me:$LINENO: WARNING: stdlib.h: see the Autoconf documentation" >&5
5985echo "$as_me: WARNING: stdlib.h: see the Autoconf documentation" >&2;}
5986    { echo "$as_me:$LINENO: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&5
5987echo "$as_me: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5988    { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the preprocessor's result" >&5
5989echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;}
5990    { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5
5991echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;}
5992
5993    ;;
5994esac
5995{ echo "$as_me:$LINENO: checking for stdlib.h" >&5
5996echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; }
5997if test "${ac_cv_header_stdlib_h+set}" = set; then
5998  echo $ECHO_N "(cached) $ECHO_C" >&6
5999else
6000  ac_cv_header_stdlib_h=$ac_header_preproc
6001fi
6002{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
6003echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; }
6004
6005fi
6006if test $ac_cv_header_stdlib_h = yes; then
6007  tcl_ok=1
6008else
6009  tcl_ok=0
6010fi
6011
6012
6013    cat >conftest.$ac_ext <<_ACEOF
6014/* confdefs.h.  */
6015_ACEOF
6016cat confdefs.h >>conftest.$ac_ext
6017cat >>conftest.$ac_ext <<_ACEOF
6018/* end confdefs.h.  */
6019#include <stdlib.h>
6020
6021_ACEOF
6022if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6023  $EGREP "strtol" >/dev/null 2>&1; then
6024  :
6025else
6026  tcl_ok=0
6027fi
6028rm -f -r conftest*
6029
6030    cat >conftest.$ac_ext <<_ACEOF
6031/* confdefs.h.  */
6032_ACEOF
6033cat confdefs.h >>conftest.$ac_ext
6034cat >>conftest.$ac_ext <<_ACEOF
6035/* end confdefs.h.  */
6036#include <stdlib.h>
6037
6038_ACEOF
6039if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6040  $EGREP "strtoul" >/dev/null 2>&1; then
6041  :
6042else
6043  tcl_ok=0
6044fi
6045rm -f -r conftest*
6046
6047    cat >conftest.$ac_ext <<_ACEOF
6048/* confdefs.h.  */
6049_ACEOF
6050cat confdefs.h >>conftest.$ac_ext
6051cat >>conftest.$ac_ext <<_ACEOF
6052/* end confdefs.h.  */
6053#include <stdlib.h>
6054
6055_ACEOF
6056if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6057  $EGREP "strtod" >/dev/null 2>&1; then
6058  :
6059else
6060  tcl_ok=0
6061fi
6062rm -f -r conftest*
6063
6064    if test $tcl_ok = 0; then
6065
6066cat >>confdefs.h <<\_ACEOF
6067#define NO_STDLIB_H 1
6068_ACEOF
6069
6070    fi
6071    if test "${ac_cv_header_string_h+set}" = set; then
6072  { echo "$as_me:$LINENO: checking for string.h" >&5
6073echo $ECHO_N "checking for string.h... $ECHO_C" >&6; }
6074if test "${ac_cv_header_string_h+set}" = set; then
6075  echo $ECHO_N "(cached) $ECHO_C" >&6
6076fi
6077{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
6078echo "${ECHO_T}$ac_cv_header_string_h" >&6; }
6079else
6080  # Is the header compilable?
6081{ echo "$as_me:$LINENO: checking string.h usability" >&5
6082echo $ECHO_N "checking string.h usability... $ECHO_C" >&6; }
6083cat >conftest.$ac_ext <<_ACEOF
6084/* confdefs.h.  */
6085_ACEOF
6086cat confdefs.h >>conftest.$ac_ext
6087cat >>conftest.$ac_ext <<_ACEOF
6088/* end confdefs.h.  */
6089$ac_includes_default
6090#include <string.h>
6091_ACEOF
6092rm -f conftest.$ac_objext
6093if { (ac_try="$ac_compile"
6094case "(($ac_try" in
6095  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6096  *) ac_try_echo=$ac_try;;
6097esac
6098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6099  (eval "$ac_compile") 2>conftest.er1
6100  ac_status=$?
6101  grep -v '^ *+' conftest.er1 >conftest.err
6102  rm -f conftest.er1
6103  cat conftest.err >&5
6104  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6105  (exit $ac_status); } && {
6106	 test -z "$ac_c_werror_flag" ||
6107	 test ! -s conftest.err
6108       } && test -s conftest.$ac_objext; then
6109  ac_header_compiler=yes
6110else
6111  echo "$as_me: failed program was:" >&5
6112sed 's/^/| /' conftest.$ac_ext >&5
6113
6114	ac_header_compiler=no
6115fi
6116
6117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6118{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6119echo "${ECHO_T}$ac_header_compiler" >&6; }
6120
6121# Is the header present?
6122{ echo "$as_me:$LINENO: checking string.h presence" >&5
6123echo $ECHO_N "checking string.h presence... $ECHO_C" >&6; }
6124cat >conftest.$ac_ext <<_ACEOF
6125/* confdefs.h.  */
6126_ACEOF
6127cat confdefs.h >>conftest.$ac_ext
6128cat >>conftest.$ac_ext <<_ACEOF
6129/* end confdefs.h.  */
6130#include <string.h>
6131_ACEOF
6132if { (ac_try="$ac_cpp conftest.$ac_ext"
6133case "(($ac_try" in
6134  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6135  *) ac_try_echo=$ac_try;;
6136esac
6137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6138  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6139  ac_status=$?
6140  grep -v '^ *+' conftest.er1 >conftest.err
6141  rm -f conftest.er1
6142  cat conftest.err >&5
6143  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6144  (exit $ac_status); } >/dev/null && {
6145	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6146	 test ! -s conftest.err
6147       }; then
6148  ac_header_preproc=yes
6149else
6150  echo "$as_me: failed program was:" >&5
6151sed 's/^/| /' conftest.$ac_ext >&5
6152
6153  ac_header_preproc=no
6154fi
6155
6156rm -f conftest.err conftest.$ac_ext
6157{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6158echo "${ECHO_T}$ac_header_preproc" >&6; }
6159
6160# So?  What about this header?
6161case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6162  yes:no: )
6163    { echo "$as_me:$LINENO: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&5
6164echo "$as_me: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6165    { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the compiler's result" >&5
6166echo "$as_me: WARNING: string.h: proceeding with the compiler's result" >&2;}
6167    ac_header_preproc=yes
6168    ;;
6169  no:yes:* )
6170    { echo "$as_me:$LINENO: WARNING: string.h: present but cannot be compiled" >&5
6171echo "$as_me: WARNING: string.h: present but cannot be compiled" >&2;}
6172    { echo "$as_me:$LINENO: WARNING: string.h:     check for missing prerequisite headers?" >&5
6173echo "$as_me: WARNING: string.h:     check for missing prerequisite headers?" >&2;}
6174    { echo "$as_me:$LINENO: WARNING: string.h: see the Autoconf documentation" >&5
6175echo "$as_me: WARNING: string.h: see the Autoconf documentation" >&2;}
6176    { echo "$as_me:$LINENO: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&5
6177echo "$as_me: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6178    { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the preprocessor's result" >&5
6179echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;}
6180    { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5
6181echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;}
6182
6183    ;;
6184esac
6185{ echo "$as_me:$LINENO: checking for string.h" >&5
6186echo $ECHO_N "checking for string.h... $ECHO_C" >&6; }
6187if test "${ac_cv_header_string_h+set}" = set; then
6188  echo $ECHO_N "(cached) $ECHO_C" >&6
6189else
6190  ac_cv_header_string_h=$ac_header_preproc
6191fi
6192{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
6193echo "${ECHO_T}$ac_cv_header_string_h" >&6; }
6194
6195fi
6196if test $ac_cv_header_string_h = yes; then
6197  tcl_ok=1
6198else
6199  tcl_ok=0
6200fi
6201
6202
6203    cat >conftest.$ac_ext <<_ACEOF
6204/* confdefs.h.  */
6205_ACEOF
6206cat confdefs.h >>conftest.$ac_ext
6207cat >>conftest.$ac_ext <<_ACEOF
6208/* end confdefs.h.  */
6209#include <string.h>
6210
6211_ACEOF
6212if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6213  $EGREP "strstr" >/dev/null 2>&1; then
6214  :
6215else
6216  tcl_ok=0
6217fi
6218rm -f -r conftest*
6219
6220    cat >conftest.$ac_ext <<_ACEOF
6221/* confdefs.h.  */
6222_ACEOF
6223cat confdefs.h >>conftest.$ac_ext
6224cat >>conftest.$ac_ext <<_ACEOF
6225/* end confdefs.h.  */
6226#include <string.h>
6227
6228_ACEOF
6229if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6230  $EGREP "strerror" >/dev/null 2>&1; then
6231  :
6232else
6233  tcl_ok=0
6234fi
6235rm -f -r conftest*
6236
6237
6238    # See also memmove check below for a place where NO_STRING_H can be
6239    # set and why.
6240
6241    if test $tcl_ok = 0; then
6242
6243cat >>confdefs.h <<\_ACEOF
6244#define NO_STRING_H 1
6245_ACEOF
6246
6247    fi
6248
6249    if test "${ac_cv_header_sys_wait_h+set}" = set; then
6250  { echo "$as_me:$LINENO: checking for sys/wait.h" >&5
6251echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; }
6252if test "${ac_cv_header_sys_wait_h+set}" = set; then
6253  echo $ECHO_N "(cached) $ECHO_C" >&6
6254fi
6255{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
6256echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
6257else
6258  # Is the header compilable?
6259{ echo "$as_me:$LINENO: checking sys/wait.h usability" >&5
6260echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6; }
6261cat >conftest.$ac_ext <<_ACEOF
6262/* confdefs.h.  */
6263_ACEOF
6264cat confdefs.h >>conftest.$ac_ext
6265cat >>conftest.$ac_ext <<_ACEOF
6266/* end confdefs.h.  */
6267$ac_includes_default
6268#include <sys/wait.h>
6269_ACEOF
6270rm -f conftest.$ac_objext
6271if { (ac_try="$ac_compile"
6272case "(($ac_try" in
6273  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6274  *) ac_try_echo=$ac_try;;
6275esac
6276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6277  (eval "$ac_compile") 2>conftest.er1
6278  ac_status=$?
6279  grep -v '^ *+' conftest.er1 >conftest.err
6280  rm -f conftest.er1
6281  cat conftest.err >&5
6282  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6283  (exit $ac_status); } && {
6284	 test -z "$ac_c_werror_flag" ||
6285	 test ! -s conftest.err
6286       } && test -s conftest.$ac_objext; then
6287  ac_header_compiler=yes
6288else
6289  echo "$as_me: failed program was:" >&5
6290sed 's/^/| /' conftest.$ac_ext >&5
6291
6292	ac_header_compiler=no
6293fi
6294
6295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6296{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6297echo "${ECHO_T}$ac_header_compiler" >&6; }
6298
6299# Is the header present?
6300{ echo "$as_me:$LINENO: checking sys/wait.h presence" >&5
6301echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6; }
6302cat >conftest.$ac_ext <<_ACEOF
6303/* confdefs.h.  */
6304_ACEOF
6305cat confdefs.h >>conftest.$ac_ext
6306cat >>conftest.$ac_ext <<_ACEOF
6307/* end confdefs.h.  */
6308#include <sys/wait.h>
6309_ACEOF
6310if { (ac_try="$ac_cpp conftest.$ac_ext"
6311case "(($ac_try" in
6312  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6313  *) ac_try_echo=$ac_try;;
6314esac
6315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6316  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6317  ac_status=$?
6318  grep -v '^ *+' conftest.er1 >conftest.err
6319  rm -f conftest.er1
6320  cat conftest.err >&5
6321  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6322  (exit $ac_status); } >/dev/null && {
6323	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6324	 test ! -s conftest.err
6325       }; then
6326  ac_header_preproc=yes
6327else
6328  echo "$as_me: failed program was:" >&5
6329sed 's/^/| /' conftest.$ac_ext >&5
6330
6331  ac_header_preproc=no
6332fi
6333
6334rm -f conftest.err conftest.$ac_ext
6335{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6336echo "${ECHO_T}$ac_header_preproc" >&6; }
6337
6338# So?  What about this header?
6339case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6340  yes:no: )
6341    { echo "$as_me:$LINENO: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&5
6342echo "$as_me: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6343    { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the compiler's result" >&5
6344echo "$as_me: WARNING: sys/wait.h: proceeding with the compiler's result" >&2;}
6345    ac_header_preproc=yes
6346    ;;
6347  no:yes:* )
6348    { echo "$as_me:$LINENO: WARNING: sys/wait.h: present but cannot be compiled" >&5
6349echo "$as_me: WARNING: sys/wait.h: present but cannot be compiled" >&2;}
6350    { echo "$as_me:$LINENO: WARNING: sys/wait.h:     check for missing prerequisite headers?" >&5
6351echo "$as_me: WARNING: sys/wait.h:     check for missing prerequisite headers?" >&2;}
6352    { echo "$as_me:$LINENO: WARNING: sys/wait.h: see the Autoconf documentation" >&5
6353echo "$as_me: WARNING: sys/wait.h: see the Autoconf documentation" >&2;}
6354    { echo "$as_me:$LINENO: WARNING: sys/wait.h:     section \"Present But Cannot Be Compiled\"" >&5
6355echo "$as_me: WARNING: sys/wait.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6356    { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&5
6357echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;}
6358    { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5
6359echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;}
6360
6361    ;;
6362esac
6363{ echo "$as_me:$LINENO: checking for sys/wait.h" >&5
6364echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; }
6365if test "${ac_cv_header_sys_wait_h+set}" = set; then
6366  echo $ECHO_N "(cached) $ECHO_C" >&6
6367else
6368  ac_cv_header_sys_wait_h=$ac_header_preproc
6369fi
6370{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
6371echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
6372
6373fi
6374if test $ac_cv_header_sys_wait_h = yes; then
6375  :
6376else
6377
6378cat >>confdefs.h <<\_ACEOF
6379#define NO_SYS_WAIT_H 1
6380_ACEOF
6381
6382fi
6383
6384
6385    if test "${ac_cv_header_dlfcn_h+set}" = set; then
6386  { echo "$as_me:$LINENO: checking for dlfcn.h" >&5
6387echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; }
6388if test "${ac_cv_header_dlfcn_h+set}" = set; then
6389  echo $ECHO_N "(cached) $ECHO_C" >&6
6390fi
6391{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
6392echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; }
6393else
6394  # Is the header compilable?
6395{ echo "$as_me:$LINENO: checking dlfcn.h usability" >&5
6396echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6; }
6397cat >conftest.$ac_ext <<_ACEOF
6398/* confdefs.h.  */
6399_ACEOF
6400cat confdefs.h >>conftest.$ac_ext
6401cat >>conftest.$ac_ext <<_ACEOF
6402/* end confdefs.h.  */
6403$ac_includes_default
6404#include <dlfcn.h>
6405_ACEOF
6406rm -f conftest.$ac_objext
6407if { (ac_try="$ac_compile"
6408case "(($ac_try" in
6409  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6410  *) ac_try_echo=$ac_try;;
6411esac
6412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6413  (eval "$ac_compile") 2>conftest.er1
6414  ac_status=$?
6415  grep -v '^ *+' conftest.er1 >conftest.err
6416  rm -f conftest.er1
6417  cat conftest.err >&5
6418  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6419  (exit $ac_status); } && {
6420	 test -z "$ac_c_werror_flag" ||
6421	 test ! -s conftest.err
6422       } && test -s conftest.$ac_objext; then
6423  ac_header_compiler=yes
6424else
6425  echo "$as_me: failed program was:" >&5
6426sed 's/^/| /' conftest.$ac_ext >&5
6427
6428	ac_header_compiler=no
6429fi
6430
6431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6432{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6433echo "${ECHO_T}$ac_header_compiler" >&6; }
6434
6435# Is the header present?
6436{ echo "$as_me:$LINENO: checking dlfcn.h presence" >&5
6437echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6; }
6438cat >conftest.$ac_ext <<_ACEOF
6439/* confdefs.h.  */
6440_ACEOF
6441cat confdefs.h >>conftest.$ac_ext
6442cat >>conftest.$ac_ext <<_ACEOF
6443/* end confdefs.h.  */
6444#include <dlfcn.h>
6445_ACEOF
6446if { (ac_try="$ac_cpp conftest.$ac_ext"
6447case "(($ac_try" in
6448  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6449  *) ac_try_echo=$ac_try;;
6450esac
6451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6452  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6453  ac_status=$?
6454  grep -v '^ *+' conftest.er1 >conftest.err
6455  rm -f conftest.er1
6456  cat conftest.err >&5
6457  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6458  (exit $ac_status); } >/dev/null && {
6459	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6460	 test ! -s conftest.err
6461       }; then
6462  ac_header_preproc=yes
6463else
6464  echo "$as_me: failed program was:" >&5
6465sed 's/^/| /' conftest.$ac_ext >&5
6466
6467  ac_header_preproc=no
6468fi
6469
6470rm -f conftest.err conftest.$ac_ext
6471{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6472echo "${ECHO_T}$ac_header_preproc" >&6; }
6473
6474# So?  What about this header?
6475case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6476  yes:no: )
6477    { echo "$as_me:$LINENO: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&5
6478echo "$as_me: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6479    { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the compiler's result" >&5
6480echo "$as_me: WARNING: dlfcn.h: proceeding with the compiler's result" >&2;}
6481    ac_header_preproc=yes
6482    ;;
6483  no:yes:* )
6484    { echo "$as_me:$LINENO: WARNING: dlfcn.h: present but cannot be compiled" >&5
6485echo "$as_me: WARNING: dlfcn.h: present but cannot be compiled" >&2;}
6486    { echo "$as_me:$LINENO: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&5
6487echo "$as_me: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&2;}
6488    { echo "$as_me:$LINENO: WARNING: dlfcn.h: see the Autoconf documentation" >&5
6489echo "$as_me: WARNING: dlfcn.h: see the Autoconf documentation" >&2;}
6490    { echo "$as_me:$LINENO: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&5
6491echo "$as_me: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6492    { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5
6493echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;}
6494    { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5
6495echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;}
6496
6497    ;;
6498esac
6499{ echo "$as_me:$LINENO: checking for dlfcn.h" >&5
6500echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; }
6501if test "${ac_cv_header_dlfcn_h+set}" = set; then
6502  echo $ECHO_N "(cached) $ECHO_C" >&6
6503else
6504  ac_cv_header_dlfcn_h=$ac_header_preproc
6505fi
6506{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
6507echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; }
6508
6509fi
6510if test $ac_cv_header_dlfcn_h = yes; then
6511  :
6512else
6513
6514cat >>confdefs.h <<\_ACEOF
6515#define NO_DLFCN_H 1
6516_ACEOF
6517
6518fi
6519
6520
6521
6522    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
6523
6524for ac_header in sys/param.h
6525do
6526as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6527if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6528  { echo "$as_me:$LINENO: checking for $ac_header" >&5
6529echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6530if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6531  echo $ECHO_N "(cached) $ECHO_C" >&6
6532fi
6533ac_res=`eval echo '${'$as_ac_Header'}'`
6534	       { echo "$as_me:$LINENO: result: $ac_res" >&5
6535echo "${ECHO_T}$ac_res" >&6; }
6536else
6537  # Is the header compilable?
6538{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6539echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
6540cat >conftest.$ac_ext <<_ACEOF
6541/* confdefs.h.  */
6542_ACEOF
6543cat confdefs.h >>conftest.$ac_ext
6544cat >>conftest.$ac_ext <<_ACEOF
6545/* end confdefs.h.  */
6546$ac_includes_default
6547#include <$ac_header>
6548_ACEOF
6549rm -f conftest.$ac_objext
6550if { (ac_try="$ac_compile"
6551case "(($ac_try" in
6552  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6553  *) ac_try_echo=$ac_try;;
6554esac
6555eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6556  (eval "$ac_compile") 2>conftest.er1
6557  ac_status=$?
6558  grep -v '^ *+' conftest.er1 >conftest.err
6559  rm -f conftest.er1
6560  cat conftest.err >&5
6561  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6562  (exit $ac_status); } && {
6563	 test -z "$ac_c_werror_flag" ||
6564	 test ! -s conftest.err
6565       } && test -s conftest.$ac_objext; then
6566  ac_header_compiler=yes
6567else
6568  echo "$as_me: failed program was:" >&5
6569sed 's/^/| /' conftest.$ac_ext >&5
6570
6571	ac_header_compiler=no
6572fi
6573
6574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6575{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6576echo "${ECHO_T}$ac_header_compiler" >&6; }
6577
6578# Is the header present?
6579{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6580echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
6581cat >conftest.$ac_ext <<_ACEOF
6582/* confdefs.h.  */
6583_ACEOF
6584cat confdefs.h >>conftest.$ac_ext
6585cat >>conftest.$ac_ext <<_ACEOF
6586/* end confdefs.h.  */
6587#include <$ac_header>
6588_ACEOF
6589if { (ac_try="$ac_cpp conftest.$ac_ext"
6590case "(($ac_try" in
6591  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6592  *) ac_try_echo=$ac_try;;
6593esac
6594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6595  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6596  ac_status=$?
6597  grep -v '^ *+' conftest.er1 >conftest.err
6598  rm -f conftest.er1
6599  cat conftest.err >&5
6600  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6601  (exit $ac_status); } >/dev/null && {
6602	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6603	 test ! -s conftest.err
6604       }; then
6605  ac_header_preproc=yes
6606else
6607  echo "$as_me: failed program was:" >&5
6608sed 's/^/| /' conftest.$ac_ext >&5
6609
6610  ac_header_preproc=no
6611fi
6612
6613rm -f conftest.err conftest.$ac_ext
6614{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6615echo "${ECHO_T}$ac_header_preproc" >&6; }
6616
6617# So?  What about this header?
6618case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6619  yes:no: )
6620    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6621echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6622    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6623echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6624    ac_header_preproc=yes
6625    ;;
6626  no:yes:* )
6627    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6628echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6629    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
6630echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
6631    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6632echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6633    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
6634echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
6635    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6636echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6637    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6638echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6639
6640    ;;
6641esac
6642{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6643echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6644if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6645  echo $ECHO_N "(cached) $ECHO_C" >&6
6646else
6647  eval "$as_ac_Header=\$ac_header_preproc"
6648fi
6649ac_res=`eval echo '${'$as_ac_Header'}'`
6650	       { echo "$as_me:$LINENO: result: $ac_res" >&5
6651echo "${ECHO_T}$ac_res" >&6; }
6652
6653fi
6654if test `eval echo '${'$as_ac_Header'}'` = yes; then
6655  cat >>confdefs.h <<_ACEOF
6656#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6657_ACEOF
6658
6659fi
6660
6661done
6662
6663
6664	# Let the user call this, because if it triggers, they will
6665	# need a compat/strtod.c that is correct.  Users can also
6666	# use Tcl_GetDouble(FromObj) instead.
6667	#TEA_BUGGY_STRTOD
6668    fi
6669
6670
6671
6672    #
6673    # Ok, lets find the Tcldom configuration
6674    # First, look for one uninstalled.
6675    # the alternative search directory is invoked by --with-Tcldom
6676    #
6677
6678    if test x"${no_Tcldom}" = x ; then
6679	# we reset no_Tcldom in case something fails here
6680	no_Tcldom=true
6681
6682# Check whether --with-Tcldom was given.
6683if test "${with_Tcldom+set}" = set; then
6684  withval=$with_Tcldom; with_Tcldomconfig=${withval}
6685fi
6686
6687	{ echo "$as_me:$LINENO: checking for Tcldom configuration" >&5
6688echo $ECHO_N "checking for Tcldom configuration... $ECHO_C" >&6; }
6689	if test "${ac_cv_c_Tcldomconfig+set}" = set; then
6690  echo $ECHO_N "(cached) $ECHO_C" >&6
6691else
6692
6693
6694	    # First check to see if --with-Tcldom was specified.
6695	    if test x"${with_Tcldomconfig}" != x ; then
6696		case ${with_Tcldomconfig} in
6697		    */TcldomConfig.sh )
6698			if test -f ${with_Tcldomconfig}; then
6699			    { echo "$as_me:$LINENO: WARNING: --with-Tcldom argument should refer to directory containing TcldomConfig.sh, not to TcldomConfig.sh itself" >&5
6700echo "$as_me: WARNING: --with-Tcldom argument should refer to directory containing TcldomConfig.sh, not to TcldomConfig.sh itself" >&2;}
6701			    with_Tcldomconfig=`echo ${with_Tcldomconfig} | sed 's!/TcldomConfig\.sh$!!'`
6702			fi;;
6703		esac
6704		if test -f "${with_Tcldomconfig}/TcldomConfig.sh" ; then
6705		    ac_cv_c_Tcldomconfig=`(cd ${with_Tcldomconfig}; pwd)`
6706		else
6707		    { { echo "$as_me:$LINENO: error: ${with_Tcldomconfig} directory doesn't contain TcldomConfig.sh" >&5
6708echo "$as_me: error: ${with_Tcldomconfig} directory doesn't contain TcldomConfig.sh" >&2;}
6709   { (exit 1); exit 1; }; }
6710		fi
6711	    fi
6712
6713	    # then check for a private Tcldom installation
6714	    if test x"${ac_cv_c_Tcldomconfig}" = x ; then
6715		for i in \
6716			../Tcldom \
6717			`ls -dr ../Tcldom*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
6718			`ls -dr ../Tcldom*[0-9].[0-9][0-9] 2>/dev/null` \
6719			`ls -dr ../Tcldom*[0-9].[0-9] 2>/dev/null` \
6720			`ls -dr ../Tcldom*[0-9].[0-9]* 2>/dev/null` \
6721			../../Tcldom \
6722			`ls -dr ../../Tcldom*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
6723			`ls -dr ../../Tcldom*[0-9].[0-9][0-9] 2>/dev/null` \
6724			`ls -dr ../../Tcldom*[0-9].[0-9] 2>/dev/null` \
6725			`ls -dr ../../Tcldom*[0-9].[0-9]* 2>/dev/null` \
6726			../../../Tcldom \
6727			`ls -dr ../../../Tcldom*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
6728			`ls -dr ../../../Tcldom*[0-9].[0-9][0-9] 2>/dev/null` \
6729			`ls -dr ../../../Tcldom*[0-9].[0-9] 2>/dev/null` \
6730			`ls -dr ../../../Tcldom*[0-9].[0-9]* 2>/dev/null` \
6731			${srcdir}/../Tcldom \
6732			`ls -dr ${srcdir}/../Tcldom*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
6733			`ls -dr ${srcdir}/../Tcldom*[0-9].[0-9][0-9] 2>/dev/null` \
6734			`ls -dr ${srcdir}/../Tcldom*[0-9].[0-9] 2>/dev/null` \
6735			`ls -dr ${srcdir}/../Tcldom*[0-9].[0-9]* 2>/dev/null` \
6736			; do
6737		    if test -f "$i/TcldomConfig.sh" ; then
6738			ac_cv_c_Tcldomconfig=`(cd $i; pwd)`
6739			break
6740		    fi
6741		    if test -f "$i/unix/TcldomConfig.sh" ; then
6742			ac_cv_c_Tcldomconfig=`(cd $i/unix; pwd)`
6743			break
6744		    fi
6745		done
6746	    fi
6747
6748	    # check in a few common install locations
6749	    if test x"${ac_cv_c_Tcldomconfig}" = x ; then
6750		for i in `ls -d ${libdir} 2>/dev/null` \
6751			`ls -d ${exec_prefix}/lib 2>/dev/null` \
6752			`ls -d ${prefix}/lib 2>/dev/null` \
6753			`ls -d /usr/local/lib 2>/dev/null` \
6754			`ls -d /usr/contrib/lib 2>/dev/null` \
6755			`ls -d /usr/lib 2>/dev/null` \
6756			`ls -d /usr/lib64 2>/dev/null` \
6757			; do
6758		    if test -f "$i/TcldomConfig.sh" ; then
6759			ac_cv_c_Tcldomconfig=`(cd $i; pwd)`
6760			break
6761		    fi
6762		done
6763	    fi
6764
6765fi
6766
6767
6768	if test x"${ac_cv_c_Tcldomconfig}" = x ; then
6769	    Tcldom_BIN_DIR="# no Tcldom configs found"
6770	    { echo "$as_me:$LINENO: WARNING: Cannot find Tcldom configuration definitions" >&5
6771echo "$as_me: WARNING: Cannot find Tcldom configuration definitions" >&2;}
6772	    exit 0
6773	else
6774	    no_Tcldom=
6775	    Tcldom_BIN_DIR=${ac_cv_c_Tcldomconfig}
6776	    { echo "$as_me:$LINENO: result: found $Tcldom_BIN_DIR/TcldomConfig.sh" >&5
6777echo "${ECHO_T}found $Tcldom_BIN_DIR/TcldomConfig.sh" >&6; }
6778	fi
6779    fi
6780
6781
6782    { echo "$as_me:$LINENO: checking for existence of ${Tcldom_BIN_DIR}/TcldomConfig.sh" >&5
6783echo $ECHO_N "checking for existence of ${Tcldom_BIN_DIR}/TcldomConfig.sh... $ECHO_C" >&6; }
6784
6785    if test -f "${Tcldom_BIN_DIR}/TcldomConfig.sh" ; then
6786        { echo "$as_me:$LINENO: result: loading" >&5
6787echo "${ECHO_T}loading" >&6; }
6788	. "${Tcldom_BIN_DIR}/TcldomConfig.sh"
6789    else
6790        { echo "$as_me:$LINENO: result: file not found" >&5
6791echo "${ECHO_T}file not found" >&6; }
6792    fi
6793
6794    #
6795    # If the Tcldom_BIN_DIR is the build directory (not the install directory),
6796    # then set the common variable name to the value of the build variables.
6797    # For example, the variable Tcldom_LIB_SPEC will be set to the value
6798    # of Tcldom_BUILD_LIB_SPEC. An extension should make use of Tcldom_LIB_SPEC
6799    # instead of Tcldom_BUILD_LIB_SPEC since it will work with both an
6800    # installed and uninstalled version of Tcl.
6801    #
6802
6803    if test -f "${Tcldom_BIN_DIR}/Makefile" ; then
6804	{ echo "$as_me:$LINENO: WARNING: Found Makefile - using build library specs for Tcldom" >&5
6805echo "$as_me: WARNING: Found Makefile - using build library specs for Tcldom" >&2;}
6806        Tcldom_LIB_SPEC=${Tcldom_BUILD_LIB_SPEC}
6807        Tcldom_STUB_LIB_SPEC=${Tcldom_BUILD_STUB_LIB_SPEC}
6808        Tcldom_STUB_LIB_PATH=${Tcldom_BUILD_STUB_LIB_PATH}
6809    fi
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822    # Allow the caller to prevent this auto-check by specifying any 2nd arg
6823    if test "x" = x; then
6824
6825	# Check both upper and lower-case variants
6826	# If a dev wanted non-stubs libs, this function could take an option
6827	# to not use _STUB in the paths below
6828	if test "x${Tcldom_STUB_LIB_SPEC}" = x; then
6829
6830    { echo "$as_me:$LINENO: checking For TCLDOM_STUB library for LIBS" >&5
6831echo $ECHO_N "checking For TCLDOM_STUB library for LIBS... $ECHO_C" >&6; }
6832    # This simplifies the use of stub libraries by automatically adding
6833    # the stub lib to your path.  Normally this would add to SHLIB_LD_LIBS,
6834    # but this is called before CONFIG_CFLAGS.  More importantly, this adds
6835    # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD.
6836    if test "x${TCLDOM_STUB_LIB_SPEC}" != "x" ; then
6837	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
6838
6839    vars="\"`${CYGPATH} ${TCLDOM_STUB_LIB_PATH}`\""
6840    for i in $vars; do
6841	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
6842	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
6843	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
6844	fi
6845	PKG_LIBS="$PKG_LIBS $i"
6846    done
6847
6848
6849	    { echo "$as_me:$LINENO: result: using TCLDOM_STUB_LIB_PATH ${TCLDOM_STUB_LIB_PATH}" >&5
6850echo "${ECHO_T}using TCLDOM_STUB_LIB_PATH ${TCLDOM_STUB_LIB_PATH}" >&6; }
6851	else
6852
6853    vars="${TCLDOM_STUB_LIB_SPEC}"
6854    for i in $vars; do
6855	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
6856	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
6857	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
6858	fi
6859	PKG_LIBS="$PKG_LIBS $i"
6860    done
6861
6862
6863	    { echo "$as_me:$LINENO: result: using TCLDOM_STUB_LIB_SPEC ${TCLDOM_STUB_LIB_SPEC}" >&5
6864echo "${ECHO_T}using TCLDOM_STUB_LIB_SPEC ${TCLDOM_STUB_LIB_SPEC}" >&6; }
6865	fi
6866    else
6867	{ echo "$as_me:$LINENO: result: file not found" >&5
6868echo "${ECHO_T}file not found" >&6; }
6869    fi
6870
6871else
6872
6873    { echo "$as_me:$LINENO: checking For Tcldom_STUB library for LIBS" >&5
6874echo $ECHO_N "checking For Tcldom_STUB library for LIBS... $ECHO_C" >&6; }
6875    # This simplifies the use of stub libraries by automatically adding
6876    # the stub lib to your path.  Normally this would add to SHLIB_LD_LIBS,
6877    # but this is called before CONFIG_CFLAGS.  More importantly, this adds
6878    # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD.
6879    if test "x${Tcldom_STUB_LIB_SPEC}" != "x" ; then
6880	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
6881
6882    vars="\"`${CYGPATH} ${Tcldom_STUB_LIB_PATH}`\""
6883    for i in $vars; do
6884	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
6885	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
6886	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
6887	fi
6888	PKG_LIBS="$PKG_LIBS $i"
6889    done
6890
6891
6892	    { echo "$as_me:$LINENO: result: using Tcldom_STUB_LIB_PATH ${Tcldom_STUB_LIB_PATH}" >&5
6893echo "${ECHO_T}using Tcldom_STUB_LIB_PATH ${Tcldom_STUB_LIB_PATH}" >&6; }
6894	else
6895
6896    vars="${Tcldom_STUB_LIB_SPEC}"
6897    for i in $vars; do
6898	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
6899	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
6900	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
6901	fi
6902	PKG_LIBS="$PKG_LIBS $i"
6903    done
6904
6905
6906	    { echo "$as_me:$LINENO: result: using Tcldom_STUB_LIB_SPEC ${Tcldom_STUB_LIB_SPEC}" >&5
6907echo "${ECHO_T}using Tcldom_STUB_LIB_SPEC ${Tcldom_STUB_LIB_SPEC}" >&6; }
6908	fi
6909    else
6910	{ echo "$as_me:$LINENO: result: file not found" >&5
6911echo "${ECHO_T}file not found" >&6; }
6912    fi
6913
6914fi
6915
6916
6917fi
6918
6919
6920
6921
6922#--------------------------------------------------------------------
6923# __CHANGE__
6924# Choose which headers you need.  Extension authors should try very
6925# hard to only rely on the Tcl public header files.  Internal headers
6926# contain private data structures and are subject to change without
6927# notice.
6928# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
6929#--------------------------------------------------------------------
6930
6931
6932    { echo "$as_me:$LINENO: checking for Tcl public headers" >&5
6933echo $ECHO_N "checking for Tcl public headers... $ECHO_C" >&6; }
6934
6935
6936# Check whether --with-tclinclude was given.
6937if test "${with_tclinclude+set}" = set; then
6938  withval=$with_tclinclude; with_tclinclude=${withval}
6939fi
6940
6941
6942    if test "${ac_cv_c_tclh+set}" = set; then
6943  echo $ECHO_N "(cached) $ECHO_C" >&6
6944else
6945
6946	# Use the value from --with-tclinclude, if it was given
6947
6948	if test x"${with_tclinclude}" != x ; then
6949	    if test -f "${with_tclinclude}/tcl.h" ; then
6950		ac_cv_c_tclh=${with_tclinclude}
6951	    else
6952		{ { echo "$as_me:$LINENO: error: ${with_tclinclude} directory does not contain tcl.h" >&5
6953echo "$as_me: error: ${with_tclinclude} directory does not contain tcl.h" >&2;}
6954   { (exit 1); exit 1; }; }
6955	    fi
6956	else
6957	    list=""
6958	    if test "`uname -s`" = "Darwin"; then
6959		# If Tcl was built as a framework, attempt to use
6960		# the framework's Headers directory
6961		case ${TCL_DEFS} in
6962		    *TCL_FRAMEWORK*)
6963			list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
6964			;;
6965		esac
6966	    fi
6967
6968	    # Look in the source dir only if Tcl is not installed,
6969	    # and in that situation, look there before installed locations.
6970	    if test -f "${TCL_BIN_DIR}/Makefile" ; then
6971		list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
6972	    fi
6973
6974	    # Check order: pkg --prefix location, Tcl's --prefix location,
6975	    # relative to directory of tclConfig.sh.
6976
6977	    eval "temp_includedir=${includedir}"
6978	    list="$list \
6979		`ls -d ${temp_includedir}        2>/dev/null` \
6980		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
6981		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
6982	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
6983		list="$list /usr/local/include /usr/include"
6984		if test x"${TCL_INCLUDE_SPEC}" != x ; then
6985		    d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
6986		    list="$list `ls -d ${d} 2>/dev/null`"
6987		fi
6988	    fi
6989	    for i in $list ; do
6990		if test -f "$i/tcl.h" ; then
6991		    ac_cv_c_tclh=$i
6992		    break
6993		fi
6994	    done
6995	fi
6996
6997fi
6998
6999
7000    # Print a message based on how we determined the include path
7001
7002    if test x"${ac_cv_c_tclh}" = x ; then
7003	{ { echo "$as_me:$LINENO: error: tcl.h not found.  Please specify its location with --with-tclinclude" >&5
7004echo "$as_me: error: tcl.h not found.  Please specify its location with --with-tclinclude" >&2;}
7005   { (exit 1); exit 1; }; }
7006    else
7007	{ echo "$as_me:$LINENO: result: ${ac_cv_c_tclh}" >&5
7008echo "${ECHO_T}${ac_cv_c_tclh}" >&6; }
7009    fi
7010
7011    # Convert to a native path and substitute into the output files.
7012
7013    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
7014
7015    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
7016
7017
7018
7019#TEA_PRIVATE_TCL_HEADERS
7020
7021#--------------------------------------------------------------------
7022# A few miscellaneous platform-specific items:
7023#
7024# We have to define a special symbol for Windows (BUILD_Tcldomxml in this
7025# case) so that we create the export library with the dll.
7026#
7027# Windows creates a few extra files that need to be cleaned up.
7028# We can add more files to clean if our extension creates any extra
7029# files in the future.
7030#
7031# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
7032# These will be appended to the current set of compiler flags for
7033# your system.
7034#--------------------------------------------------------------------
7035
7036if test "${TEA_PLATFORM}" = "windows" ; then
7037    cat >>confdefs.h <<\_ACEOF
7038#define BUILD_Tcldomxml 1
7039_ACEOF
7040
7041    CLEANFILES="pkgIndex.tcl *.lib *.dll *.exp *.ilk *.pdb vc*.pch"
7042    EXTRA_SOURCES='$(WIN_SOURCES)'
7043else
7044    CLEANFILES="pkgIndex.tcl"
7045    EXTRA_SOURCES='$(UNIX_SOURCES)'
7046fi
7047
7048
7049
7050#--------------------------------------------------------------------
7051# Check whether --enable-threads or --disable-threads was given.
7052# So far only Tcl responds to this one.
7053#--------------------------------------------------------------------
7054
7055
7056    # Check whether --enable-threads was given.
7057if test "${enable_threads+set}" = set; then
7058  enableval=$enable_threads; tcl_ok=$enableval
7059else
7060  tcl_ok=yes
7061fi
7062
7063
7064    if test "${enable_threads+set}" = set; then
7065	enableval="$enable_threads"
7066	tcl_ok=$enableval
7067    else
7068	tcl_ok=yes
7069    fi
7070
7071    if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
7072	TCL_THREADS=1
7073
7074	if test "${TEA_PLATFORM}" != "windows" ; then
7075	    # We are always OK on Windows, so check what this platform wants:
7076
7077	    # USE_THREAD_ALLOC tells us to try the special thread-based
7078	    # allocator that significantly reduces lock contention
7079
7080cat >>confdefs.h <<\_ACEOF
7081#define USE_THREAD_ALLOC 1
7082_ACEOF
7083
7084
7085cat >>confdefs.h <<\_ACEOF
7086#define _REENTRANT 1
7087_ACEOF
7088
7089	    if test "`uname -s`" = "SunOS" ; then
7090
7091cat >>confdefs.h <<\_ACEOF
7092#define _POSIX_PTHREAD_SEMANTICS 1
7093_ACEOF
7094
7095	    fi
7096
7097cat >>confdefs.h <<\_ACEOF
7098#define _THREAD_SAFE 1
7099_ACEOF
7100
7101	    { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5
7102echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6; }
7103if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then
7104  echo $ECHO_N "(cached) $ECHO_C" >&6
7105else
7106  ac_check_lib_save_LIBS=$LIBS
7107LIBS="-lpthread  $LIBS"
7108cat >conftest.$ac_ext <<_ACEOF
7109/* confdefs.h.  */
7110_ACEOF
7111cat confdefs.h >>conftest.$ac_ext
7112cat >>conftest.$ac_ext <<_ACEOF
7113/* end confdefs.h.  */
7114
7115/* Override any GCC internal prototype to avoid an error.
7116   Use char because int might match the return type of a GCC
7117   builtin and then its argument prototype would still apply.  */
7118#ifdef __cplusplus
7119extern "C"
7120#endif
7121char pthread_mutex_init ();
7122int
7123main ()
7124{
7125return pthread_mutex_init ();
7126  ;
7127  return 0;
7128}
7129_ACEOF
7130rm -f conftest.$ac_objext conftest$ac_exeext
7131if { (ac_try="$ac_link"
7132case "(($ac_try" in
7133  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7134  *) ac_try_echo=$ac_try;;
7135esac
7136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7137  (eval "$ac_link") 2>conftest.er1
7138  ac_status=$?
7139  grep -v '^ *+' conftest.er1 >conftest.err
7140  rm -f conftest.er1
7141  cat conftest.err >&5
7142  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7143  (exit $ac_status); } && {
7144	 test -z "$ac_c_werror_flag" ||
7145	 test ! -s conftest.err
7146       } && test -s conftest$ac_exeext &&
7147       $as_test_x conftest$ac_exeext; then
7148  ac_cv_lib_pthread_pthread_mutex_init=yes
7149else
7150  echo "$as_me: failed program was:" >&5
7151sed 's/^/| /' conftest.$ac_ext >&5
7152
7153	ac_cv_lib_pthread_pthread_mutex_init=no
7154fi
7155
7156rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7157      conftest$ac_exeext conftest.$ac_ext
7158LIBS=$ac_check_lib_save_LIBS
7159fi
7160{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5
7161echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6; }
7162if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then
7163  tcl_ok=yes
7164else
7165  tcl_ok=no
7166fi
7167
7168	    if test "$tcl_ok" = "no"; then
7169		# Check a little harder for __pthread_mutex_init in the same
7170		# library, as some systems hide it there until pthread.h is
7171		# defined.  We could alternatively do an AC_TRY_COMPILE with
7172		# pthread.h, but that will work with libpthread really doesn't
7173		# exist, like AIX 4.2.  [Bug: 4359]
7174		{ echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5
7175echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6; }
7176if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then
7177  echo $ECHO_N "(cached) $ECHO_C" >&6
7178else
7179  ac_check_lib_save_LIBS=$LIBS
7180LIBS="-lpthread  $LIBS"
7181cat >conftest.$ac_ext <<_ACEOF
7182/* confdefs.h.  */
7183_ACEOF
7184cat confdefs.h >>conftest.$ac_ext
7185cat >>conftest.$ac_ext <<_ACEOF
7186/* end confdefs.h.  */
7187
7188/* Override any GCC internal prototype to avoid an error.
7189   Use char because int might match the return type of a GCC
7190   builtin and then its argument prototype would still apply.  */
7191#ifdef __cplusplus
7192extern "C"
7193#endif
7194char __pthread_mutex_init ();
7195int
7196main ()
7197{
7198return __pthread_mutex_init ();
7199  ;
7200  return 0;
7201}
7202_ACEOF
7203rm -f conftest.$ac_objext conftest$ac_exeext
7204if { (ac_try="$ac_link"
7205case "(($ac_try" in
7206  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7207  *) ac_try_echo=$ac_try;;
7208esac
7209eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7210  (eval "$ac_link") 2>conftest.er1
7211  ac_status=$?
7212  grep -v '^ *+' conftest.er1 >conftest.err
7213  rm -f conftest.er1
7214  cat conftest.err >&5
7215  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7216  (exit $ac_status); } && {
7217	 test -z "$ac_c_werror_flag" ||
7218	 test ! -s conftest.err
7219       } && test -s conftest$ac_exeext &&
7220       $as_test_x conftest$ac_exeext; then
7221  ac_cv_lib_pthread___pthread_mutex_init=yes
7222else
7223  echo "$as_me: failed program was:" >&5
7224sed 's/^/| /' conftest.$ac_ext >&5
7225
7226	ac_cv_lib_pthread___pthread_mutex_init=no
7227fi
7228
7229rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7230      conftest$ac_exeext conftest.$ac_ext
7231LIBS=$ac_check_lib_save_LIBS
7232fi
7233{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5
7234echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6; }
7235if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then
7236  tcl_ok=yes
7237else
7238  tcl_ok=no
7239fi
7240
7241	    fi
7242
7243	    if test "$tcl_ok" = "yes"; then
7244		# The space is needed
7245		THREADS_LIBS=" -lpthread"
7246	    else
7247		{ echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5
7248echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6; }
7249if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then
7250  echo $ECHO_N "(cached) $ECHO_C" >&6
7251else
7252  ac_check_lib_save_LIBS=$LIBS
7253LIBS="-lpthreads  $LIBS"
7254cat >conftest.$ac_ext <<_ACEOF
7255/* confdefs.h.  */
7256_ACEOF
7257cat confdefs.h >>conftest.$ac_ext
7258cat >>conftest.$ac_ext <<_ACEOF
7259/* end confdefs.h.  */
7260
7261/* Override any GCC internal prototype to avoid an error.
7262   Use char because int might match the return type of a GCC
7263   builtin and then its argument prototype would still apply.  */
7264#ifdef __cplusplus
7265extern "C"
7266#endif
7267char pthread_mutex_init ();
7268int
7269main ()
7270{
7271return pthread_mutex_init ();
7272  ;
7273  return 0;
7274}
7275_ACEOF
7276rm -f conftest.$ac_objext conftest$ac_exeext
7277if { (ac_try="$ac_link"
7278case "(($ac_try" in
7279  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7280  *) ac_try_echo=$ac_try;;
7281esac
7282eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7283  (eval "$ac_link") 2>conftest.er1
7284  ac_status=$?
7285  grep -v '^ *+' conftest.er1 >conftest.err
7286  rm -f conftest.er1
7287  cat conftest.err >&5
7288  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7289  (exit $ac_status); } && {
7290	 test -z "$ac_c_werror_flag" ||
7291	 test ! -s conftest.err
7292       } && test -s conftest$ac_exeext &&
7293       $as_test_x conftest$ac_exeext; then
7294  ac_cv_lib_pthreads_pthread_mutex_init=yes
7295else
7296  echo "$as_me: failed program was:" >&5
7297sed 's/^/| /' conftest.$ac_ext >&5
7298
7299	ac_cv_lib_pthreads_pthread_mutex_init=no
7300fi
7301
7302rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7303      conftest$ac_exeext conftest.$ac_ext
7304LIBS=$ac_check_lib_save_LIBS
7305fi
7306{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5
7307echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6; }
7308if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then
7309  tcl_ok=yes
7310else
7311  tcl_ok=no
7312fi
7313
7314		if test "$tcl_ok" = "yes"; then
7315		    # The space is needed
7316		    THREADS_LIBS=" -lpthreads"
7317		else
7318		    { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5
7319echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6; }
7320if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then
7321  echo $ECHO_N "(cached) $ECHO_C" >&6
7322else
7323  ac_check_lib_save_LIBS=$LIBS
7324LIBS="-lc  $LIBS"
7325cat >conftest.$ac_ext <<_ACEOF
7326/* confdefs.h.  */
7327_ACEOF
7328cat confdefs.h >>conftest.$ac_ext
7329cat >>conftest.$ac_ext <<_ACEOF
7330/* end confdefs.h.  */
7331
7332/* Override any GCC internal prototype to avoid an error.
7333   Use char because int might match the return type of a GCC
7334   builtin and then its argument prototype would still apply.  */
7335#ifdef __cplusplus
7336extern "C"
7337#endif
7338char pthread_mutex_init ();
7339int
7340main ()
7341{
7342return pthread_mutex_init ();
7343  ;
7344  return 0;
7345}
7346_ACEOF
7347rm -f conftest.$ac_objext conftest$ac_exeext
7348if { (ac_try="$ac_link"
7349case "(($ac_try" in
7350  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7351  *) ac_try_echo=$ac_try;;
7352esac
7353eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7354  (eval "$ac_link") 2>conftest.er1
7355  ac_status=$?
7356  grep -v '^ *+' conftest.er1 >conftest.err
7357  rm -f conftest.er1
7358  cat conftest.err >&5
7359  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7360  (exit $ac_status); } && {
7361	 test -z "$ac_c_werror_flag" ||
7362	 test ! -s conftest.err
7363       } && test -s conftest$ac_exeext &&
7364       $as_test_x conftest$ac_exeext; then
7365  ac_cv_lib_c_pthread_mutex_init=yes
7366else
7367  echo "$as_me: failed program was:" >&5
7368sed 's/^/| /' conftest.$ac_ext >&5
7369
7370	ac_cv_lib_c_pthread_mutex_init=no
7371fi
7372
7373rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7374      conftest$ac_exeext conftest.$ac_ext
7375LIBS=$ac_check_lib_save_LIBS
7376fi
7377{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5
7378echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6; }
7379if test $ac_cv_lib_c_pthread_mutex_init = yes; then
7380  tcl_ok=yes
7381else
7382  tcl_ok=no
7383fi
7384
7385		    if test "$tcl_ok" = "no"; then
7386			{ echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5
7387echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6; }
7388if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then
7389  echo $ECHO_N "(cached) $ECHO_C" >&6
7390else
7391  ac_check_lib_save_LIBS=$LIBS
7392LIBS="-lc_r  $LIBS"
7393cat >conftest.$ac_ext <<_ACEOF
7394/* confdefs.h.  */
7395_ACEOF
7396cat confdefs.h >>conftest.$ac_ext
7397cat >>conftest.$ac_ext <<_ACEOF
7398/* end confdefs.h.  */
7399
7400/* Override any GCC internal prototype to avoid an error.
7401   Use char because int might match the return type of a GCC
7402   builtin and then its argument prototype would still apply.  */
7403#ifdef __cplusplus
7404extern "C"
7405#endif
7406char pthread_mutex_init ();
7407int
7408main ()
7409{
7410return pthread_mutex_init ();
7411  ;
7412  return 0;
7413}
7414_ACEOF
7415rm -f conftest.$ac_objext conftest$ac_exeext
7416if { (ac_try="$ac_link"
7417case "(($ac_try" in
7418  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7419  *) ac_try_echo=$ac_try;;
7420esac
7421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7422  (eval "$ac_link") 2>conftest.er1
7423  ac_status=$?
7424  grep -v '^ *+' conftest.er1 >conftest.err
7425  rm -f conftest.er1
7426  cat conftest.err >&5
7427  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7428  (exit $ac_status); } && {
7429	 test -z "$ac_c_werror_flag" ||
7430	 test ! -s conftest.err
7431       } && test -s conftest$ac_exeext &&
7432       $as_test_x conftest$ac_exeext; then
7433  ac_cv_lib_c_r_pthread_mutex_init=yes
7434else
7435  echo "$as_me: failed program was:" >&5
7436sed 's/^/| /' conftest.$ac_ext >&5
7437
7438	ac_cv_lib_c_r_pthread_mutex_init=no
7439fi
7440
7441rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7442      conftest$ac_exeext conftest.$ac_ext
7443LIBS=$ac_check_lib_save_LIBS
7444fi
7445{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5
7446echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6; }
7447if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then
7448  tcl_ok=yes
7449else
7450  tcl_ok=no
7451fi
7452
7453			if test "$tcl_ok" = "yes"; then
7454			    # The space is needed
7455			    THREADS_LIBS=" -pthread"
7456			else
7457			    TCL_THREADS=0
7458			    { echo "$as_me:$LINENO: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&5
7459echo "$as_me: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&2;}
7460			fi
7461		    fi
7462		fi
7463	    fi
7464	fi
7465    else
7466	TCL_THREADS=0
7467    fi
7468    # Do checking message here to not mess up interleaved configure output
7469    { echo "$as_me:$LINENO: checking for building with threads" >&5
7470echo $ECHO_N "checking for building with threads... $ECHO_C" >&6; }
7471    if test "${TCL_THREADS}" = 1; then
7472
7473cat >>confdefs.h <<\_ACEOF
7474#define TCL_THREADS 1
7475_ACEOF
7476
7477	{ echo "$as_me:$LINENO: result: yes (default)" >&5
7478echo "${ECHO_T}yes (default)" >&6; }
7479    else
7480	{ echo "$as_me:$LINENO: result: no" >&5
7481echo "${ECHO_T}no" >&6; }
7482    fi
7483    # TCL_THREADS sanity checking.  See if our request for building with
7484    # threads is the same as the way Tcl was built.  If not, warn the user.
7485    case ${TCL_DEFS} in
7486	*THREADS=1*)
7487	    if test "${TCL_THREADS}" = "0"; then
7488		{ echo "$as_me:$LINENO: WARNING:
7489    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
7490    that IS thread-enabled.  It is recommended to use --enable-threads." >&5
7491echo "$as_me: WARNING:
7492    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
7493    that IS thread-enabled.  It is recommended to use --enable-threads." >&2;}
7494	    fi
7495	    ;;
7496	*)
7497	    if test "${TCL_THREADS}" = "1"; then
7498		{ echo "$as_me:$LINENO: WARNING:
7499    --enable-threads requested, but building against a Tcl that is NOT
7500    thread-enabled.  This is an OK configuration that will also run in
7501    a thread-enabled core." >&5
7502echo "$as_me: WARNING:
7503    --enable-threads requested, but building against a Tcl that is NOT
7504    thread-enabled.  This is an OK configuration that will also run in
7505    a thread-enabled core." >&2;}
7506	    fi
7507	    ;;
7508    esac
7509
7510
7511
7512#--------------------------------------------------------------------
7513# The statement below defines a collection of symbols related to
7514# building as a shared library instead of a static library.
7515#--------------------------------------------------------------------
7516
7517
7518    { echo "$as_me:$LINENO: checking how to build libraries" >&5
7519echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6; }
7520    # Check whether --enable-shared was given.
7521if test "${enable_shared+set}" = set; then
7522  enableval=$enable_shared; tcl_ok=$enableval
7523else
7524  tcl_ok=yes
7525fi
7526
7527
7528    if test "${enable_shared+set}" = set; then
7529	enableval="$enable_shared"
7530	tcl_ok=$enableval
7531    else
7532	tcl_ok=yes
7533    fi
7534
7535    if test "$tcl_ok" = "yes" ; then
7536	{ echo "$as_me:$LINENO: result: shared" >&5
7537echo "${ECHO_T}shared" >&6; }
7538	SHARED_BUILD=1
7539    else
7540	{ echo "$as_me:$LINENO: result: static" >&5
7541echo "${ECHO_T}static" >&6; }
7542	SHARED_BUILD=0
7543
7544cat >>confdefs.h <<\_ACEOF
7545#define STATIC_BUILD 1
7546_ACEOF
7547
7548    fi
7549
7550
7551
7552#--------------------------------------------------------------------
7553# This macro figures out what flags to use with the compiler/linker
7554# when building shared/static debug/optimized objects.  This information
7555# can be taken from the tclConfig.sh file, but this figures it all out.
7556#--------------------------------------------------------------------
7557
7558
7559
7560
7561    # Step 0.a: Enable 64 bit support?
7562
7563    { echo "$as_me:$LINENO: checking if 64bit support is requested" >&5
7564echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6; }
7565    # Check whether --enable-64bit was given.
7566if test "${enable_64bit+set}" = set; then
7567  enableval=$enable_64bit; do64bit=$enableval
7568else
7569  do64bit=no
7570fi
7571
7572    { echo "$as_me:$LINENO: result: $do64bit" >&5
7573echo "${ECHO_T}$do64bit" >&6; }
7574
7575    # Step 0.b: Enable Solaris 64 bit VIS support?
7576
7577    { echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5
7578echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6; }
7579    # Check whether --enable-64bit-vis was given.
7580if test "${enable_64bit_vis+set}" = set; then
7581  enableval=$enable_64bit_vis; do64bitVIS=$enableval
7582else
7583  do64bitVIS=no
7584fi
7585
7586    { echo "$as_me:$LINENO: result: $do64bitVIS" >&5
7587echo "${ECHO_T}$do64bitVIS" >&6; }
7588    # Force 64bit on with VIS
7589    if test "$do64bitVIS" = "yes"; then
7590  do64bit=yes
7591fi
7592
7593
7594    # Step 0.c: Check if visibility support is available. Do this here so
7595    # that platform specific alternatives can be used below if this fails.
7596
7597    { echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5
7598echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6; }
7599if test "${tcl_cv_cc_visibility_hidden+set}" = set; then
7600  echo $ECHO_N "(cached) $ECHO_C" >&6
7601else
7602
7603	hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
7604	cat >conftest.$ac_ext <<_ACEOF
7605/* confdefs.h.  */
7606_ACEOF
7607cat confdefs.h >>conftest.$ac_ext
7608cat >>conftest.$ac_ext <<_ACEOF
7609/* end confdefs.h.  */
7610
7611	    extern __attribute__((__visibility__("hidden"))) void f(void);
7612	    void f(void) {}
7613int
7614main ()
7615{
7616f();
7617  ;
7618  return 0;
7619}
7620_ACEOF
7621rm -f conftest.$ac_objext conftest$ac_exeext
7622if { (ac_try="$ac_link"
7623case "(($ac_try" in
7624  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7625  *) ac_try_echo=$ac_try;;
7626esac
7627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7628  (eval "$ac_link") 2>conftest.er1
7629  ac_status=$?
7630  grep -v '^ *+' conftest.er1 >conftest.err
7631  rm -f conftest.er1
7632  cat conftest.err >&5
7633  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7634  (exit $ac_status); } && {
7635	 test -z "$ac_c_werror_flag" ||
7636	 test ! -s conftest.err
7637       } && test -s conftest$ac_exeext &&
7638       $as_test_x conftest$ac_exeext; then
7639  tcl_cv_cc_visibility_hidden=yes
7640else
7641  echo "$as_me: failed program was:" >&5
7642sed 's/^/| /' conftest.$ac_ext >&5
7643
7644	tcl_cv_cc_visibility_hidden=no
7645fi
7646
7647rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7648      conftest$ac_exeext conftest.$ac_ext
7649	CFLAGS=$hold_cflags
7650fi
7651{ echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5
7652echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6; }
7653    if test $tcl_cv_cc_visibility_hidden = yes; then
7654
7655
7656cat >>confdefs.h <<\_ACEOF
7657#define MODULE_SCOPE extern __attribute__((__visibility__("hidden")))
7658_ACEOF
7659
7660
7661fi
7662
7663
7664    # Step 0.d: Disable -rpath support?
7665
7666    { echo "$as_me:$LINENO: checking if rpath support is requested" >&5
7667echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6; }
7668    # Check whether --enable-rpath was given.
7669if test "${enable_rpath+set}" = set; then
7670  enableval=$enable_rpath; doRpath=$enableval
7671else
7672  doRpath=yes
7673fi
7674
7675    { echo "$as_me:$LINENO: result: $doRpath" >&5
7676echo "${ECHO_T}$doRpath" >&6; }
7677
7678    # TEA specific: Cross-compiling options for Windows/CE builds?
7679
7680    if test "${TEA_PLATFORM}" = windows; then
7681
7682	{ echo "$as_me:$LINENO: checking if Windows/CE build is requested" >&5
7683echo $ECHO_N "checking if Windows/CE build is requested... $ECHO_C" >&6; }
7684	# Check whether --enable-wince was given.
7685if test "${enable_wince+set}" = set; then
7686  enableval=$enable_wince; doWince=$enableval
7687else
7688  doWince=no
7689fi
7690
7691	{ echo "$as_me:$LINENO: result: $doWince" >&5
7692echo "${ECHO_T}$doWince" >&6; }
7693
7694fi
7695
7696
7697    # Set the variable "system" to hold the name and version number
7698    # for the system.
7699
7700
7701    { echo "$as_me:$LINENO: checking system version" >&5
7702echo $ECHO_N "checking system version... $ECHO_C" >&6; }
7703if test "${tcl_cv_sys_version+set}" = set; then
7704  echo $ECHO_N "(cached) $ECHO_C" >&6
7705else
7706
7707	# TEA specific:
7708	if test "${TEA_PLATFORM}" = "windows" ; then
7709	    tcl_cv_sys_version=windows
7710	else
7711	    tcl_cv_sys_version=`uname -s`-`uname -r`
7712	    if test "$?" -ne 0 ; then
7713		{ echo "$as_me:$LINENO: WARNING: can't find uname command" >&5
7714echo "$as_me: WARNING: can't find uname command" >&2;}
7715		tcl_cv_sys_version=unknown
7716	    else
7717		if test "`uname -s`" = "AIX" ; then
7718		    tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
7719		fi
7720	    fi
7721	fi
7722
7723fi
7724{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5
7725echo "${ECHO_T}$tcl_cv_sys_version" >&6; }
7726    system=$tcl_cv_sys_version
7727
7728
7729    # Require ranlib early so we can override it in special cases below.
7730
7731
7732
7733    # Set configuration options based on system name and version.
7734    # This is similar to Tcl's unix/tcl.m4 except that we've added a
7735    # "windows" case and removed some core-only vars.
7736
7737    do64bit_ok=no
7738    # default to '{$LIBS}' and set to "" on per-platform necessary basis
7739    SHLIB_LD_LIBS='${LIBS}'
7740    # When ld needs options to work in 64-bit mode, put them in
7741    # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
7742    # is disabled by the user. [Bug 1016796]
7743    LDFLAGS_ARCH=""
7744    UNSHARED_LIB_SUFFIX=""
7745    # TEA specific: use PACKAGE_VERSION instead of VERSION
7746    TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
7747    ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
7748    TCL_LIB_VERSIONS_OK=ok
7749    CFLAGS_DEBUG=-g
7750    CFLAGS_OPTIMIZE=-O
7751    if test "$GCC" = yes; then
7752
7753	# TEA specific:
7754	CFLAGS_OPTIMIZE=-O2
7755	CFLAGS_WARNING="-Wall"
7756
7757else
7758  CFLAGS_WARNING=""
7759fi
7760
7761    # Extract the first word of "ar", so it can be a program name with args.
7762set dummy ar; ac_word=$2
7763{ echo "$as_me:$LINENO: checking for $ac_word" >&5
7764echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7765if test "${ac_cv_prog_AR+set}" = set; then
7766  echo $ECHO_N "(cached) $ECHO_C" >&6
7767else
7768  if test -n "$AR"; then
7769  ac_cv_prog_AR="$AR" # Let the user override the test.
7770else
7771as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7772for as_dir in $PATH
7773do
7774  IFS=$as_save_IFS
7775  test -z "$as_dir" && as_dir=.
7776  for ac_exec_ext in '' $ac_executable_extensions; do
7777  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7778    ac_cv_prog_AR="ar"
7779    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7780    break 2
7781  fi
7782done
7783done
7784IFS=$as_save_IFS
7785
7786fi
7787fi
7788AR=$ac_cv_prog_AR
7789if test -n "$AR"; then
7790  { echo "$as_me:$LINENO: result: $AR" >&5
7791echo "${ECHO_T}$AR" >&6; }
7792else
7793  { echo "$as_me:$LINENO: result: no" >&5
7794echo "${ECHO_T}no" >&6; }
7795fi
7796
7797
7798    STLIB_LD='${AR} cr'
7799    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
7800    if test "x$SHLIB_VERSION" = x; then
7801  SHLIB_VERSION="1.0"
7802fi
7803
7804    case $system in
7805	# TEA specific:
7806	windows)
7807	    # This is a 2-stage check to make sure we have the 64-bit SDK
7808	    # We have to know where the SDK is installed.
7809	    # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
7810	    # MACHINE is IX86 for LINK, but this is used by the manifest,
7811	    # which requires x86|amd64|ia64.
7812	    MACHINE="X86"
7813	    if test "$do64bit" != "no" ; then
7814		if test "x${MSSDK}x" = "xx" ; then
7815		    MSSDK="C:/Progra~1/Microsoft Platform SDK"
7816		fi
7817		MSSDK=`echo "$MSSDK" | sed -e  's!\\\!/!g'`
7818		PATH64=""
7819		case "$do64bit" in
7820		    amd64|x64|yes)
7821			MACHINE="AMD64" ; # default to AMD64 64-bit build
7822			PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
7823			;;
7824		    ia64)
7825			MACHINE="IA64"
7826			PATH64="${MSSDK}/Bin/Win64"
7827			;;
7828		esac
7829		if test ! -d "${PATH64}" ; then
7830		    { echo "$as_me:$LINENO: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&5
7831echo "$as_me: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&2;}
7832		    { echo "$as_me:$LINENO: WARNING: Ensure latest Platform SDK is installed" >&5
7833echo "$as_me: WARNING: Ensure latest Platform SDK is installed" >&2;}
7834		    do64bit="no"
7835		else
7836		    { echo "$as_me:$LINENO: result:    Using 64-bit $MACHINE mode" >&5
7837echo "${ECHO_T}   Using 64-bit $MACHINE mode" >&6; }
7838		    do64bit_ok="yes"
7839		fi
7840	    fi
7841
7842	    if test "$doWince" != "no" ; then
7843		if test "$do64bit" != "no" ; then
7844		    { { echo "$as_me:$LINENO: error: Windows/CE and 64-bit builds incompatible" >&5
7845echo "$as_me: error: Windows/CE and 64-bit builds incompatible" >&2;}
7846   { (exit 1); exit 1; }; }
7847		fi
7848		if test "$GCC" = "yes" ; then
7849		    { { echo "$as_me:$LINENO: error: Windows/CE and GCC builds incompatible" >&5
7850echo "$as_me: error: Windows/CE and GCC builds incompatible" >&2;}
7851   { (exit 1); exit 1; }; }
7852		fi
7853
7854    # First, look for one uninstalled.
7855    # the alternative search directory is invoked by --with-celib
7856
7857    if test x"${no_celib}" = x ; then
7858	# we reset no_celib in case something fails here
7859	no_celib=true
7860
7861# Check whether --with-celib was given.
7862if test "${with_celib+set}" = set; then
7863  withval=$with_celib; with_celibconfig=${withval}
7864fi
7865
7866	{ echo "$as_me:$LINENO: checking for Windows/CE celib directory" >&5
7867echo $ECHO_N "checking for Windows/CE celib directory... $ECHO_C" >&6; }
7868	if test "${ac_cv_c_celibconfig+set}" = set; then
7869  echo $ECHO_N "(cached) $ECHO_C" >&6
7870else
7871
7872	    # First check to see if --with-celibconfig was specified.
7873	    if test x"${with_celibconfig}" != x ; then
7874		if test -d "${with_celibconfig}/inc" ; then
7875		    ac_cv_c_celibconfig=`(cd ${with_celibconfig}; pwd)`
7876		else
7877		    { { echo "$as_me:$LINENO: error: ${with_celibconfig} directory doesn't contain inc directory" >&5
7878echo "$as_me: error: ${with_celibconfig} directory doesn't contain inc directory" >&2;}
7879   { (exit 1); exit 1; }; }
7880		fi
7881	    fi
7882
7883	    # then check for a celib library
7884	    if test x"${ac_cv_c_celibconfig}" = x ; then
7885		for i in \
7886			../celib-palm-3.0 \
7887			../celib \
7888			../../celib-palm-3.0 \
7889			../../celib \
7890			`ls -dr ../celib-*3.[0-9]* 2>/dev/null` \
7891			${srcdir}/../celib-palm-3.0 \
7892			${srcdir}/../celib \
7893			`ls -dr ${srcdir}/../celib-*3.[0-9]* 2>/dev/null` \
7894			; do
7895		    if test -d "$i/inc" ; then
7896			ac_cv_c_celibconfig=`(cd $i; pwd)`
7897			break
7898		    fi
7899		done
7900	    fi
7901
7902fi
7903
7904	if test x"${ac_cv_c_celibconfig}" = x ; then
7905	    { { echo "$as_me:$LINENO: error: Cannot find celib support library directory" >&5
7906echo "$as_me: error: Cannot find celib support library directory" >&2;}
7907   { (exit 1); exit 1; }; }
7908	else
7909	    no_celib=
7910	    CELIB_DIR=${ac_cv_c_celibconfig}
7911	    CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
7912	    { echo "$as_me:$LINENO: result: found $CELIB_DIR" >&5
7913echo "${ECHO_T}found $CELIB_DIR" >&6; }
7914	fi
7915    fi
7916
7917		# Set defaults for common evc4/PPC2003 setup
7918		# Currently Tcl requires 300+, possibly 420+ for sockets
7919		CEVERSION=420; 		# could be 211 300 301 400 420 ...
7920		TARGETCPU=ARMV4;	# could be ARMV4 ARM MIPS SH3 X86 ...
7921		ARCH=ARM;		# could be ARM MIPS X86EM ...
7922		PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002"
7923		if test "$doWince" != "yes"; then
7924		    # If !yes then the user specified something
7925		    # Reset ARCH to allow user to skip specifying it
7926		    ARCH=
7927		    eval `echo $doWince | awk -F, '{ \
7928	    if (length($1)) { printf "CEVERSION=\"%s\"\n", $1; \
7929	    if ($1 < 400)   { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \
7930	    if (length($2)) { printf "TARGETCPU=\"%s\"\n", toupper($2) }; \
7931	    if (length($3)) { printf "ARCH=\"%s\"\n", toupper($3) }; \
7932	    if (length($4)) { printf "PLATFORM=\"%s\"\n", $4 }; \
7933		    }'`
7934		    if test "x${ARCH}" = "x" ; then
7935			ARCH=$TARGETCPU;
7936		    fi
7937		fi
7938		OSVERSION=WCE$CEVERSION;
7939	    	if test "x${WCEROOT}" = "x" ; then
7940			WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0"
7941		    if test ! -d "${WCEROOT}" ; then
7942			WCEROOT="C:/Program Files/Microsoft eMbedded Tools"
7943		    fi
7944		fi
7945		if test "x${SDKROOT}" = "x" ; then
7946		    SDKROOT="C:/Program Files/Windows CE Tools"
7947		    if test ! -d "${SDKROOT}" ; then
7948			SDKROOT="C:/Windows CE Tools"
7949		    fi
7950		fi
7951		WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'`
7952		SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
7953		if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \
7954		    -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then
7955		    { { echo "$as_me:$LINENO: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&5
7956echo "$as_me: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&2;}
7957   { (exit 1); exit 1; }; }
7958		    doWince="no"
7959		else
7960		    # We could PATH_NOSPACE these, but that's not important,
7961		    # as long as we quote them when used.
7962		    CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include"
7963		    if test -d "${CEINCLUDE}/${TARGETCPU}" ; then
7964			CEINCLUDE="${CEINCLUDE}/${TARGETCPU}"
7965		    fi
7966		    CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}"
7967    		fi
7968	    fi
7969
7970	    if test "$GCC" != "yes" ; then
7971	        if test "${SHARED_BUILD}" = "0" ; then
7972		    runtime=-MT
7973	        else
7974		    runtime=-MD
7975	        fi
7976
7977                if test "$do64bit" != "no" ; then
7978		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
7979		    CC="\"${PATH64}/cl.exe\""
7980		    CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
7981		    RC="\"${MSSDK}/bin/rc.exe\""
7982		    lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
7983		    LINKBIN="\"${PATH64}/link.exe\""
7984		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
7985		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
7986		    # Avoid 'unresolved external symbol __security_cookie'
7987		    # errors, c.f. http://support.microsoft.com/?id=894573
7988
7989    vars="bufferoverflowU.lib"
7990    for i in $vars; do
7991	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
7992	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
7993	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
7994	fi
7995	PKG_LIBS="$PKG_LIBS $i"
7996    done
7997
7998
7999		elif test "$doWince" != "no" ; then
8000		    CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin"
8001		    if test "${TARGETCPU}" = "X86"; then
8002			CC="\"${CEBINROOT}/cl.exe\""
8003		    else
8004			CC="\"${CEBINROOT}/cl${ARCH}.exe\""
8005		    fi
8006		    CFLAGS="$CFLAGS -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\""
8007		    RC="\"${WCEROOT}/Common/EVC/bin/rc.exe\""
8008		    arch=`echo ${ARCH} | awk '{print tolower($0)}'`
8009		    defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _WINDOWS"
8010		    if test "${SHARED_BUILD}" = "1" ; then
8011			# Static CE builds require static celib as well
8012		    	defs="${defs} _DLL"
8013		    fi
8014		    for i in $defs ; do
8015
8016cat >>confdefs.h <<_ACEOF
8017#define $i 1
8018_ACEOF
8019
8020		    done
8021
8022cat >>confdefs.h <<_ACEOF
8023#define _WIN32_WCE $CEVERSION
8024_ACEOF
8025
8026
8027cat >>confdefs.h <<_ACEOF
8028#define UNDER_CE $CEVERSION
8029_ACEOF
8030
8031		    CFLAGS_DEBUG="-nologo -Zi -Od"
8032		    CFLAGS_OPTIMIZE="-nologo -Ox"
8033		    lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'`
8034		    lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
8035		    LINKBIN="\"${CEBINROOT}/link.exe\""
8036
8037		else
8038		    RC="rc"
8039		    lflags="-nologo"
8040    		    LINKBIN="link"
8041		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
8042		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
8043		fi
8044	    fi
8045
8046	    if test "$GCC" = "yes"; then
8047		# mingw gcc mode
8048		RC="windres"
8049		CFLAGS_DEBUG="-g"
8050		CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
8051		SHLIB_LD="$CC -shared"
8052		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
8053		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
8054		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
8055	    else
8056		SHLIB_LD="${LINKBIN} -dll ${lflags}"
8057		# link -lib only works when -lib is the first arg
8058		STLIB_LD="${LINKBIN} -lib ${lflags}"
8059		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib'
8060		PATHTYPE=-w
8061		# For information on what debugtype is most useful, see:
8062		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
8063		# and also
8064		# http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx
8065		# This essentially turns it all on.
8066		LDFLAGS_DEBUG="-debug -debugtype:cv"
8067		LDFLAGS_OPTIMIZE="-release"
8068		if test "$doWince" != "no" ; then
8069		    LDFLAGS_CONSOLE="-link ${lflags}"
8070		    LDFLAGS_WINDOW=${LDFLAGS_CONSOLE}
8071		else
8072		    LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
8073		    LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
8074		fi
8075	    fi
8076
8077	    SHLIB_SUFFIX=".dll"
8078	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
8079
8080	    TCL_LIB_VERSIONS_OK=nodots
8081    	    ;;
8082	AIX-*)
8083	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"; then
8084
8085		# AIX requires the _r compiler when gcc isn't being used
8086		case "${CC}" in
8087		    *_r|*_r\ *)
8088			# ok ...
8089			;;
8090		    *)
8091			# Make sure only first arg gets _r
8092		    	CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'`
8093			;;
8094		esac
8095		{ echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5
8096echo "${ECHO_T}Using $CC for compiling with threads" >&6; }
8097
8098fi
8099
8100	    LIBS="$LIBS -lc"
8101	    SHLIB_CFLAGS=""
8102	    SHLIB_SUFFIX=".so"
8103
8104	    LD_LIBRARY_PATH_VAR="LIBPATH"
8105
8106	    # Check to enable 64-bit flags for compiler/linker
8107	    if test "$do64bit" = yes; then
8108
8109		if test "$GCC" = yes; then
8110
8111		    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
8112echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
8113
8114else
8115
8116		    do64bit_ok=yes
8117		    CFLAGS="$CFLAGS -q64"
8118		    LDFLAGS_ARCH="-q64"
8119		    RANLIB="${RANLIB} -X64"
8120		    AR="${AR} -X64"
8121		    SHLIB_LD_FLAGS="-b64"
8122
8123fi
8124
8125
8126fi
8127
8128
8129	    if test "`uname -m`" = ia64; then
8130
8131		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
8132		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
8133		if test "$GCC" = yes; then
8134
8135		    CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
8136
8137else
8138
8139		    CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
8140
8141fi
8142
8143		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
8144
8145else
8146
8147		if test "$GCC" = yes; then
8148
8149		    SHLIB_LD='${CC} -shared -Wl,-bexpall'
8150
8151else
8152
8153		    SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bexpall -H512 -T512 -bnoentry"
8154		    LDFLAGS="$LDFLAGS -brtl"
8155
8156fi
8157
8158		SHLIB_LD="${SHLIB_LD} ${SHLIB_LD_FLAGS}"
8159		CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
8160		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8161
8162fi
8163
8164	    ;;
8165	BeOS*)
8166	    SHLIB_CFLAGS="-fPIC"
8167	    SHLIB_LD='${CC} -nostart'
8168	    SHLIB_SUFFIX=".so"
8169
8170	    #-----------------------------------------------------------
8171	    # Check for inet_ntoa in -lbind, for BeOS (which also needs
8172	    # -lsocket, even if the network functions are in -lnet which
8173	    # is always linked to, for compatibility.
8174	    #-----------------------------------------------------------
8175	    { echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5
8176echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6; }
8177if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then
8178  echo $ECHO_N "(cached) $ECHO_C" >&6
8179else
8180  ac_check_lib_save_LIBS=$LIBS
8181LIBS="-lbind  $LIBS"
8182cat >conftest.$ac_ext <<_ACEOF
8183/* confdefs.h.  */
8184_ACEOF
8185cat confdefs.h >>conftest.$ac_ext
8186cat >>conftest.$ac_ext <<_ACEOF
8187/* end confdefs.h.  */
8188
8189/* Override any GCC internal prototype to avoid an error.
8190   Use char because int might match the return type of a GCC
8191   builtin and then its argument prototype would still apply.  */
8192#ifdef __cplusplus
8193extern "C"
8194#endif
8195char inet_ntoa ();
8196int
8197main ()
8198{
8199return inet_ntoa ();
8200  ;
8201  return 0;
8202}
8203_ACEOF
8204rm -f conftest.$ac_objext conftest$ac_exeext
8205if { (ac_try="$ac_link"
8206case "(($ac_try" in
8207  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8208  *) ac_try_echo=$ac_try;;
8209esac
8210eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8211  (eval "$ac_link") 2>conftest.er1
8212  ac_status=$?
8213  grep -v '^ *+' conftest.er1 >conftest.err
8214  rm -f conftest.er1
8215  cat conftest.err >&5
8216  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8217  (exit $ac_status); } && {
8218	 test -z "$ac_c_werror_flag" ||
8219	 test ! -s conftest.err
8220       } && test -s conftest$ac_exeext &&
8221       $as_test_x conftest$ac_exeext; then
8222  ac_cv_lib_bind_inet_ntoa=yes
8223else
8224  echo "$as_me: failed program was:" >&5
8225sed 's/^/| /' conftest.$ac_ext >&5
8226
8227	ac_cv_lib_bind_inet_ntoa=no
8228fi
8229
8230rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8231      conftest$ac_exeext conftest.$ac_ext
8232LIBS=$ac_check_lib_save_LIBS
8233fi
8234{ echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5
8235echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6; }
8236if test $ac_cv_lib_bind_inet_ntoa = yes; then
8237  LIBS="$LIBS -lbind -lsocket"
8238fi
8239
8240	    ;;
8241	BSD/OS-4.*)
8242	    SHLIB_CFLAGS="-export-dynamic -fPIC"
8243	    SHLIB_LD='${CC} -shared'
8244	    SHLIB_SUFFIX=".so"
8245	    LDFLAGS="$LDFLAGS -export-dynamic"
8246	    CC_SEARCH_FLAGS=""
8247	    LD_SEARCH_FLAGS=""
8248	    ;;
8249	CYGWIN_*)
8250	    SHLIB_CFLAGS=""
8251	    SHLIB_LD='${CC} -shared'
8252	    SHLIB_SUFFIX=".dll"
8253	    EXE_SUFFIX=".exe"
8254	    CC_SEARCH_FLAGS=""
8255	    LD_SEARCH_FLAGS=""
8256	    ;;
8257	Haiku*)
8258	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
8259	    SHLIB_CFLAGS="-fPIC"
8260	    SHLIB_SUFFIX=".so"
8261	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
8262	    { echo "$as_me:$LINENO: checking for inet_ntoa in -lnetwork" >&5
8263echo $ECHO_N "checking for inet_ntoa in -lnetwork... $ECHO_C" >&6; }
8264if test "${ac_cv_lib_network_inet_ntoa+set}" = set; then
8265  echo $ECHO_N "(cached) $ECHO_C" >&6
8266else
8267  ac_check_lib_save_LIBS=$LIBS
8268LIBS="-lnetwork  $LIBS"
8269cat >conftest.$ac_ext <<_ACEOF
8270/* confdefs.h.  */
8271_ACEOF
8272cat confdefs.h >>conftest.$ac_ext
8273cat >>conftest.$ac_ext <<_ACEOF
8274/* end confdefs.h.  */
8275
8276/* Override any GCC internal prototype to avoid an error.
8277   Use char because int might match the return type of a GCC
8278   builtin and then its argument prototype would still apply.  */
8279#ifdef __cplusplus
8280extern "C"
8281#endif
8282char inet_ntoa ();
8283int
8284main ()
8285{
8286return inet_ntoa ();
8287  ;
8288  return 0;
8289}
8290_ACEOF
8291rm -f conftest.$ac_objext conftest$ac_exeext
8292if { (ac_try="$ac_link"
8293case "(($ac_try" in
8294  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8295  *) ac_try_echo=$ac_try;;
8296esac
8297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8298  (eval "$ac_link") 2>conftest.er1
8299  ac_status=$?
8300  grep -v '^ *+' conftest.er1 >conftest.err
8301  rm -f conftest.er1
8302  cat conftest.err >&5
8303  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8304  (exit $ac_status); } && {
8305	 test -z "$ac_c_werror_flag" ||
8306	 test ! -s conftest.err
8307       } && test -s conftest$ac_exeext &&
8308       $as_test_x conftest$ac_exeext; then
8309  ac_cv_lib_network_inet_ntoa=yes
8310else
8311  echo "$as_me: failed program was:" >&5
8312sed 's/^/| /' conftest.$ac_ext >&5
8313
8314	ac_cv_lib_network_inet_ntoa=no
8315fi
8316
8317rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8318      conftest$ac_exeext conftest.$ac_ext
8319LIBS=$ac_check_lib_save_LIBS
8320fi
8321{ echo "$as_me:$LINENO: result: $ac_cv_lib_network_inet_ntoa" >&5
8322echo "${ECHO_T}$ac_cv_lib_network_inet_ntoa" >&6; }
8323if test $ac_cv_lib_network_inet_ntoa = yes; then
8324  LIBS="$LIBS -lnetwork"
8325fi
8326
8327	    ;;
8328	HP-UX-*.11.*)
8329	    # Use updated header definitions where possible
8330
8331cat >>confdefs.h <<\_ACEOF
8332#define _XOPEN_SOURCE_EXTENDED 1
8333_ACEOF
8334
8335	    # TEA specific: Needed by Tcl, but not most extensions
8336	    #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
8337	    #LIBS="$LIBS -lxnet"               # Use the XOPEN network library
8338
8339	    if test "`uname -m`" = ia64; then
8340
8341		SHLIB_SUFFIX=".so"
8342		# Use newer C++ library for C++ extensions
8343		#if test "$GCC" != "yes" ; then
8344		#   CPPFLAGS="-AA"
8345		#fi
8346
8347else
8348
8349		SHLIB_SUFFIX=".sl"
8350
8351fi
8352
8353	    { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
8354echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
8355if test "${ac_cv_lib_dld_shl_load+set}" = set; then
8356  echo $ECHO_N "(cached) $ECHO_C" >&6
8357else
8358  ac_check_lib_save_LIBS=$LIBS
8359LIBS="-ldld  $LIBS"
8360cat >conftest.$ac_ext <<_ACEOF
8361/* confdefs.h.  */
8362_ACEOF
8363cat confdefs.h >>conftest.$ac_ext
8364cat >>conftest.$ac_ext <<_ACEOF
8365/* end confdefs.h.  */
8366
8367/* Override any GCC internal prototype to avoid an error.
8368   Use char because int might match the return type of a GCC
8369   builtin and then its argument prototype would still apply.  */
8370#ifdef __cplusplus
8371extern "C"
8372#endif
8373char shl_load ();
8374int
8375main ()
8376{
8377return shl_load ();
8378  ;
8379  return 0;
8380}
8381_ACEOF
8382rm -f conftest.$ac_objext conftest$ac_exeext
8383if { (ac_try="$ac_link"
8384case "(($ac_try" in
8385  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8386  *) ac_try_echo=$ac_try;;
8387esac
8388eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8389  (eval "$ac_link") 2>conftest.er1
8390  ac_status=$?
8391  grep -v '^ *+' conftest.er1 >conftest.err
8392  rm -f conftest.er1
8393  cat conftest.err >&5
8394  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8395  (exit $ac_status); } && {
8396	 test -z "$ac_c_werror_flag" ||
8397	 test ! -s conftest.err
8398       } && test -s conftest$ac_exeext &&
8399       $as_test_x conftest$ac_exeext; then
8400  ac_cv_lib_dld_shl_load=yes
8401else
8402  echo "$as_me: failed program was:" >&5
8403sed 's/^/| /' conftest.$ac_ext >&5
8404
8405	ac_cv_lib_dld_shl_load=no
8406fi
8407
8408rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8409      conftest$ac_exeext conftest.$ac_ext
8410LIBS=$ac_check_lib_save_LIBS
8411fi
8412{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
8413echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
8414if test $ac_cv_lib_dld_shl_load = yes; then
8415  tcl_ok=yes
8416else
8417  tcl_ok=no
8418fi
8419
8420	    if test "$tcl_ok" = yes; then
8421
8422		LDFLAGS="$LDFLAGS -E"
8423		CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
8424		LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
8425		LD_LIBRARY_PATH_VAR="SHLIB_PATH"
8426
8427fi
8428
8429	    if test "$GCC" = yes; then
8430
8431		SHLIB_LD='${CC} -shared'
8432		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8433
8434else
8435
8436		CFLAGS="$CFLAGS -z"
8437		# Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
8438		#CFLAGS="$CFLAGS +DAportable"
8439		SHLIB_CFLAGS="+z"
8440		SHLIB_LD="ld -b"
8441
8442fi
8443
8444
8445	    # Check to enable 64-bit flags for compiler/linker
8446	    if test "$do64bit" = "yes"; then
8447
8448		if test "$GCC" = yes; then
8449
8450		    case `${CC} -dumpmachine` in
8451			hppa64*)
8452			    # 64-bit gcc in use.  Fix flags for GNU ld.
8453			    do64bit_ok=yes
8454			    SHLIB_LD='${CC} -shared'
8455			    if test $doRpath = yes; then
8456
8457				CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8458fi
8459
8460			    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8461			    ;;
8462			*)
8463			    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
8464echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
8465			    ;;
8466		    esac
8467
8468else
8469
8470		    do64bit_ok=yes
8471		    CFLAGS="$CFLAGS +DD64"
8472		    LDFLAGS_ARCH="+DD64"
8473
8474fi
8475
8476
8477fi
8478 ;;
8479	IRIX-6.*)
8480	    SHLIB_CFLAGS=""
8481	    SHLIB_LD="ld -n32 -shared -rdata_shared"
8482	    SHLIB_SUFFIX=".so"
8483	    if test $doRpath = yes; then
8484
8485		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8486		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
8487fi
8488
8489	    if test "$GCC" = yes; then
8490
8491		CFLAGS="$CFLAGS -mabi=n32"
8492		LDFLAGS="$LDFLAGS -mabi=n32"
8493
8494else
8495
8496		case $system in
8497		    IRIX-6.3)
8498			# Use to build 6.2 compatible binaries on 6.3.
8499			CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
8500			;;
8501		    *)
8502			CFLAGS="$CFLAGS -n32"
8503			;;
8504		esac
8505		LDFLAGS="$LDFLAGS -n32"
8506
8507fi
8508
8509	    ;;
8510	IRIX64-6.*)
8511	    SHLIB_CFLAGS=""
8512	    SHLIB_LD="ld -n32 -shared -rdata_shared"
8513	    SHLIB_SUFFIX=".so"
8514	    if test $doRpath = yes; then
8515
8516		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8517		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
8518fi
8519
8520
8521	    # Check to enable 64-bit flags for compiler/linker
8522
8523	    if test "$do64bit" = yes; then
8524
8525	        if test "$GCC" = yes; then
8526
8527	            { echo "$as_me:$LINENO: WARNING: 64bit mode not supported by gcc" >&5
8528echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;}
8529
8530else
8531
8532	            do64bit_ok=yes
8533	            SHLIB_LD="ld -64 -shared -rdata_shared"
8534	            CFLAGS="$CFLAGS -64"
8535	            LDFLAGS_ARCH="-64"
8536
8537fi
8538
8539
8540fi
8541
8542	    ;;
8543	Linux*)
8544	    SHLIB_CFLAGS="-fPIC"
8545	    SHLIB_SUFFIX=".so"
8546
8547	    # TEA specific:
8548	    CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
8549
8550	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
8551	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}'
8552	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
8553	    if test $doRpath = yes; then
8554
8555		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8556fi
8557
8558	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8559	    if test "`uname -m`" = "alpha"; then
8560  CFLAGS="$CFLAGS -mieee"
8561fi
8562
8563	    if test $do64bit = yes; then
8564
8565		{ echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5
8566echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6; }
8567if test "${tcl_cv_cc_m64+set}" = set; then
8568  echo $ECHO_N "(cached) $ECHO_C" >&6
8569else
8570
8571		    hold_cflags=$CFLAGS
8572		    CFLAGS="$CFLAGS -m64"
8573		    cat >conftest.$ac_ext <<_ACEOF
8574/* confdefs.h.  */
8575_ACEOF
8576cat confdefs.h >>conftest.$ac_ext
8577cat >>conftest.$ac_ext <<_ACEOF
8578/* end confdefs.h.  */
8579
8580int
8581main ()
8582{
8583
8584  ;
8585  return 0;
8586}
8587_ACEOF
8588rm -f conftest.$ac_objext conftest$ac_exeext
8589if { (ac_try="$ac_link"
8590case "(($ac_try" in
8591  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8592  *) ac_try_echo=$ac_try;;
8593esac
8594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8595  (eval "$ac_link") 2>conftest.er1
8596  ac_status=$?
8597  grep -v '^ *+' conftest.er1 >conftest.err
8598  rm -f conftest.er1
8599  cat conftest.err >&5
8600  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8601  (exit $ac_status); } && {
8602	 test -z "$ac_c_werror_flag" ||
8603	 test ! -s conftest.err
8604       } && test -s conftest$ac_exeext &&
8605       $as_test_x conftest$ac_exeext; then
8606  tcl_cv_cc_m64=yes
8607else
8608  echo "$as_me: failed program was:" >&5
8609sed 's/^/| /' conftest.$ac_ext >&5
8610
8611	tcl_cv_cc_m64=no
8612fi
8613
8614rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8615      conftest$ac_exeext conftest.$ac_ext
8616		    CFLAGS=$hold_cflags
8617fi
8618{ echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5
8619echo "${ECHO_T}$tcl_cv_cc_m64" >&6; }
8620		if test $tcl_cv_cc_m64 = yes; then
8621
8622		    CFLAGS="$CFLAGS -m64"
8623		    do64bit_ok=yes
8624
8625fi
8626
8627
8628fi
8629
8630
8631	    # The combo of gcc + glibc has a bug related to inlining of
8632	    # functions like strtod(). The -fno-builtin flag should address
8633	    # this problem but it does not work. The -fno-inline flag is kind
8634	    # of overkill but it works. Disable inlining only when one of the
8635	    # files in compat/*.c is being linked in.
8636
8637	    if test x"${USE_COMPAT}" != x; then
8638  CFLAGS="$CFLAGS -fno-inline"
8639fi
8640
8641
8642	    ;;
8643	GNU*)
8644	    SHLIB_CFLAGS="-fPIC"
8645	    SHLIB_SUFFIX=".so"
8646
8647	    SHLIB_LD='${CC} -shared'
8648	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
8649	    CC_SEARCH_FLAGS=""
8650	    LD_SEARCH_FLAGS=""
8651	    if test "`uname -m`" = "alpha"; then
8652  CFLAGS="$CFLAGS -mieee"
8653fi
8654
8655	    ;;
8656	Lynx*)
8657	    SHLIB_CFLAGS="-fPIC"
8658	    SHLIB_SUFFIX=".so"
8659	    CFLAGS_OPTIMIZE=-02
8660	    SHLIB_LD='${CC} -shared'
8661	    LD_FLAGS="-Wl,--export-dynamic"
8662	    if test $doRpath = yes; then
8663
8664		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8665		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8666fi
8667
8668	    ;;
8669	OpenBSD-*)
8670	    SHLIB_CFLAGS="-fPIC"
8671	    SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
8672	    SHLIB_SUFFIX=".so"
8673	    if test $doRpath = yes; then
8674
8675		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8676fi
8677
8678	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8679	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
8680	    { echo "$as_me:$LINENO: checking for ELF" >&5
8681echo $ECHO_N "checking for ELF... $ECHO_C" >&6; }
8682if test "${tcl_cv_ld_elf+set}" = set; then
8683  echo $ECHO_N "(cached) $ECHO_C" >&6
8684else
8685
8686		cat >conftest.$ac_ext <<_ACEOF
8687/* confdefs.h.  */
8688_ACEOF
8689cat confdefs.h >>conftest.$ac_ext
8690cat >>conftest.$ac_ext <<_ACEOF
8691/* end confdefs.h.  */
8692
8693#ifdef __ELF__
8694	yes
8695#endif
8696
8697_ACEOF
8698if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8699  $EGREP "yes" >/dev/null 2>&1; then
8700  tcl_cv_ld_elf=yes
8701else
8702  tcl_cv_ld_elf=no
8703fi
8704rm -f -r conftest*
8705
8706fi
8707{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5
8708echo "${ECHO_T}$tcl_cv_ld_elf" >&6; }
8709	    if test $tcl_cv_ld_elf = yes; then
8710
8711		LDFLAGS=-Wl,-export-dynamic
8712
8713else
8714  LDFLAGS=""
8715fi
8716
8717	    if test "${TCL_THREADS}" = "1"; then
8718
8719		# OpenBSD builds and links with -pthread, never -lpthread.
8720		LIBS=`echo $LIBS | sed s/-lpthread//`
8721		CFLAGS="$CFLAGS -pthread"
8722		SHLIB_CFLAGS="$SHLIB_CFLAGS -pthread"
8723
8724fi
8725
8726	    # OpenBSD doesn't do version numbers with dots.
8727	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
8728	    TCL_LIB_VERSIONS_OK=nodots
8729	    ;;
8730	NetBSD-*|FreeBSD-[3-4].*)
8731	    # FreeBSD 3.* and greater have ELF.
8732	    # NetBSD 2.* has ELF and can use 'cc -shared' to build shared libs
8733	    SHLIB_CFLAGS="-fPIC"
8734	    SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
8735	    SHLIB_SUFFIX=".so"
8736	    LDFLAGS="$LDFLAGS -export-dynamic"
8737	    if test $doRpath = yes; then
8738
8739		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8740fi
8741
8742	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8743	    if test "${TCL_THREADS}" = "1"; then
8744
8745		# The -pthread needs to go in the CFLAGS, not LIBS
8746		LIBS=`echo $LIBS | sed s/-pthread//`
8747		CFLAGS="$CFLAGS -pthread"
8748	    	LDFLAGS="$LDFLAGS -pthread"
8749
8750fi
8751
8752	    case $system in
8753	    FreeBSD-3.*)
8754	    	# FreeBSD-3 doesn't handle version numbers with dots.
8755	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
8756	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
8757	    	TCL_LIB_VERSIONS_OK=nodots
8758		;;
8759	    esac
8760	    ;;
8761	FreeBSD-*)
8762	    # This configuration from FreeBSD Ports.
8763	    SHLIB_CFLAGS="-fPIC"
8764	    SHLIB_LD="${CC} -shared"
8765	    TCL_SHLIB_LD_EXTRAS="-soname \$@"
8766	    SHLIB_SUFFIX=".so"
8767	    LDFLAGS=""
8768	    if test $doRpath = yes; then
8769
8770		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8771		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
8772fi
8773
8774	    if test "${TCL_THREADS}" = "1"; then
8775
8776		# The -pthread needs to go in the LDFLAGS, not LIBS
8777		LIBS=`echo $LIBS | sed s/-pthread//`
8778		CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8779		LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
8780fi
8781
8782	    # Version numbers are dot-stripped by system policy.
8783	    TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .`
8784	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
8785	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
8786	    TCL_LIB_VERSIONS_OK=nodots
8787	    ;;
8788	Darwin-*)
8789	    CFLAGS_OPTIMIZE="-Os"
8790	    SHLIB_CFLAGS="-fno-common"
8791	    # To avoid discrepancies between what headers configure sees during
8792	    # preprocessing tests and compiling tests, move any -isysroot and
8793	    # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
8794	    CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
8795		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
8796		if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`"
8797	    CFLAGS="`echo " ${CFLAGS}" | \
8798		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
8799		if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`"
8800	    if test $do64bit = yes; then
8801
8802		case `arch` in
8803		    ppc)
8804			{ echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5
8805echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6; }
8806if test "${tcl_cv_cc_arch_ppc64+set}" = set; then
8807  echo $ECHO_N "(cached) $ECHO_C" >&6
8808else
8809
8810			    hold_cflags=$CFLAGS
8811			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
8812			    cat >conftest.$ac_ext <<_ACEOF
8813/* confdefs.h.  */
8814_ACEOF
8815cat confdefs.h >>conftest.$ac_ext
8816cat >>conftest.$ac_ext <<_ACEOF
8817/* end confdefs.h.  */
8818
8819int
8820main ()
8821{
8822
8823  ;
8824  return 0;
8825}
8826_ACEOF
8827rm -f conftest.$ac_objext conftest$ac_exeext
8828if { (ac_try="$ac_link"
8829case "(($ac_try" in
8830  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8831  *) ac_try_echo=$ac_try;;
8832esac
8833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8834  (eval "$ac_link") 2>conftest.er1
8835  ac_status=$?
8836  grep -v '^ *+' conftest.er1 >conftest.err
8837  rm -f conftest.er1
8838  cat conftest.err >&5
8839  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8840  (exit $ac_status); } && {
8841	 test -z "$ac_c_werror_flag" ||
8842	 test ! -s conftest.err
8843       } && test -s conftest$ac_exeext &&
8844       $as_test_x conftest$ac_exeext; then
8845  tcl_cv_cc_arch_ppc64=yes
8846else
8847  echo "$as_me: failed program was:" >&5
8848sed 's/^/| /' conftest.$ac_ext >&5
8849
8850	tcl_cv_cc_arch_ppc64=no
8851fi
8852
8853rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8854      conftest$ac_exeext conftest.$ac_ext
8855			    CFLAGS=$hold_cflags
8856fi
8857{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5
8858echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6; }
8859			if test $tcl_cv_cc_arch_ppc64 = yes; then
8860
8861			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
8862			    do64bit_ok=yes
8863
8864fi
8865;;
8866		    i386)
8867			{ echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5
8868echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6; }
8869if test "${tcl_cv_cc_arch_x86_64+set}" = set; then
8870  echo $ECHO_N "(cached) $ECHO_C" >&6
8871else
8872
8873			    hold_cflags=$CFLAGS
8874			    CFLAGS="$CFLAGS -arch x86_64"
8875			    cat >conftest.$ac_ext <<_ACEOF
8876/* confdefs.h.  */
8877_ACEOF
8878cat confdefs.h >>conftest.$ac_ext
8879cat >>conftest.$ac_ext <<_ACEOF
8880/* end confdefs.h.  */
8881
8882int
8883main ()
8884{
8885
8886  ;
8887  return 0;
8888}
8889_ACEOF
8890rm -f conftest.$ac_objext conftest$ac_exeext
8891if { (ac_try="$ac_link"
8892case "(($ac_try" in
8893  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8894  *) ac_try_echo=$ac_try;;
8895esac
8896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8897  (eval "$ac_link") 2>conftest.er1
8898  ac_status=$?
8899  grep -v '^ *+' conftest.er1 >conftest.err
8900  rm -f conftest.er1
8901  cat conftest.err >&5
8902  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8903  (exit $ac_status); } && {
8904	 test -z "$ac_c_werror_flag" ||
8905	 test ! -s conftest.err
8906       } && test -s conftest$ac_exeext &&
8907       $as_test_x conftest$ac_exeext; then
8908  tcl_cv_cc_arch_x86_64=yes
8909else
8910  echo "$as_me: failed program was:" >&5
8911sed 's/^/| /' conftest.$ac_ext >&5
8912
8913	tcl_cv_cc_arch_x86_64=no
8914fi
8915
8916rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8917      conftest$ac_exeext conftest.$ac_ext
8918			    CFLAGS=$hold_cflags
8919fi
8920{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5
8921echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6; }
8922			if test $tcl_cv_cc_arch_x86_64 = yes; then
8923
8924			    CFLAGS="$CFLAGS -arch x86_64"
8925			    do64bit_ok=yes
8926
8927fi
8928;;
8929		    *)
8930			{ echo "$as_me:$LINENO: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5
8931echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};;
8932		esac
8933
8934else
8935
8936		# Check for combined 32-bit and 64-bit fat build
8937		if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
8938		    && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '; then
8939
8940		    fat_32_64=yes
8941fi
8942
8943
8944fi
8945
8946	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
8947	    SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
8948	    { echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5
8949echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6; }
8950if test "${tcl_cv_ld_single_module+set}" = set; then
8951  echo $ECHO_N "(cached) $ECHO_C" >&6
8952else
8953
8954		hold_ldflags=$LDFLAGS
8955		LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
8956		cat >conftest.$ac_ext <<_ACEOF
8957/* confdefs.h.  */
8958_ACEOF
8959cat confdefs.h >>conftest.$ac_ext
8960cat >>conftest.$ac_ext <<_ACEOF
8961/* end confdefs.h.  */
8962
8963int
8964main ()
8965{
8966int i;
8967  ;
8968  return 0;
8969}
8970_ACEOF
8971rm -f conftest.$ac_objext conftest$ac_exeext
8972if { (ac_try="$ac_link"
8973case "(($ac_try" in
8974  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8975  *) ac_try_echo=$ac_try;;
8976esac
8977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8978  (eval "$ac_link") 2>conftest.er1
8979  ac_status=$?
8980  grep -v '^ *+' conftest.er1 >conftest.err
8981  rm -f conftest.er1
8982  cat conftest.err >&5
8983  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8984  (exit $ac_status); } && {
8985	 test -z "$ac_c_werror_flag" ||
8986	 test ! -s conftest.err
8987       } && test -s conftest$ac_exeext &&
8988       $as_test_x conftest$ac_exeext; then
8989  tcl_cv_ld_single_module=yes
8990else
8991  echo "$as_me: failed program was:" >&5
8992sed 's/^/| /' conftest.$ac_ext >&5
8993
8994	tcl_cv_ld_single_module=no
8995fi
8996
8997rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8998      conftest$ac_exeext conftest.$ac_ext
8999		LDFLAGS=$hold_ldflags
9000fi
9001{ echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5
9002echo "${ECHO_T}$tcl_cv_ld_single_module" >&6; }
9003	    if test $tcl_cv_ld_single_module = yes; then
9004
9005		SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
9006
9007fi
9008
9009	    # TEA specific: link shlib with current and compatiblity version flags
9010	    vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([0-9]\{1,5\}\)\(\(\.[0-9]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d`
9011	    SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}"
9012	    SHLIB_SUFFIX=".dylib"
9013	    # Don't use -prebind when building for Mac OS X 10.4 or later only:
9014	    if test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \
9015		"`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4; then
9016
9017		LDFLAGS="$LDFLAGS -prebind"
9018fi
9019
9020	    LDFLAGS="$LDFLAGS -headerpad_max_install_names"
9021	    { echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5
9022echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6; }
9023if test "${tcl_cv_ld_search_paths_first+set}" = set; then
9024  echo $ECHO_N "(cached) $ECHO_C" >&6
9025else
9026
9027		hold_ldflags=$LDFLAGS
9028		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
9029		cat >conftest.$ac_ext <<_ACEOF
9030/* confdefs.h.  */
9031_ACEOF
9032cat confdefs.h >>conftest.$ac_ext
9033cat >>conftest.$ac_ext <<_ACEOF
9034/* end confdefs.h.  */
9035
9036int
9037main ()
9038{
9039int i;
9040  ;
9041  return 0;
9042}
9043_ACEOF
9044rm -f conftest.$ac_objext conftest$ac_exeext
9045if { (ac_try="$ac_link"
9046case "(($ac_try" in
9047  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9048  *) ac_try_echo=$ac_try;;
9049esac
9050eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9051  (eval "$ac_link") 2>conftest.er1
9052  ac_status=$?
9053  grep -v '^ *+' conftest.er1 >conftest.err
9054  rm -f conftest.er1
9055  cat conftest.err >&5
9056  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9057  (exit $ac_status); } && {
9058	 test -z "$ac_c_werror_flag" ||
9059	 test ! -s conftest.err
9060       } && test -s conftest$ac_exeext &&
9061       $as_test_x conftest$ac_exeext; then
9062  tcl_cv_ld_search_paths_first=yes
9063else
9064  echo "$as_me: failed program was:" >&5
9065sed 's/^/| /' conftest.$ac_ext >&5
9066
9067	tcl_cv_ld_search_paths_first=no
9068fi
9069
9070rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9071      conftest$ac_exeext conftest.$ac_ext
9072		LDFLAGS=$hold_ldflags
9073fi
9074{ echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5
9075echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6; }
9076	    if test $tcl_cv_ld_search_paths_first = yes; then
9077
9078		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
9079
9080fi
9081
9082	    if test "$tcl_cv_cc_visibility_hidden" != yes; then
9083
9084
9085cat >>confdefs.h <<\_ACEOF
9086#define MODULE_SCOPE __private_extern__
9087_ACEOF
9088
9089		tcl_cv_cc_visibility_hidden=yes
9090
9091fi
9092
9093	    CC_SEARCH_FLAGS=""
9094	    LD_SEARCH_FLAGS=""
9095	    LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
9096	    # TEA specific: for combined 32 & 64 bit fat builds of Tk
9097	    # extensions, verify that 64-bit build is possible.
9098	    if test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"; then
9099
9100		if test "${TEA_WINDOWINGSYSTEM}" = x11; then
9101
9102		    { echo "$as_me:$LINENO: checking for 64-bit X11" >&5
9103echo $ECHO_N "checking for 64-bit X11... $ECHO_C" >&6; }
9104if test "${tcl_cv_lib_x11_64+set}" = set; then
9105  echo $ECHO_N "(cached) $ECHO_C" >&6
9106else
9107
9108			for v in CFLAGS CPPFLAGS LDFLAGS; do
9109			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
9110			done
9111			CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
9112			LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
9113			cat >conftest.$ac_ext <<_ACEOF
9114/* confdefs.h.  */
9115_ACEOF
9116cat confdefs.h >>conftest.$ac_ext
9117cat >>conftest.$ac_ext <<_ACEOF
9118/* end confdefs.h.  */
9119#include <X11/Xlib.h>
9120int
9121main ()
9122{
9123XrmInitialize();
9124  ;
9125  return 0;
9126}
9127_ACEOF
9128rm -f conftest.$ac_objext conftest$ac_exeext
9129if { (ac_try="$ac_link"
9130case "(($ac_try" in
9131  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9132  *) ac_try_echo=$ac_try;;
9133esac
9134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9135  (eval "$ac_link") 2>conftest.er1
9136  ac_status=$?
9137  grep -v '^ *+' conftest.er1 >conftest.err
9138  rm -f conftest.er1
9139  cat conftest.err >&5
9140  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9141  (exit $ac_status); } && {
9142	 test -z "$ac_c_werror_flag" ||
9143	 test ! -s conftest.err
9144       } && test -s conftest$ac_exeext &&
9145       $as_test_x conftest$ac_exeext; then
9146  tcl_cv_lib_x11_64=yes
9147else
9148  echo "$as_me: failed program was:" >&5
9149sed 's/^/| /' conftest.$ac_ext >&5
9150
9151	tcl_cv_lib_x11_64=no
9152fi
9153
9154rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9155      conftest$ac_exeext conftest.$ac_ext
9156			for v in CFLAGS CPPFLAGS LDFLAGS; do
9157			    eval $v'="$hold_'$v'"'
9158			done
9159fi
9160{ echo "$as_me:$LINENO: result: $tcl_cv_lib_x11_64" >&5
9161echo "${ECHO_T}$tcl_cv_lib_x11_64" >&6; }
9162
9163fi
9164
9165		if test "${TEA_WINDOWINGSYSTEM}" = aqua; then
9166
9167		    { echo "$as_me:$LINENO: checking for 64-bit Tk" >&5
9168echo $ECHO_N "checking for 64-bit Tk... $ECHO_C" >&6; }
9169if test "${tcl_cv_lib_tk_64+set}" = set; then
9170  echo $ECHO_N "(cached) $ECHO_C" >&6
9171else
9172
9173			for v in CFLAGS CPPFLAGS LDFLAGS; do
9174			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
9175			done
9176			CPPFLAGS="$CPPFLAGS -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 `eval "echo ${TCL_INCLUDES} ${TK_INCLUDES}"`"
9177			LDFLAGS="$LDFLAGS ${TCL_STUB_LIB_SPEC} ${TK_STUB_LIB_SPEC}"
9178			cat >conftest.$ac_ext <<_ACEOF
9179/* confdefs.h.  */
9180_ACEOF
9181cat confdefs.h >>conftest.$ac_ext
9182cat >>conftest.$ac_ext <<_ACEOF
9183/* end confdefs.h.  */
9184#include <tk.h>
9185int
9186main ()
9187{
9188Tk_InitStubs(NULL, "", 0);
9189  ;
9190  return 0;
9191}
9192_ACEOF
9193rm -f conftest.$ac_objext conftest$ac_exeext
9194if { (ac_try="$ac_link"
9195case "(($ac_try" in
9196  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9197  *) ac_try_echo=$ac_try;;
9198esac
9199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9200  (eval "$ac_link") 2>conftest.er1
9201  ac_status=$?
9202  grep -v '^ *+' conftest.er1 >conftest.err
9203  rm -f conftest.er1
9204  cat conftest.err >&5
9205  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9206  (exit $ac_status); } && {
9207	 test -z "$ac_c_werror_flag" ||
9208	 test ! -s conftest.err
9209       } && test -s conftest$ac_exeext &&
9210       $as_test_x conftest$ac_exeext; then
9211  tcl_cv_lib_tk_64=yes
9212else
9213  echo "$as_me: failed program was:" >&5
9214sed 's/^/| /' conftest.$ac_ext >&5
9215
9216	tcl_cv_lib_tk_64=no
9217fi
9218
9219rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9220      conftest$ac_exeext conftest.$ac_ext
9221			for v in CFLAGS CPPFLAGS LDFLAGS; do
9222			    eval $v'="$hold_'$v'"'
9223			done
9224fi
9225{ echo "$as_me:$LINENO: result: $tcl_cv_lib_tk_64" >&5
9226echo "${ECHO_T}$tcl_cv_lib_tk_64" >&6; }
9227
9228fi
9229
9230		# remove 64-bit arch flags from CFLAGS et al. if configuration
9231		# does not support 64-bit.
9232		if test "$tcl_cv_lib_tk_64" = no -o "$tcl_cv_lib_x11_64" = no; then
9233
9234		    { echo "$as_me:$LINENO: Removing 64-bit architectures from compiler & linker flags" >&5
9235echo "$as_me: Removing 64-bit architectures from compiler & linker flags" >&6;}
9236		    for v in CFLAGS CPPFLAGS LDFLAGS; do
9237			eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
9238		    done
9239fi
9240
9241
9242fi
9243
9244	    ;;
9245	OS/390-*)
9246	    CFLAGS_OPTIMIZE=""		# Optimizer is buggy
9247
9248cat >>confdefs.h <<\_ACEOF
9249#define _OE_SOCKETS 1
9250_ACEOF
9251
9252	    ;;
9253	OSF1-V*)
9254	    # Digital OSF/1
9255	    SHLIB_CFLAGS=""
9256	    if test "$SHARED_BUILD" = 1; then
9257
9258	        SHLIB_LD='ld -shared -expect_unresolved "*"'
9259
9260else
9261
9262	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
9263
9264fi
9265
9266	    SHLIB_SUFFIX=".so"
9267	    if test $doRpath = yes; then
9268
9269		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9270		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
9271fi
9272
9273	    if test "$GCC" = yes; then
9274  CFLAGS="$CFLAGS -mieee"
9275else
9276
9277		CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
9278fi
9279
9280	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
9281	    if test "${TCL_THREADS}" = 1; then
9282
9283		CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
9284		CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
9285		LIBS=`echo $LIBS | sed s/-lpthreads//`
9286		if test "$GCC" = yes; then
9287
9288		    LIBS="$LIBS -lpthread -lmach -lexc"
9289
9290else
9291
9292		    CFLAGS="$CFLAGS -pthread"
9293		    LDFLAGS="$LDFLAGS -pthread"
9294
9295fi
9296
9297
9298fi
9299
9300	    ;;
9301	QNX-6*)
9302	    # QNX RTP
9303	    # This may work for all QNX, but it was only reported for v6.
9304	    SHLIB_CFLAGS="-fPIC"
9305	    SHLIB_LD="ld -Bshareable -x"
9306	    SHLIB_LD_LIBS=""
9307	    SHLIB_SUFFIX=".so"
9308	    CC_SEARCH_FLAGS=""
9309	    LD_SEARCH_FLAGS=""
9310	    ;;
9311	SCO_SV-3.2*)
9312	    if test "$GCC" = yes; then
9313
9314		SHLIB_CFLAGS="-fPIC -melf"
9315		LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
9316
9317else
9318
9319	       SHLIB_CFLAGS="-Kpic -belf"
9320	       LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
9321
9322fi
9323
9324	    SHLIB_LD="ld -G"
9325	    SHLIB_LD_LIBS=""
9326	    SHLIB_SUFFIX=".so"
9327	    CC_SEARCH_FLAGS=""
9328	    LD_SEARCH_FLAGS=""
9329	    ;;
9330	SunOS-5.[0-6])
9331	    # Careful to not let 5.10+ fall into this case
9332
9333	    # Note: If _REENTRANT isn't defined, then Solaris
9334	    # won't define thread-safe library routines.
9335
9336
9337cat >>confdefs.h <<\_ACEOF
9338#define _REENTRANT 1
9339_ACEOF
9340
9341
9342cat >>confdefs.h <<\_ACEOF
9343#define _POSIX_PTHREAD_SEMANTICS 1
9344_ACEOF
9345
9346
9347	    SHLIB_CFLAGS="-KPIC"
9348	    SHLIB_SUFFIX=".so"
9349	    if test "$GCC" = yes; then
9350
9351		SHLIB_LD='${CC} -shared'
9352		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
9353		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9354
9355else
9356
9357		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
9358		CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
9359		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9360
9361fi
9362
9363	    ;;
9364	SunOS-5*)
9365	    # Note: If _REENTRANT isn't defined, then Solaris
9366	    # won't define thread-safe library routines.
9367
9368
9369cat >>confdefs.h <<\_ACEOF
9370#define _REENTRANT 1
9371_ACEOF
9372
9373
9374cat >>confdefs.h <<\_ACEOF
9375#define _POSIX_PTHREAD_SEMANTICS 1
9376_ACEOF
9377
9378
9379	    SHLIB_CFLAGS="-KPIC"
9380
9381	    # Check to enable 64-bit flags for compiler/linker
9382	    if test "$do64bit" = yes; then
9383
9384		arch=`isainfo`
9385		if test "$arch" = "sparcv9 sparc"; then
9386
9387		    if test "$GCC" = yes; then
9388
9389			if test "`${CC} -dumpversion | awk -F. '{print $1}'`" -lt 3; then
9390
9391			    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5
9392echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;}
9393
9394else
9395
9396			    do64bit_ok=yes
9397			    CFLAGS="$CFLAGS -m64 -mcpu=v9"
9398			    LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
9399			    SHLIB_CFLAGS="-fPIC"
9400
9401fi
9402
9403
9404else
9405
9406			do64bit_ok=yes
9407			if test "$do64bitVIS" = yes; then
9408
9409			    CFLAGS="$CFLAGS -xarch=v9a"
9410			    LDFLAGS_ARCH="-xarch=v9a"
9411
9412else
9413
9414			    CFLAGS="$CFLAGS -xarch=v9"
9415			    LDFLAGS_ARCH="-xarch=v9"
9416
9417fi
9418
9419			# Solaris 64 uses this as well
9420			#LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
9421
9422fi
9423
9424
9425else
9426  if test "$arch" = "amd64 i386"; then
9427
9428		    if test "$GCC" = yes; then
9429
9430			case $system in
9431			    SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
9432				do64bit_ok=yes
9433				CFLAGS="$CFLAGS -m64"
9434				LDFLAGS="$LDFLAGS -m64";;
9435			    *)
9436				{ echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
9437echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;};;
9438			esac
9439
9440else
9441
9442			do64bit_ok=yes
9443			case $system in
9444			    SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
9445				CFLAGS="$CFLAGS -m64"
9446				LDFLAGS="$LDFLAGS -m64";;
9447			    *)
9448				CFLAGS="$CFLAGS -xarch=amd64"
9449				LDFLAGS="$LDFLAGS -xarch=amd64";;
9450			esac
9451
9452fi
9453
9454
9455else
9456  { echo "$as_me:$LINENO: WARNING: 64bit mode not supported for $arch" >&5
9457echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;}
9458fi
9459
9460fi
9461
9462
9463fi
9464
9465
9466	    SHLIB_SUFFIX=".so"
9467	    if test "$GCC" = yes; then
9468
9469		SHLIB_LD='${CC} -shared'
9470		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
9471		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9472		if test "$do64bit_ok" = yes; then
9473
9474		    if test "$arch" = "sparcv9 sparc"; then
9475
9476			# We need to specify -static-libgcc or we need to
9477			# add the path to the sparv9 libgcc.
9478			# JH: static-libgcc is necessary for core Tcl, but may
9479			# not be necessary for extensions.
9480			SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
9481			# for finding sparcv9 libgcc, get the regular libgcc
9482			# path, remove so name and append 'sparcv9'
9483			#v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
9484			#CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
9485
9486else
9487  if test "$arch" = "amd64 i386"; then
9488
9489			# JH: static-libgcc is necessary for core Tcl, but may
9490			# not be necessary for extensions.
9491			SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
9492
9493fi
9494
9495fi
9496
9497
9498fi
9499
9500
9501else
9502
9503		case $system in
9504		    SunOS-5.[1-9][0-9]*)
9505			# TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
9506			SHLIB_LD='${CC} -G -z text ${LDFLAGS_DEFAULT}';;
9507		    *)
9508			SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
9509		esac
9510		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
9511		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
9512
9513fi
9514
9515	    ;;
9516    esac
9517
9518    if test "$do64bit" = yes -a "$do64bit_ok" = no; then
9519
9520	{ echo "$as_me:$LINENO: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5
9521echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;}
9522
9523fi
9524
9525
9526
9527
9528    # Add in the arch flags late to ensure it wasn't removed.
9529    # Not necessary in TEA, but this is aligned with core
9530    LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
9531
9532    # If we're running gcc, then change the C flags for compiling shared
9533    # libraries to the right flags for gcc, instead of those for the
9534    # standard manufacturer compiler.
9535
9536    if test "$GCC" = yes; then
9537
9538	case $system in
9539	    AIX-*) ;;
9540	    BSD/OS*) ;;
9541	    CYGWIN_*) ;;
9542	    IRIX*) ;;
9543	    NetBSD-*|FreeBSD-*|OpenBSD-*) ;;
9544	    Darwin-*) ;;
9545	    SCO_SV-3.2*) ;;
9546	    windows) ;;
9547	    *) SHLIB_CFLAGS="-fPIC" ;;
9548	esac
9549fi
9550
9551
9552    if test "$tcl_cv_cc_visibility_hidden" != yes; then
9553
9554
9555cat >>confdefs.h <<\_ACEOF
9556#define MODULE_SCOPE extern
9557_ACEOF
9558
9559
9560cat >>confdefs.h <<\_ACEOF
9561#define NO_VIZ
9562_ACEOF
9563
9564
9565fi
9566
9567
9568    if test "$SHARED_LIB_SUFFIX" = ""; then
9569
9570	# TEA specific: use PACKAGE_VERSION instead of VERSION
9571	SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'
9572fi
9573
9574    if test "$UNSHARED_LIB_SUFFIX" = ""; then
9575
9576	# TEA specific: use PACKAGE_VERSION instead of VERSION
9577	UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
9578fi
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593    # These must be called after we do the basic CFLAGS checks and
9594    # verify any possible 64-bit or similar switches are necessary
9595
9596    { echo "$as_me:$LINENO: checking for required early compiler flags" >&5
9597echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6; }
9598    tcl_flags=""
9599
9600    if test "${tcl_cv_flag__isoc99_source+set}" = set; then
9601  echo $ECHO_N "(cached) $ECHO_C" >&6
9602else
9603  cat >conftest.$ac_ext <<_ACEOF
9604/* confdefs.h.  */
9605_ACEOF
9606cat confdefs.h >>conftest.$ac_ext
9607cat >>conftest.$ac_ext <<_ACEOF
9608/* end confdefs.h.  */
9609#include <stdlib.h>
9610int
9611main ()
9612{
9613char *p = (char *)strtoll; char *q = (char *)strtoull;
9614  ;
9615  return 0;
9616}
9617_ACEOF
9618rm -f conftest.$ac_objext
9619if { (ac_try="$ac_compile"
9620case "(($ac_try" in
9621  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9622  *) ac_try_echo=$ac_try;;
9623esac
9624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9625  (eval "$ac_compile") 2>conftest.er1
9626  ac_status=$?
9627  grep -v '^ *+' conftest.er1 >conftest.err
9628  rm -f conftest.er1
9629  cat conftest.err >&5
9630  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9631  (exit $ac_status); } && {
9632	 test -z "$ac_c_werror_flag" ||
9633	 test ! -s conftest.err
9634       } && test -s conftest.$ac_objext; then
9635  tcl_cv_flag__isoc99_source=no
9636else
9637  echo "$as_me: failed program was:" >&5
9638sed 's/^/| /' conftest.$ac_ext >&5
9639
9640	cat >conftest.$ac_ext <<_ACEOF
9641/* confdefs.h.  */
9642_ACEOF
9643cat confdefs.h >>conftest.$ac_ext
9644cat >>conftest.$ac_ext <<_ACEOF
9645/* end confdefs.h.  */
9646#define _ISOC99_SOURCE 1
9647#include <stdlib.h>
9648int
9649main ()
9650{
9651char *p = (char *)strtoll; char *q = (char *)strtoull;
9652  ;
9653  return 0;
9654}
9655_ACEOF
9656rm -f conftest.$ac_objext
9657if { (ac_try="$ac_compile"
9658case "(($ac_try" in
9659  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9660  *) ac_try_echo=$ac_try;;
9661esac
9662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9663  (eval "$ac_compile") 2>conftest.er1
9664  ac_status=$?
9665  grep -v '^ *+' conftest.er1 >conftest.err
9666  rm -f conftest.er1
9667  cat conftest.err >&5
9668  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9669  (exit $ac_status); } && {
9670	 test -z "$ac_c_werror_flag" ||
9671	 test ! -s conftest.err
9672       } && test -s conftest.$ac_objext; then
9673  tcl_cv_flag__isoc99_source=yes
9674else
9675  echo "$as_me: failed program was:" >&5
9676sed 's/^/| /' conftest.$ac_ext >&5
9677
9678	tcl_cv_flag__isoc99_source=no
9679fi
9680
9681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9682fi
9683
9684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9685fi
9686
9687    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
9688
9689cat >>confdefs.h <<\_ACEOF
9690#define _ISOC99_SOURCE 1
9691_ACEOF
9692
9693	tcl_flags="$tcl_flags _ISOC99_SOURCE"
9694    fi
9695
9696
9697    if test "${tcl_cv_flag__largefile64_source+set}" = set; then
9698  echo $ECHO_N "(cached) $ECHO_C" >&6
9699else
9700  cat >conftest.$ac_ext <<_ACEOF
9701/* confdefs.h.  */
9702_ACEOF
9703cat confdefs.h >>conftest.$ac_ext
9704cat >>conftest.$ac_ext <<_ACEOF
9705/* end confdefs.h.  */
9706#include <sys/stat.h>
9707int
9708main ()
9709{
9710struct stat64 buf; int i = stat64("/", &buf);
9711  ;
9712  return 0;
9713}
9714_ACEOF
9715rm -f conftest.$ac_objext
9716if { (ac_try="$ac_compile"
9717case "(($ac_try" in
9718  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9719  *) ac_try_echo=$ac_try;;
9720esac
9721eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9722  (eval "$ac_compile") 2>conftest.er1
9723  ac_status=$?
9724  grep -v '^ *+' conftest.er1 >conftest.err
9725  rm -f conftest.er1
9726  cat conftest.err >&5
9727  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9728  (exit $ac_status); } && {
9729	 test -z "$ac_c_werror_flag" ||
9730	 test ! -s conftest.err
9731       } && test -s conftest.$ac_objext; then
9732  tcl_cv_flag__largefile64_source=no
9733else
9734  echo "$as_me: failed program was:" >&5
9735sed 's/^/| /' conftest.$ac_ext >&5
9736
9737	cat >conftest.$ac_ext <<_ACEOF
9738/* confdefs.h.  */
9739_ACEOF
9740cat confdefs.h >>conftest.$ac_ext
9741cat >>conftest.$ac_ext <<_ACEOF
9742/* end confdefs.h.  */
9743#define _LARGEFILE64_SOURCE 1
9744#include <sys/stat.h>
9745int
9746main ()
9747{
9748struct stat64 buf; int i = stat64("/", &buf);
9749  ;
9750  return 0;
9751}
9752_ACEOF
9753rm -f conftest.$ac_objext
9754if { (ac_try="$ac_compile"
9755case "(($ac_try" in
9756  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9757  *) ac_try_echo=$ac_try;;
9758esac
9759eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9760  (eval "$ac_compile") 2>conftest.er1
9761  ac_status=$?
9762  grep -v '^ *+' conftest.er1 >conftest.err
9763  rm -f conftest.er1
9764  cat conftest.err >&5
9765  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9766  (exit $ac_status); } && {
9767	 test -z "$ac_c_werror_flag" ||
9768	 test ! -s conftest.err
9769       } && test -s conftest.$ac_objext; then
9770  tcl_cv_flag__largefile64_source=yes
9771else
9772  echo "$as_me: failed program was:" >&5
9773sed 's/^/| /' conftest.$ac_ext >&5
9774
9775	tcl_cv_flag__largefile64_source=no
9776fi
9777
9778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9779fi
9780
9781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9782fi
9783
9784    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
9785
9786cat >>confdefs.h <<\_ACEOF
9787#define _LARGEFILE64_SOURCE 1
9788_ACEOF
9789
9790	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
9791    fi
9792
9793
9794    if test "${tcl_cv_flag__largefile_source64+set}" = set; then
9795  echo $ECHO_N "(cached) $ECHO_C" >&6
9796else
9797  cat >conftest.$ac_ext <<_ACEOF
9798/* confdefs.h.  */
9799_ACEOF
9800cat confdefs.h >>conftest.$ac_ext
9801cat >>conftest.$ac_ext <<_ACEOF
9802/* end confdefs.h.  */
9803#include <sys/stat.h>
9804int
9805main ()
9806{
9807char *p = (char *)open64;
9808  ;
9809  return 0;
9810}
9811_ACEOF
9812rm -f conftest.$ac_objext
9813if { (ac_try="$ac_compile"
9814case "(($ac_try" in
9815  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9816  *) ac_try_echo=$ac_try;;
9817esac
9818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9819  (eval "$ac_compile") 2>conftest.er1
9820  ac_status=$?
9821  grep -v '^ *+' conftest.er1 >conftest.err
9822  rm -f conftest.er1
9823  cat conftest.err >&5
9824  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9825  (exit $ac_status); } && {
9826	 test -z "$ac_c_werror_flag" ||
9827	 test ! -s conftest.err
9828       } && test -s conftest.$ac_objext; then
9829  tcl_cv_flag__largefile_source64=no
9830else
9831  echo "$as_me: failed program was:" >&5
9832sed 's/^/| /' conftest.$ac_ext >&5
9833
9834	cat >conftest.$ac_ext <<_ACEOF
9835/* confdefs.h.  */
9836_ACEOF
9837cat confdefs.h >>conftest.$ac_ext
9838cat >>conftest.$ac_ext <<_ACEOF
9839/* end confdefs.h.  */
9840#define _LARGEFILE_SOURCE64 1
9841#include <sys/stat.h>
9842int
9843main ()
9844{
9845char *p = (char *)open64;
9846  ;
9847  return 0;
9848}
9849_ACEOF
9850rm -f conftest.$ac_objext
9851if { (ac_try="$ac_compile"
9852case "(($ac_try" in
9853  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9854  *) ac_try_echo=$ac_try;;
9855esac
9856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9857  (eval "$ac_compile") 2>conftest.er1
9858  ac_status=$?
9859  grep -v '^ *+' conftest.er1 >conftest.err
9860  rm -f conftest.er1
9861  cat conftest.err >&5
9862  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9863  (exit $ac_status); } && {
9864	 test -z "$ac_c_werror_flag" ||
9865	 test ! -s conftest.err
9866       } && test -s conftest.$ac_objext; then
9867  tcl_cv_flag__largefile_source64=yes
9868else
9869  echo "$as_me: failed program was:" >&5
9870sed 's/^/| /' conftest.$ac_ext >&5
9871
9872	tcl_cv_flag__largefile_source64=no
9873fi
9874
9875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9876fi
9877
9878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9879fi
9880
9881    if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then
9882
9883cat >>confdefs.h <<\_ACEOF
9884#define _LARGEFILE_SOURCE64 1
9885_ACEOF
9886
9887	tcl_flags="$tcl_flags _LARGEFILE_SOURCE64"
9888    fi
9889
9890    if test "x${tcl_flags}" = "x" ; then
9891	{ echo "$as_me:$LINENO: result: none" >&5
9892echo "${ECHO_T}none" >&6; }
9893    else
9894	{ echo "$as_me:$LINENO: result: ${tcl_flags}" >&5
9895echo "${ECHO_T}${tcl_flags}" >&6; }
9896    fi
9897
9898
9899    { echo "$as_me:$LINENO: checking for 64-bit integer type" >&5
9900echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6; }
9901    if test "${tcl_cv_type_64bit+set}" = set; then
9902  echo $ECHO_N "(cached) $ECHO_C" >&6
9903else
9904
9905	tcl_cv_type_64bit=none
9906	# See if the compiler knows natively about __int64
9907	cat >conftest.$ac_ext <<_ACEOF
9908/* confdefs.h.  */
9909_ACEOF
9910cat confdefs.h >>conftest.$ac_ext
9911cat >>conftest.$ac_ext <<_ACEOF
9912/* end confdefs.h.  */
9913
9914int
9915main ()
9916{
9917__int64 value = (__int64) 0;
9918  ;
9919  return 0;
9920}
9921_ACEOF
9922rm -f conftest.$ac_objext
9923if { (ac_try="$ac_compile"
9924case "(($ac_try" in
9925  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9926  *) ac_try_echo=$ac_try;;
9927esac
9928eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9929  (eval "$ac_compile") 2>conftest.er1
9930  ac_status=$?
9931  grep -v '^ *+' conftest.er1 >conftest.err
9932  rm -f conftest.er1
9933  cat conftest.err >&5
9934  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9935  (exit $ac_status); } && {
9936	 test -z "$ac_c_werror_flag" ||
9937	 test ! -s conftest.err
9938       } && test -s conftest.$ac_objext; then
9939  tcl_type_64bit=__int64
9940else
9941  echo "$as_me: failed program was:" >&5
9942sed 's/^/| /' conftest.$ac_ext >&5
9943
9944	tcl_type_64bit="long long"
9945fi
9946
9947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9948	# See if we should use long anyway  Note that we substitute in the
9949	# type that is our current guess for a 64-bit type inside this check
9950	# program, so it should be modified only carefully...
9951        cat >conftest.$ac_ext <<_ACEOF
9952/* confdefs.h.  */
9953_ACEOF
9954cat confdefs.h >>conftest.$ac_ext
9955cat >>conftest.$ac_ext <<_ACEOF
9956/* end confdefs.h.  */
9957
9958int
9959main ()
9960{
9961switch (0) {
9962            case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
9963        }
9964  ;
9965  return 0;
9966}
9967_ACEOF
9968rm -f conftest.$ac_objext
9969if { (ac_try="$ac_compile"
9970case "(($ac_try" in
9971  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9972  *) ac_try_echo=$ac_try;;
9973esac
9974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9975  (eval "$ac_compile") 2>conftest.er1
9976  ac_status=$?
9977  grep -v '^ *+' conftest.er1 >conftest.err
9978  rm -f conftest.er1
9979  cat conftest.err >&5
9980  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9981  (exit $ac_status); } && {
9982	 test -z "$ac_c_werror_flag" ||
9983	 test ! -s conftest.err
9984       } && test -s conftest.$ac_objext; then
9985  tcl_cv_type_64bit=${tcl_type_64bit}
9986else
9987  echo "$as_me: failed program was:" >&5
9988sed 's/^/| /' conftest.$ac_ext >&5
9989
9990
9991fi
9992
9993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9994fi
9995
9996    if test "${tcl_cv_type_64bit}" = none ; then
9997
9998cat >>confdefs.h <<\_ACEOF
9999#define TCL_WIDE_INT_IS_LONG 1
10000_ACEOF
10001
10002	{ echo "$as_me:$LINENO: result: using long" >&5
10003echo "${ECHO_T}using long" >&6; }
10004    elif test "${tcl_cv_type_64bit}" = "__int64" \
10005		-a "${TEA_PLATFORM}" = "windows" ; then
10006	# TEA specific: We actually want to use the default tcl.h checks in
10007	# this case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER*
10008	{ echo "$as_me:$LINENO: result: using Tcl header defaults" >&5
10009echo "${ECHO_T}using Tcl header defaults" >&6; }
10010    else
10011
10012cat >>confdefs.h <<_ACEOF
10013#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
10014_ACEOF
10015
10016	{ echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5
10017echo "${ECHO_T}${tcl_cv_type_64bit}" >&6; }
10018
10019	# Now check for auxiliary declarations
10020	{ echo "$as_me:$LINENO: checking for struct dirent64" >&5
10021echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6; }
10022if test "${tcl_cv_struct_dirent64+set}" = set; then
10023  echo $ECHO_N "(cached) $ECHO_C" >&6
10024else
10025
10026	    cat >conftest.$ac_ext <<_ACEOF
10027/* confdefs.h.  */
10028_ACEOF
10029cat confdefs.h >>conftest.$ac_ext
10030cat >>conftest.$ac_ext <<_ACEOF
10031/* end confdefs.h.  */
10032#include <sys/types.h>
10033#include <sys/dirent.h>
10034int
10035main ()
10036{
10037struct dirent64 p;
10038  ;
10039  return 0;
10040}
10041_ACEOF
10042rm -f conftest.$ac_objext
10043if { (ac_try="$ac_compile"
10044case "(($ac_try" in
10045  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10046  *) ac_try_echo=$ac_try;;
10047esac
10048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10049  (eval "$ac_compile") 2>conftest.er1
10050  ac_status=$?
10051  grep -v '^ *+' conftest.er1 >conftest.err
10052  rm -f conftest.er1
10053  cat conftest.err >&5
10054  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10055  (exit $ac_status); } && {
10056	 test -z "$ac_c_werror_flag" ||
10057	 test ! -s conftest.err
10058       } && test -s conftest.$ac_objext; then
10059  tcl_cv_struct_dirent64=yes
10060else
10061  echo "$as_me: failed program was:" >&5
10062sed 's/^/| /' conftest.$ac_ext >&5
10063
10064	tcl_cv_struct_dirent64=no
10065fi
10066
10067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10068fi
10069{ echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5
10070echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6; }
10071	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
10072
10073cat >>confdefs.h <<\_ACEOF
10074#define HAVE_STRUCT_DIRENT64 1
10075_ACEOF
10076
10077	fi
10078
10079	{ echo "$as_me:$LINENO: checking for struct stat64" >&5
10080echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6; }
10081if test "${tcl_cv_struct_stat64+set}" = set; then
10082  echo $ECHO_N "(cached) $ECHO_C" >&6
10083else
10084
10085	    cat >conftest.$ac_ext <<_ACEOF
10086/* confdefs.h.  */
10087_ACEOF
10088cat confdefs.h >>conftest.$ac_ext
10089cat >>conftest.$ac_ext <<_ACEOF
10090/* end confdefs.h.  */
10091#include <sys/stat.h>
10092int
10093main ()
10094{
10095struct stat64 p;
10096
10097  ;
10098  return 0;
10099}
10100_ACEOF
10101rm -f conftest.$ac_objext
10102if { (ac_try="$ac_compile"
10103case "(($ac_try" in
10104  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10105  *) ac_try_echo=$ac_try;;
10106esac
10107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10108  (eval "$ac_compile") 2>conftest.er1
10109  ac_status=$?
10110  grep -v '^ *+' conftest.er1 >conftest.err
10111  rm -f conftest.er1
10112  cat conftest.err >&5
10113  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10114  (exit $ac_status); } && {
10115	 test -z "$ac_c_werror_flag" ||
10116	 test ! -s conftest.err
10117       } && test -s conftest.$ac_objext; then
10118  tcl_cv_struct_stat64=yes
10119else
10120  echo "$as_me: failed program was:" >&5
10121sed 's/^/| /' conftest.$ac_ext >&5
10122
10123	tcl_cv_struct_stat64=no
10124fi
10125
10126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10127fi
10128{ echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5
10129echo "${ECHO_T}$tcl_cv_struct_stat64" >&6; }
10130	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
10131
10132cat >>confdefs.h <<\_ACEOF
10133#define HAVE_STRUCT_STAT64 1
10134_ACEOF
10135
10136	fi
10137
10138
10139
10140for ac_func in open64 lseek64
10141do
10142as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10143{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10144echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10145if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
10146  echo $ECHO_N "(cached) $ECHO_C" >&6
10147else
10148  cat >conftest.$ac_ext <<_ACEOF
10149/* confdefs.h.  */
10150_ACEOF
10151cat confdefs.h >>conftest.$ac_ext
10152cat >>conftest.$ac_ext <<_ACEOF
10153/* end confdefs.h.  */
10154/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10155   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10156#define $ac_func innocuous_$ac_func
10157
10158/* System header to define __stub macros and hopefully few prototypes,
10159    which can conflict with char $ac_func (); below.
10160    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10161    <limits.h> exists even on freestanding compilers.  */
10162
10163#ifdef __STDC__
10164# include <limits.h>
10165#else
10166# include <assert.h>
10167#endif
10168
10169#undef $ac_func
10170
10171/* Override any GCC internal prototype to avoid an error.
10172   Use char because int might match the return type of a GCC
10173   builtin and then its argument prototype would still apply.  */
10174#ifdef __cplusplus
10175extern "C"
10176#endif
10177char $ac_func ();
10178/* The GNU C library defines this for functions which it implements
10179    to always fail with ENOSYS.  Some functions are actually named
10180    something starting with __ and the normal name is an alias.  */
10181#if defined __stub_$ac_func || defined __stub___$ac_func
10182choke me
10183#endif
10184
10185int
10186main ()
10187{
10188return $ac_func ();
10189  ;
10190  return 0;
10191}
10192_ACEOF
10193rm -f conftest.$ac_objext conftest$ac_exeext
10194if { (ac_try="$ac_link"
10195case "(($ac_try" in
10196  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10197  *) ac_try_echo=$ac_try;;
10198esac
10199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10200  (eval "$ac_link") 2>conftest.er1
10201  ac_status=$?
10202  grep -v '^ *+' conftest.er1 >conftest.err
10203  rm -f conftest.er1
10204  cat conftest.err >&5
10205  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10206  (exit $ac_status); } && {
10207	 test -z "$ac_c_werror_flag" ||
10208	 test ! -s conftest.err
10209       } && test -s conftest$ac_exeext &&
10210       $as_test_x conftest$ac_exeext; then
10211  eval "$as_ac_var=yes"
10212else
10213  echo "$as_me: failed program was:" >&5
10214sed 's/^/| /' conftest.$ac_ext >&5
10215
10216	eval "$as_ac_var=no"
10217fi
10218
10219rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10220      conftest$ac_exeext conftest.$ac_ext
10221fi
10222ac_res=`eval echo '${'$as_ac_var'}'`
10223	       { echo "$as_me:$LINENO: result: $ac_res" >&5
10224echo "${ECHO_T}$ac_res" >&6; }
10225if test `eval echo '${'$as_ac_var'}'` = yes; then
10226  cat >>confdefs.h <<_ACEOF
10227#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10228_ACEOF
10229
10230fi
10231done
10232
10233	{ echo "$as_me:$LINENO: checking for off64_t" >&5
10234echo $ECHO_N "checking for off64_t... $ECHO_C" >&6; }
10235	if test "${tcl_cv_type_off64_t+set}" = set; then
10236  echo $ECHO_N "(cached) $ECHO_C" >&6
10237else
10238
10239	    cat >conftest.$ac_ext <<_ACEOF
10240/* confdefs.h.  */
10241_ACEOF
10242cat confdefs.h >>conftest.$ac_ext
10243cat >>conftest.$ac_ext <<_ACEOF
10244/* end confdefs.h.  */
10245#include <sys/types.h>
10246int
10247main ()
10248{
10249off64_t offset;
10250
10251  ;
10252  return 0;
10253}
10254_ACEOF
10255rm -f conftest.$ac_objext
10256if { (ac_try="$ac_compile"
10257case "(($ac_try" in
10258  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10259  *) ac_try_echo=$ac_try;;
10260esac
10261eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10262  (eval "$ac_compile") 2>conftest.er1
10263  ac_status=$?
10264  grep -v '^ *+' conftest.er1 >conftest.err
10265  rm -f conftest.er1
10266  cat conftest.err >&5
10267  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10268  (exit $ac_status); } && {
10269	 test -z "$ac_c_werror_flag" ||
10270	 test ! -s conftest.err
10271       } && test -s conftest.$ac_objext; then
10272  tcl_cv_type_off64_t=yes
10273else
10274  echo "$as_me: failed program was:" >&5
10275sed 's/^/| /' conftest.$ac_ext >&5
10276
10277	tcl_cv_type_off64_t=no
10278fi
10279
10280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10281fi
10282
10283			if test "x${tcl_cv_type_off64_t}" = "xyes" && \
10284	        test "x${ac_cv_func_lseek64}" = "xyes" && \
10285	        test "x${ac_cv_func_open64}" = "xyes" ; then
10286
10287cat >>confdefs.h <<\_ACEOF
10288#define HAVE_TYPE_OFF64_T 1
10289_ACEOF
10290
10291	    { echo "$as_me:$LINENO: result: yes" >&5
10292echo "${ECHO_T}yes" >&6; }
10293	else
10294	    { echo "$as_me:$LINENO: result: no" >&5
10295echo "${ECHO_T}no" >&6; }
10296	fi
10297    fi
10298
10299
10300
10301#--------------------------------------------------------------------
10302# Set the default compiler switches based on the --enable-symbols option.
10303#--------------------------------------------------------------------
10304
10305
10306
10307    { echo "$as_me:$LINENO: checking for build with symbols" >&5
10308echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6; }
10309    # Check whether --enable-symbols was given.
10310if test "${enable_symbols+set}" = set; then
10311  enableval=$enable_symbols; tcl_ok=$enableval
10312else
10313  tcl_ok=no
10314fi
10315
10316    DBGX=""
10317    if test "$tcl_ok" = "no"; then
10318	CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}"
10319	LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
10320	{ echo "$as_me:$LINENO: result: no" >&5
10321echo "${ECHO_T}no" >&6; }
10322    else
10323	CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
10324	LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
10325	if test "$tcl_ok" = "yes"; then
10326	    { echo "$as_me:$LINENO: result: yes (standard debugging)" >&5
10327echo "${ECHO_T}yes (standard debugging)" >&6; }
10328	fi
10329    fi
10330    # TEA specific:
10331    if test "${TEA_PLATFORM}" != "windows" ; then
10332	LDFLAGS_DEFAULT="${LDFLAGS}"
10333    fi
10334
10335
10336
10337
10338    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
10339
10340cat >>confdefs.h <<\_ACEOF
10341#define TCL_MEM_DEBUG 1
10342_ACEOF
10343
10344    fi
10345
10346    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
10347	if test "$tcl_ok" = "all"; then
10348	    { echo "$as_me:$LINENO: result: enabled symbols mem debugging" >&5
10349echo "${ECHO_T}enabled symbols mem debugging" >&6; }
10350	else
10351	    { echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5
10352echo "${ECHO_T}enabled $tcl_ok debugging" >&6; }
10353	fi
10354    fi
10355
10356
10357#--------------------------------------------------------------------
10358# Everyone should be linking against the Tcl stub library.  If you
10359# can't for some reason, remove this definition.  If you aren't using
10360# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
10361# link against the non-stubbed Tcl library.
10362#--------------------------------------------------------------------
10363
10364cat >>confdefs.h <<\_ACEOF
10365#define USE_TCL_STUBS 1
10366_ACEOF
10367
10368cat >>confdefs.h <<\_ACEOF
10369#define USE_TCLDOM_STUBS 1
10370_ACEOF
10371
10372
10373#--------------------------------------------------------------------
10374# This macro generates a line to use when building a library.  It
10375# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
10376# and TEA_LOAD_TCLCONFIG macros above.
10377#--------------------------------------------------------------------
10378
10379
10380    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
10381	MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(PKG_OBJECTS)"
10382	MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\$@ \$(PKG_OBJECTS)"
10383	cat >conftest.$ac_ext <<_ACEOF
10384/* confdefs.h.  */
10385_ACEOF
10386cat confdefs.h >>conftest.$ac_ext
10387cat >>conftest.$ac_ext <<_ACEOF
10388/* end confdefs.h.  */
10389
10390#if defined(_MSC_VER) && _MSC_VER >= 1400
10391print("manifest needed")
10392#endif
10393
10394_ACEOF
10395if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10396  $EGREP "manifest needed" >/dev/null 2>&1; then
10397
10398	# Could do a CHECK_PROG for mt, but should always be with MSVC8+
10399	VC_MANIFEST_EMBED_DLL="mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;2"
10400	VC_MANIFEST_EMBED_EXE="mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;1"
10401	MAKE_SHARED_LIB="${MAKE_SHARED_LIB} ; ${VC_MANIFEST_EMBED_DLL}"
10402
10403    CLEANFILES="$CLEANFILES *.manifest"
10404
10405
10406fi
10407rm -f -r conftest*
10408
10409	MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(PKG_STUB_OBJECTS)"
10410    else
10411	MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(PKG_OBJECTS)"
10412	MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
10413	MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(PKG_STUB_OBJECTS)"
10414    fi
10415
10416    if test "${SHARED_BUILD}" = "1" ; then
10417	MAKE_LIB="${MAKE_SHARED_LIB} "
10418    else
10419	MAKE_LIB="${MAKE_STATIC_LIB} "
10420    fi
10421
10422    #--------------------------------------------------------------------
10423    # Shared libraries and static libraries have different names.
10424    # Use the double eval to make sure any variables in the suffix is
10425    # substituted. (@@@ Might not be necessary anymore)
10426    #--------------------------------------------------------------------
10427
10428    if test "${TEA_PLATFORM}" = "windows" ; then
10429	if test "${SHARED_BUILD}" = "1" ; then
10430	    # We force the unresolved linking of symbols that are really in
10431	    # the private libraries of Tcl and Tk.
10432	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
10433	    if test x"${TK_BIN_DIR}" != x ; then
10434		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
10435	    fi
10436	    eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
10437	else
10438	    eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
10439	fi
10440	# Some packages build their own stubs libraries
10441	eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
10442	if test "$GCC" = "yes"; then
10443	    PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
10444	fi
10445	# These aren't needed on Windows (either MSVC or gcc)
10446	RANLIB=:
10447	RANLIB_STUB=:
10448    else
10449	RANLIB_STUB="${RANLIB}"
10450	if test "${SHARED_BUILD}" = "1" ; then
10451	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
10452	    if test x"${TK_BIN_DIR}" != x ; then
10453		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
10454	    fi
10455	    eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
10456	    RANLIB=:
10457	else
10458	    eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
10459	fi
10460	# Some packages build their own stubs libraries
10461	eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
10462    fi
10463
10464    # These are escaped so that only CFLAGS is picked up at configure time.
10465    # The other values will be substituted at make time.
10466    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
10467    if test "${SHARED_BUILD}" = "1" ; then
10468	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
10469    fi
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480#--------------------------------------------------------------------
10481# On Mac OS X we may want to build as a framework.
10482# This affects the location and naming of headers and libaries.
10483#--------------------------------------------------------------------
10484
10485# Check whether --enable-framework was given.
10486if test "${enable_framework+set}" = set; then
10487  enableval=$enable_framework; tcl_ok=$enableval
10488else
10489  tcl_ok=$1
10490fi
10491
10492
10493#--------------------------------------------------------------------
10494# libxml2 ----------------------------------------------------------
10495#--------------------------------------------------------------------
10496# Ask the user where to find the headers and libraries of libxml2.
10497# Remember this information for the generated files.
10498#--------------------------------------------------------------------
10499
10500{ echo "$as_me:$LINENO: checking for libxml2 headers" >&5
10501echo $ECHO_N "checking for libxml2 headers... $ECHO_C" >&6; }
10502
10503with_xml2include=NONE
10504
10505# Check whether --with-libxml2-include was given.
10506if test "${with_libxml2_include+set}" = set; then
10507  withval=$with_libxml2_include; with_xml2include=${withval}
10508fi
10509
10510
10511LIBXML2_INCLUDEDIR=""
10512for d in 			\
10513    $with_xml2include		\
10514    $with_xml2include/libxml2	\
10515    $prefix/include		\
10516    $prefix/include/libxml2	\
10517    usr/include			\
10518    usr/include/libxml2		\
10519    usr/local/include		\
10520    usr/local/include/libxml2
10521do
10522    if test -f "$d/xpath.h" ; then
10523	LIBXML2_INCLUDEDIR="$d"
10524	break
10525    fi
10526    if test -f "$d/libxml/xpath.h" ; then
10527	LIBXML2_INCLUDEDIR="$d"
10528	break
10529    fi
10530done
10531if test "x$LIBXML2_INCLUDEDIR" = "x"; then
10532    { { echo "$as_me:$LINENO: error: not found, please use --with-libxml2-include" >&5
10533echo "$as_me: error: not found, please use --with-libxml2-include" >&2;}
10534   { (exit 1); exit 1; }; }
10535else
10536    { echo "$as_me:$LINENO: result: ${LIBXML2_INCLUDEDIR}" >&5
10537echo "${ECHO_T}${LIBXML2_INCLUDEDIR}" >&6; }
10538fi
10539if test "${TEA_PLATFORM}" = "windows"; then
10540    LIBXML2_INCLUDEDIR=\"`${CYGPATH} ${LIBXML2_INCLUDEDIR} 2>/dev/null`\"
10541fi
10542
10543
10544#--------------------------------------------------------------------
10545
10546{ echo "$as_me:$LINENO: checking for libxml2 library" >&5
10547echo $ECHO_N "checking for libxml2 library... $ECHO_C" >&6; }
10548
10549with_xml2lib=NONE
10550
10551# Check whether --with-libxml2-lib was given.
10552if test "${with_libxml2_lib+set}" = set; then
10553  withval=$with_libxml2_lib; with_xml2lib=${withval}
10554fi
10555
10556
10557LIBXML2_LIBDIR=""
10558for d in 		\
10559    $with_xml2lib	\
10560    $exec_prefix/lib	\
10561    usr/lib		\
10562    usr/local/lib
10563do
10564    if test -f "$d/libxml2.so" ; then
10565	LIBXML2_LIBDIR="$d"
10566	break
10567    fi
10568    if test -f "$d/libxml2.sl" ; then
10569	LIBXML2_LIBDIR="$d"
10570	break
10571    fi
10572    if test -f "$d/libxml2.dll" ; then
10573	LIBXML2_LIBDIR="$d"
10574	break
10575    fi
10576    if test "${enable_framework}" = "yes" -a -f "$d/libxml" ;  then
10577	LIBXML2_LIBDIR="$d"
10578	break
10579    fi
10580    if test -f "$d/libxml2.dylib" ; then
10581	LIBXML2_LIBDIR="$d"
10582	break
10583    fi
10584    if test -f "$d/libxml2.a" ; then
10585	LIBXML2_LIBDIR="$d"
10586	break
10587    fi
10588done
10589if test "x$LIBXML2_LIBDIR" = "x"; then
10590    { { echo "$as_me:$LINENO: error: not found, please use --with-libxml2-lib" >&5
10591echo "$as_me: error: not found, please use --with-libxml2-lib" >&2;}
10592   { (exit 1); exit 1; }; }
10593else
10594    { echo "$as_me:$LINENO: result: ${LIBXML2_LIBDIR}" >&5
10595echo "${ECHO_T}${LIBXML2_LIBDIR}" >&6; }
10596fi
10597
10598
10599#--------------------------------------------------------------------
10600if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
10601    { echo "$as_me:$LINENO: checking for iconv library" >&5
10602echo $ECHO_N "checking for iconv library... $ECHO_C" >&6; }
10603
10604    with_iconvlib=NONE
10605
10606# Check whether --with-iconv-lib was given.
10607if test "${with_iconv_lib+set}" = set; then
10608  withval=$with_iconv_lib; with_iconvlib=${withval}
10609fi
10610
10611
10612    ICONV_LIBDIR=""
10613    for d in 		\
10614	$with_iconvlib	\
10615	$exec_prefix/lib	\
10616	usr/lib		\
10617	usr/local/lib
10618    do
10619	if test -f "$d/libiconv.so" ; then
10620	    ICONV_LIBDIR="$d"
10621	    break
10622	fi
10623	if test -f "$d/libiconv.sl" ; then
10624	    ICONV_LIBDIR="$d"
10625	    break
10626	fi
10627	if test -f "$d/iconv.dll" ; then
10628	    ICONV_LIBDIR="$d"
10629	    break
10630	fi
10631    done
10632    if test "x$ICONV_LIBDIR" = "x"; then
10633	{ { echo "$as_me:$LINENO: error: not found, please use --with-iconv-lib" >&5
10634echo "$as_me: error: not found, please use --with-iconv-lib" >&2;}
10635   { (exit 1); exit 1; }; }
10636    else
10637	{ echo "$as_me:$LINENO: result: ${ICONV_LIBDIR}" >&5
10638echo "${ECHO_T}${ICONV_LIBDIR}" >&6; }
10639    fi
10640
10641fi
10642
10643#--------------------------------------------------------------------
10644# __CHANGE__
10645# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
10646#--------------------------------------------------------------------
10647
10648if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
10649    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${LIBXML2_LIBDIR}/libxml2_a.lib`\""
10650    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${ICONV_LIBDIR}/iconv.lib`\""
10651    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${Tcldom_STUB_LIB_PATH}`\""
10652else
10653    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -L\${LIBXML2_LIBDIR} -lxml2"
10654    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${Tcldom_STUB_LIB_SPEC}"
10655fi
10656
10657## SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TCL_LIBS}"
10658
10659#--------------------------------------------------------------------
10660# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
10661# file during the install process.  Don't run the TCLSH_PROG through
10662# ${CYGPATH} because it's being used directly by make.
10663# Require that we use a tclsh shell version 8.2 or later since earlier
10664# versions have bugs in the pkg_mkIndex routine.
10665# Add WISH as well if this is a Tk extension.
10666#--------------------------------------------------------------------
10667
10668
10669    { echo "$as_me:$LINENO: checking for tclsh" >&5
10670echo $ECHO_N "checking for tclsh... $ECHO_C" >&6; }
10671    if test -f "${TCL_BIN_DIR}/Makefile" ; then
10672        # tclConfig.sh is in Tcl build directory
10673        if test "${TEA_PLATFORM}" = "windows"; then
10674            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
10675        else
10676            TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
10677        fi
10678    else
10679        # tclConfig.sh is in install location
10680        if test "${TEA_PLATFORM}" = "windows"; then
10681            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
10682        else
10683            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}"
10684        fi
10685        list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
10686              `ls -d ${TCL_BIN_DIR}/..     2>/dev/null` \
10687              `ls -d ${TCL_PREFIX}/bin     2>/dev/null`"
10688        for i in $list ; do
10689            if test -f "$i/${TCLSH_PROG}" ; then
10690                REAL_TCL_BIN_DIR="`cd "$i"; pwd`/"
10691                break
10692            fi
10693        done
10694        TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}"
10695    fi
10696    { echo "$as_me:$LINENO: result: ${TCLSH_PROG}" >&5
10697echo "${ECHO_T}${TCLSH_PROG}" >&6; }
10698
10699
10700
10701#--------------------------------------------------------------------
10702# These are for tcldomConfig.sh
10703#--------------------------------------------------------------------
10704
10705eval "${PACKAGE}_LIB_FILE=${PKG_LIB_FILE}"
10706eval "${PACKAGE}stub_LIB_FILE=${PKG_STUB_LIB_FILE}"
10707
10708# pkglibdir must be a fully qualified path and (not ${exec_prefix}/lib)
10709eval pkglibdir="${libdir}/${PACKAGE}${VERSION}"
10710if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
10711    eval tcldomxml_LIB_FLAG="-ltcldomxml${VERSION}${DBGX}"
10712else
10713    eval tcldomxml_LIB_FLAG="-ltcldomxml`echo ${VERSION} | tr -d .`${DBGX}"
10714fi
10715tcldomxml_BUILD_LIB_SPEC="-L`pwd` ${tcldomxml_LIB_FLAG}"
10716tcldomxml_LIB_SPEC="-L${pkglibdir} ${tcldomxml_LIB_FLAG}"
10717
10718if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
10719    eval tcldomxml_STUB_LIB_FLAG="-ltcldomxmlstub${VERSION}${DBGX}"
10720else
10721    eval tcldomxml_STUB_LIB_FLAG="-ltcldomxmlstub`echo ${VERSION} | tr -d .`${DBGX}"
10722fi
10723tcldomxml_BUILD_STUB_LIB_SPEC="-L`pwd` ${tcldomxml_STUB_LIB_FLAG}"
10724tcldomxml_STUB_LIB_SPEC="-L${pkglibdir} ${tcldomxml_STUB_LIB_FLAG}"
10725tcldomxml_BUILD_STUB_LIB_PATH="`pwd`/${tcldomxmlstub_LIB_FILE}"
10726tcldomxml_STUB_LIB_PATH="${pkglibdir}/${tcldomxmlstub_LIB_FILE}"
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739#--------------------------------------------------------------------
10740# Finally, substitute all of the various values into the Makefile.
10741# You may alternatively have a special pkgIndex.tcl.in or other files
10742# which require substituting th AC variables in.  Include these here.
10743#--------------------------------------------------------------------
10744
10745ac_config_files="$ac_config_files Makefile tcldomxmlConfig.sh"
10746
10747cat >confcache <<\_ACEOF
10748# This file is a shell script that caches the results of configure
10749# tests run on this system so they can be shared between configure
10750# scripts and configure runs, see configure's option --config-cache.
10751# It is not useful on other systems.  If it contains results you don't
10752# want to keep, you may remove or edit it.
10753#
10754# config.status only pays attention to the cache file if you give it
10755# the --recheck option to rerun configure.
10756#
10757# `ac_cv_env_foo' variables (set or unset) will be overridden when
10758# loading this file, other *unset* `ac_cv_foo' will be assigned the
10759# following values.
10760
10761_ACEOF
10762
10763# The following way of writing the cache mishandles newlines in values,
10764# but we know of no workaround that is simple, portable, and efficient.
10765# So, we kill variables containing newlines.
10766# Ultrix sh set writes to stderr and can't be redirected directly,
10767# and sets the high bit in the cache file unless we assign to the vars.
10768(
10769  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
10770    eval ac_val=\$$ac_var
10771    case $ac_val in #(
10772    *${as_nl}*)
10773      case $ac_var in #(
10774      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
10775echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
10776      esac
10777      case $ac_var in #(
10778      _ | IFS | as_nl) ;; #(
10779      *) $as_unset $ac_var ;;
10780      esac ;;
10781    esac
10782  done
10783
10784  (set) 2>&1 |
10785    case $as_nl`(ac_space=' '; set) 2>&1` in #(
10786    *${as_nl}ac_space=\ *)
10787      # `set' does not quote correctly, so add quotes (double-quote
10788      # substitution turns \\\\ into \\, and sed turns \\ into \).
10789      sed -n \
10790	"s/'/'\\\\''/g;
10791	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
10792      ;; #(
10793    *)
10794      # `set' quotes correctly as required by POSIX, so do not add quotes.
10795      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
10796      ;;
10797    esac |
10798    sort
10799) |
10800  sed '
10801     /^ac_cv_env_/b end
10802     t clear
10803     :clear
10804     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
10805     t end
10806     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
10807     :end' >>confcache
10808if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
10809  if test -w "$cache_file"; then
10810    test "x$cache_file" != "x/dev/null" &&
10811      { echo "$as_me:$LINENO: updating cache $cache_file" >&5
10812echo "$as_me: updating cache $cache_file" >&6;}
10813    cat confcache >$cache_file
10814  else
10815    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
10816echo "$as_me: not updating unwritable cache $cache_file" >&6;}
10817  fi
10818fi
10819rm -f confcache
10820
10821test "x$prefix" = xNONE && prefix=$ac_default_prefix
10822# Let make expand exec_prefix.
10823test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10824
10825# Transform confdefs.h into DEFS.
10826# Protect against shell expansion while executing Makefile rules.
10827# Protect against Makefile macro expansion.
10828#
10829# If the first sed substitution is executed (which looks for macros that
10830# take arguments), then branch to the quote section.  Otherwise,
10831# look for a macro that doesn't take arguments.
10832ac_script='
10833t clear
10834:clear
10835s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
10836t quote
10837s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
10838t quote
10839b any
10840:quote
10841s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
10842s/\[/\\&/g
10843s/\]/\\&/g
10844s/\$/$$/g
10845H
10846:any
10847${
10848	g
10849	s/^\n//
10850	s/\n/ /g
10851	p
10852}
10853'
10854DEFS=`sed -n "$ac_script" confdefs.h`
10855
10856
10857ac_libobjs=
10858ac_ltlibobjs=
10859for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
10860  # 1. Remove the extension, and $U if already installed.
10861  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
10862  ac_i=`echo "$ac_i" | sed "$ac_script"`
10863  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
10864  #    will be set to the directory where LIBOBJS objects are built.
10865  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
10866  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
10867done
10868LIBOBJS=$ac_libobjs
10869
10870LTLIBOBJS=$ac_ltlibobjs
10871
10872
10873CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""
10874
10875: ${CONFIG_STATUS=./config.status}
10876ac_clean_files_save=$ac_clean_files
10877ac_clean_files="$ac_clean_files $CONFIG_STATUS"
10878{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
10879echo "$as_me: creating $CONFIG_STATUS" >&6;}
10880cat >$CONFIG_STATUS <<_ACEOF
10881#! $SHELL
10882# Generated by $as_me.
10883# Run this file to recreate the current configuration.
10884# Compiler output produced by configure, useful for debugging
10885# configure, is in config.log if it exists.
10886
10887debug=false
10888ac_cs_recheck=false
10889ac_cs_silent=false
10890SHELL=\${CONFIG_SHELL-$SHELL}
10891_ACEOF
10892
10893cat >>$CONFIG_STATUS <<\_ACEOF
10894## --------------------- ##
10895## M4sh Initialization.  ##
10896## --------------------- ##
10897
10898# Be more Bourne compatible
10899DUALCASE=1; export DUALCASE # for MKS sh
10900if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
10901  emulate sh
10902  NULLCMD=:
10903  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
10904  # is contrary to our usage.  Disable this feature.
10905  alias -g '${1+"$@"}'='"$@"'
10906  setopt NO_GLOB_SUBST
10907else
10908  case `(set -o) 2>/dev/null` in
10909  *posix*) set -o posix ;;
10910esac
10911
10912fi
10913
10914
10915
10916
10917# PATH needs CR
10918# Avoid depending upon Character Ranges.
10919as_cr_letters='abcdefghijklmnopqrstuvwxyz'
10920as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
10921as_cr_Letters=$as_cr_letters$as_cr_LETTERS
10922as_cr_digits='0123456789'
10923as_cr_alnum=$as_cr_Letters$as_cr_digits
10924
10925# The user is always right.
10926if test "${PATH_SEPARATOR+set}" != set; then
10927  echo "#! /bin/sh" >conf$$.sh
10928  echo  "exit 0"   >>conf$$.sh
10929  chmod +x conf$$.sh
10930  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10931    PATH_SEPARATOR=';'
10932  else
10933    PATH_SEPARATOR=:
10934  fi
10935  rm -f conf$$.sh
10936fi
10937
10938# Support unset when possible.
10939if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
10940  as_unset=unset
10941else
10942  as_unset=false
10943fi
10944
10945
10946# IFS
10947# We need space, tab and new line, in precisely that order.  Quoting is
10948# there to prevent editors from complaining about space-tab.
10949# (If _AS_PATH_WALK were called with IFS unset, it would disable word
10950# splitting by setting IFS to empty value.)
10951as_nl='
10952'
10953IFS=" ""	$as_nl"
10954
10955# Find who we are.  Look in the path if we contain no directory separator.
10956case $0 in
10957  *[\\/]* ) as_myself=$0 ;;
10958  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10959for as_dir in $PATH
10960do
10961  IFS=$as_save_IFS
10962  test -z "$as_dir" && as_dir=.
10963  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
10964done
10965IFS=$as_save_IFS
10966
10967     ;;
10968esac
10969# We did not find ourselves, most probably we were run as `sh COMMAND'
10970# in which case we are not to be found in the path.
10971if test "x$as_myself" = x; then
10972  as_myself=$0
10973fi
10974if test ! -f "$as_myself"; then
10975  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
10976  { (exit 1); exit 1; }
10977fi
10978
10979# Work around bugs in pre-3.0 UWIN ksh.
10980for as_var in ENV MAIL MAILPATH
10981do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
10982done
10983PS1='$ '
10984PS2='> '
10985PS4='+ '
10986
10987# NLS nuisances.
10988for as_var in \
10989  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
10990  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
10991  LC_TELEPHONE LC_TIME
10992do
10993  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
10994    eval $as_var=C; export $as_var
10995  else
10996    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
10997  fi
10998done
10999
11000# Required to use basename.
11001if expr a : '\(a\)' >/dev/null 2>&1 &&
11002   test "X`expr 00001 : '.*\(...\)'`" = X001; then
11003  as_expr=expr
11004else
11005  as_expr=false
11006fi
11007
11008if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
11009  as_basename=basename
11010else
11011  as_basename=false
11012fi
11013
11014
11015# Name of the executable.
11016as_me=`$as_basename -- "$0" ||
11017$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
11018	 X"$0" : 'X\(//\)$' \| \
11019	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
11020echo X/"$0" |
11021    sed '/^.*\/\([^/][^/]*\)\/*$/{
11022	    s//\1/
11023	    q
11024	  }
11025	  /^X\/\(\/\/\)$/{
11026	    s//\1/
11027	    q
11028	  }
11029	  /^X\/\(\/\).*/{
11030	    s//\1/
11031	    q
11032	  }
11033	  s/.*/./; q'`
11034
11035# CDPATH.
11036$as_unset CDPATH
11037
11038
11039
11040  as_lineno_1=$LINENO
11041  as_lineno_2=$LINENO
11042  test "x$as_lineno_1" != "x$as_lineno_2" &&
11043  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
11044
11045  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
11046  # uniformly replaced by the line number.  The first 'sed' inserts a
11047  # line-number line after each line using $LINENO; the second 'sed'
11048  # does the real work.  The second script uses 'N' to pair each
11049  # line-number line with the line containing $LINENO, and appends
11050  # trailing '-' during substitution so that $LINENO is not a special
11051  # case at line end.
11052  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
11053  # scripts with optimization help from Paolo Bonzini.  Blame Lee
11054  # E. McMahon (1931-1989) for sed's syntax.  :-)
11055  sed -n '
11056    p
11057    /[$]LINENO/=
11058  ' <$as_myself |
11059    sed '
11060      s/[$]LINENO.*/&-/
11061      t lineno
11062      b
11063      :lineno
11064      N
11065      :loop
11066      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
11067      t loop
11068      s/-\n.*//
11069    ' >$as_me.lineno &&
11070  chmod +x "$as_me.lineno" ||
11071    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
11072   { (exit 1); exit 1; }; }
11073
11074  # Don't try to exec as it changes $[0], causing all sort of problems
11075  # (the dirname of $[0] is not the place where we might find the
11076  # original and so on.  Autoconf is especially sensitive to this).
11077  . "./$as_me.lineno"
11078  # Exit status is that of the last command.
11079  exit
11080}
11081
11082
11083if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
11084  as_dirname=dirname
11085else
11086  as_dirname=false
11087fi
11088
11089ECHO_C= ECHO_N= ECHO_T=
11090case `echo -n x` in
11091-n*)
11092  case `echo 'x\c'` in
11093  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
11094  *)   ECHO_C='\c';;
11095  esac;;
11096*)
11097  ECHO_N='-n';;
11098esac
11099
11100if expr a : '\(a\)' >/dev/null 2>&1 &&
11101   test "X`expr 00001 : '.*\(...\)'`" = X001; then
11102  as_expr=expr
11103else
11104  as_expr=false
11105fi
11106
11107rm -f conf$$ conf$$.exe conf$$.file
11108if test -d conf$$.dir; then
11109  rm -f conf$$.dir/conf$$.file
11110else
11111  rm -f conf$$.dir
11112  mkdir conf$$.dir
11113fi
11114echo >conf$$.file
11115if ln -s conf$$.file conf$$ 2>/dev/null; then
11116  as_ln_s='ln -s'
11117  # ... but there are two gotchas:
11118  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
11119  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
11120  # In both cases, we have to default to `cp -p'.
11121  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
11122    as_ln_s='cp -p'
11123elif ln conf$$.file conf$$ 2>/dev/null; then
11124  as_ln_s=ln
11125else
11126  as_ln_s='cp -p'
11127fi
11128rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
11129rmdir conf$$.dir 2>/dev/null
11130
11131if mkdir -p . 2>/dev/null; then
11132  as_mkdir_p=:
11133else
11134  test -d ./-p && rmdir ./-p
11135  as_mkdir_p=false
11136fi
11137
11138if test -x / >/dev/null 2>&1; then
11139  as_test_x='test -x'
11140else
11141  if ls -dL / >/dev/null 2>&1; then
11142    as_ls_L_option=L
11143  else
11144    as_ls_L_option=
11145  fi
11146  as_test_x='
11147    eval sh -c '\''
11148      if test -d "$1"; then
11149        test -d "$1/.";
11150      else
11151	case $1 in
11152        -*)set "./$1";;
11153	esac;
11154	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
11155	???[sx]*):;;*)false;;esac;fi
11156    '\'' sh
11157  '
11158fi
11159as_executable_p=$as_test_x
11160
11161# Sed expression to map a string onto a valid CPP name.
11162as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
11163
11164# Sed expression to map a string onto a valid variable name.
11165as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
11166
11167
11168exec 6>&1
11169
11170# Save the log message, to keep $[0] and so on meaningful, and to
11171# report actual input values of CONFIG_FILES etc. instead of their
11172# values after options handling.
11173ac_log="
11174This file was extended by tcldomxml $as_me 2.6, which was
11175generated by GNU Autoconf 2.61.  Invocation command line was
11176
11177  CONFIG_FILES    = $CONFIG_FILES
11178  CONFIG_HEADERS  = $CONFIG_HEADERS
11179  CONFIG_LINKS    = $CONFIG_LINKS
11180  CONFIG_COMMANDS = $CONFIG_COMMANDS
11181  $ $0 $@
11182
11183on `(hostname || uname -n) 2>/dev/null | sed 1q`
11184"
11185
11186_ACEOF
11187
11188cat >>$CONFIG_STATUS <<_ACEOF
11189# Files that config.status was made for.
11190config_files="$ac_config_files"
11191
11192_ACEOF
11193
11194cat >>$CONFIG_STATUS <<\_ACEOF
11195ac_cs_usage="\
11196\`$as_me' instantiates files from templates according to the
11197current configuration.
11198
11199Usage: $0 [OPTIONS] [FILE]...
11200
11201  -h, --help       print this help, then exit
11202  -V, --version    print version number and configuration settings, then exit
11203  -q, --quiet      do not print progress messages
11204  -d, --debug      don't remove temporary files
11205      --recheck    update $as_me by reconfiguring in the same conditions
11206  --file=FILE[:TEMPLATE]
11207		   instantiate the configuration file FILE
11208
11209Configuration files:
11210$config_files
11211
11212Report bugs to <bug-autoconf@gnu.org>."
11213
11214_ACEOF
11215cat >>$CONFIG_STATUS <<_ACEOF
11216ac_cs_version="\\
11217tcldomxml config.status 2.6
11218configured by $0, generated by GNU Autoconf 2.61,
11219  with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
11220
11221Copyright (C) 2006 Free Software Foundation, Inc.
11222This config.status script is free software; the Free Software Foundation
11223gives unlimited permission to copy, distribute and modify it."
11224
11225ac_pwd='$ac_pwd'
11226srcdir='$srcdir'
11227INSTALL='$INSTALL'
11228_ACEOF
11229
11230cat >>$CONFIG_STATUS <<\_ACEOF
11231# If no file are specified by the user, then we need to provide default
11232# value.  By we need to know if files were specified by the user.
11233ac_need_defaults=:
11234while test $# != 0
11235do
11236  case $1 in
11237  --*=*)
11238    ac_option=`expr "X$1" : 'X\([^=]*\)='`
11239    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
11240    ac_shift=:
11241    ;;
11242  *)
11243    ac_option=$1
11244    ac_optarg=$2
11245    ac_shift=shift
11246    ;;
11247  esac
11248
11249  case $ac_option in
11250  # Handling of the options.
11251  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11252    ac_cs_recheck=: ;;
11253  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
11254    echo "$ac_cs_version"; exit ;;
11255  --debug | --debu | --deb | --de | --d | -d )
11256    debug=: ;;
11257  --file | --fil | --fi | --f )
11258    $ac_shift
11259    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
11260    ac_need_defaults=false;;
11261  --he | --h |  --help | --hel | -h )
11262    echo "$ac_cs_usage"; exit ;;
11263  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
11264  | -silent | --silent | --silen | --sile | --sil | --si | --s)
11265    ac_cs_silent=: ;;
11266
11267  # This is an error.
11268  -*) { echo "$as_me: error: unrecognized option: $1
11269Try \`$0 --help' for more information." >&2
11270   { (exit 1); exit 1; }; } ;;
11271
11272  *) ac_config_targets="$ac_config_targets $1"
11273     ac_need_defaults=false ;;
11274
11275  esac
11276  shift
11277done
11278
11279ac_configure_extra_args=
11280
11281if $ac_cs_silent; then
11282  exec 6>/dev/null
11283  ac_configure_extra_args="$ac_configure_extra_args --silent"
11284fi
11285
11286_ACEOF
11287cat >>$CONFIG_STATUS <<_ACEOF
11288if \$ac_cs_recheck; then
11289  echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
11290  CONFIG_SHELL=$SHELL
11291  export CONFIG_SHELL
11292  exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
11293fi
11294
11295_ACEOF
11296cat >>$CONFIG_STATUS <<\_ACEOF
11297exec 5>>config.log
11298{
11299  echo
11300  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
11301## Running $as_me. ##
11302_ASBOX
11303  echo "$ac_log"
11304} >&5
11305
11306_ACEOF
11307cat >>$CONFIG_STATUS <<_ACEOF
11308_ACEOF
11309
11310cat >>$CONFIG_STATUS <<\_ACEOF
11311
11312# Handling of arguments.
11313for ac_config_target in $ac_config_targets
11314do
11315  case $ac_config_target in
11316    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
11317    "tcldomxmlConfig.sh") CONFIG_FILES="$CONFIG_FILES tcldomxmlConfig.sh" ;;
11318
11319  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
11320echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
11321   { (exit 1); exit 1; }; };;
11322  esac
11323done
11324
11325
11326# If the user did not use the arguments to specify the items to instantiate,
11327# then the envvar interface is used.  Set only those that are not.
11328# We use the long form for the default assignment because of an extremely
11329# bizarre bug on SunOS 4.1.3.
11330if $ac_need_defaults; then
11331  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
11332fi
11333
11334# Have a temporary directory for convenience.  Make it in the build tree
11335# simply because there is no reason against having it here, and in addition,
11336# creating and moving files from /tmp can sometimes cause problems.
11337# Hook for its removal unless debugging.
11338# Note that there is a small window in which the directory will not be cleaned:
11339# after its creation but before its name has been assigned to `$tmp'.
11340$debug ||
11341{
11342  tmp=
11343  trap 'exit_status=$?
11344  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
11345' 0
11346  trap '{ (exit 1); exit 1; }' 1 2 13 15
11347}
11348# Create a (secure) tmp directory for tmp files.
11349
11350{
11351  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
11352  test -n "$tmp" && test -d "$tmp"
11353}  ||
11354{
11355  tmp=./conf$$-$RANDOM
11356  (umask 077 && mkdir "$tmp")
11357} ||
11358{
11359   echo "$me: cannot create a temporary directory in ." >&2
11360   { (exit 1); exit 1; }
11361}
11362
11363#
11364# Set up the sed scripts for CONFIG_FILES section.
11365#
11366
11367# No need to generate the scripts if there are no CONFIG_FILES.
11368# This happens for instance when ./config.status config.h
11369if test -n "$CONFIG_FILES"; then
11370
11371_ACEOF
11372
11373
11374
11375ac_delim='%!_!# '
11376for ac_last_try in false false false false false :; do
11377  cat >conf$$subs.sed <<_ACEOF
11378SHELL!$SHELL$ac_delim
11379PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
11380PACKAGE_NAME!$PACKAGE_NAME$ac_delim
11381PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
11382PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
11383PACKAGE_STRING!$PACKAGE_STRING$ac_delim
11384PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
11385exec_prefix!$exec_prefix$ac_delim
11386prefix!$prefix$ac_delim
11387program_transform_name!$program_transform_name$ac_delim
11388bindir!$bindir$ac_delim
11389sbindir!$sbindir$ac_delim
11390libexecdir!$libexecdir$ac_delim
11391datarootdir!$datarootdir$ac_delim
11392datadir!$datadir$ac_delim
11393sysconfdir!$sysconfdir$ac_delim
11394sharedstatedir!$sharedstatedir$ac_delim
11395localstatedir!$localstatedir$ac_delim
11396includedir!$includedir$ac_delim
11397oldincludedir!$oldincludedir$ac_delim
11398docdir!$docdir$ac_delim
11399infodir!$infodir$ac_delim
11400htmldir!$htmldir$ac_delim
11401dvidir!$dvidir$ac_delim
11402pdfdir!$pdfdir$ac_delim
11403psdir!$psdir$ac_delim
11404libdir!$libdir$ac_delim
11405localedir!$localedir$ac_delim
11406mandir!$mandir$ac_delim
11407DEFS!$DEFS$ac_delim
11408ECHO_C!$ECHO_C$ac_delim
11409ECHO_N!$ECHO_N$ac_delim
11410ECHO_T!$ECHO_T$ac_delim
11411LIBS!$LIBS$ac_delim
11412build_alias!$build_alias$ac_delim
11413host_alias!$host_alias$ac_delim
11414target_alias!$target_alias$ac_delim
11415CONFIGDIR!$CONFIGDIR$ac_delim
11416PACKAGE!$PACKAGE$ac_delim
11417VERSION!$VERSION$ac_delim
11418TCLDOMXML_VERSION!$TCLDOMXML_VERSION$ac_delim
11419tcldomxml_LIB_FILE!$tcldomxml_LIB_FILE$ac_delim
11420tcldomxmlstub_LIB_FILE!$tcldomxmlstub_LIB_FILE$ac_delim
11421CYGPATH!$CYGPATH$ac_delim
11422EXEEXT!$EXEEXT$ac_delim
11423PKG_LIB_FILE!$PKG_LIB_FILE$ac_delim
11424PKG_STUB_LIB_FILE!$PKG_STUB_LIB_FILE$ac_delim
11425PKG_STUB_SOURCES!$PKG_STUB_SOURCES$ac_delim
11426PKG_STUB_OBJECTS!$PKG_STUB_OBJECTS$ac_delim
11427PKG_TCL_SOURCES!$PKG_TCL_SOURCES$ac_delim
11428PKG_HEADERS!$PKG_HEADERS$ac_delim
11429PKG_INCLUDES!$PKG_INCLUDES$ac_delim
11430PKG_LIBS!$PKG_LIBS$ac_delim
11431PKG_CFLAGS!$PKG_CFLAGS$ac_delim
11432TCL_VERSION!$TCL_VERSION$ac_delim
11433TCL_PATCH_LEVEL!$TCL_PATCH_LEVEL$ac_delim
11434TCL_BIN_DIR!$TCL_BIN_DIR$ac_delim
11435TCL_SRC_DIR!$TCL_SRC_DIR$ac_delim
11436TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim
11437TCL_LIB_FLAG!$TCL_LIB_FLAG$ac_delim
11438TCL_LIB_SPEC!$TCL_LIB_SPEC$ac_delim
11439TCL_STUB_LIB_FILE!$TCL_STUB_LIB_FILE$ac_delim
11440TCL_STUB_LIB_FLAG!$TCL_STUB_LIB_FLAG$ac_delim
11441TCL_STUB_LIB_SPEC!$TCL_STUB_LIB_SPEC$ac_delim
11442CLEANFILES!$CLEANFILES$ac_delim
11443TCL_LIBS!$TCL_LIBS$ac_delim
11444TCL_DEFS!$TCL_DEFS$ac_delim
11445TCL_EXTRA_CFLAGS!$TCL_EXTRA_CFLAGS$ac_delim
11446TCL_LD_FLAGS!$TCL_LD_FLAGS$ac_delim
11447TCL_SHLIB_LD_LIBS!$TCL_SHLIB_LD_LIBS$ac_delim
11448CC!$CC$ac_delim
11449CFLAGS!$CFLAGS$ac_delim
11450LDFLAGS!$LDFLAGS$ac_delim
11451CPPFLAGS!$CPPFLAGS$ac_delim
11452ac_ct_CC!$ac_ct_CC$ac_delim
11453OBJEXT!$OBJEXT$ac_delim
11454CPP!$CPP$ac_delim
11455INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
11456INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
11457INSTALL_DATA!$INSTALL_DATA$ac_delim
11458SET_MAKE!$SET_MAKE$ac_delim
11459RANLIB!$RANLIB$ac_delim
11460GREP!$GREP$ac_delim
11461EGREP!$EGREP$ac_delim
11462MATH_LIBS!$MATH_LIBS$ac_delim
11463Tcldom_VERSION!$Tcldom_VERSION$ac_delim
11464Tcldom_BIN_DIR!$Tcldom_BIN_DIR$ac_delim
11465Tcldom_SRC_DIR!$Tcldom_SRC_DIR$ac_delim
11466Tcldom_LIB_FILE!$Tcldom_LIB_FILE$ac_delim
11467Tcldom_LIB_SPEC!$Tcldom_LIB_SPEC$ac_delim
11468Tcldom_STUB_LIB_FILE!$Tcldom_STUB_LIB_FILE$ac_delim
11469Tcldom_STUB_LIB_SPEC!$Tcldom_STUB_LIB_SPEC$ac_delim
11470Tcldom_STUB_LIB_PATH!$Tcldom_STUB_LIB_PATH$ac_delim
11471TCL_INCLUDES!$TCL_INCLUDES$ac_delim
11472EXTRA_SOURCES!$EXTRA_SOURCES$ac_delim
11473TCL_THREADS!$TCL_THREADS$ac_delim
11474SHARED_BUILD!$SHARED_BUILD$ac_delim
11475_ACEOF
11476
11477  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
11478    break
11479  elif $ac_last_try; then
11480    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
11481echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
11482   { (exit 1); exit 1; }; }
11483  else
11484    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
11485  fi
11486done
11487
11488ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
11489if test -n "$ac_eof"; then
11490  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
11491  ac_eof=`expr $ac_eof + 1`
11492fi
11493
11494cat >>$CONFIG_STATUS <<_ACEOF
11495cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
11496/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
11497_ACEOF
11498sed '
11499s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
11500s/^/s,@/; s/!/@,|#_!!_#|/
11501:n
11502t n
11503s/'"$ac_delim"'$/,g/; t
11504s/$/\\/; p
11505N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
11506' >>$CONFIG_STATUS <conf$$subs.sed
11507rm -f conf$$subs.sed
11508cat >>$CONFIG_STATUS <<_ACEOF
11509CEOF$ac_eof
11510_ACEOF
11511
11512
11513ac_delim='%!_!# '
11514for ac_last_try in false false false false false :; do
11515  cat >conf$$subs.sed <<_ACEOF
11516AR!$AR$ac_delim
11517CELIB_DIR!$CELIB_DIR$ac_delim
11518CFLAGS_DEBUG!$CFLAGS_DEBUG$ac_delim
11519CFLAGS_OPTIMIZE!$CFLAGS_OPTIMIZE$ac_delim
11520CFLAGS_WARNING!$CFLAGS_WARNING$ac_delim
11521STLIB_LD!$STLIB_LD$ac_delim
11522SHLIB_LD!$SHLIB_LD$ac_delim
11523SHLIB_LD_LIBS!$SHLIB_LD_LIBS$ac_delim
11524SHLIB_CFLAGS!$SHLIB_CFLAGS$ac_delim
11525LD_LIBRARY_PATH_VAR!$LD_LIBRARY_PATH_VAR$ac_delim
11526CFLAGS_DEFAULT!$CFLAGS_DEFAULT$ac_delim
11527LDFLAGS_DEFAULT!$LDFLAGS_DEFAULT$ac_delim
11528TCL_DBGX!$TCL_DBGX$ac_delim
11529MAKE_LIB!$MAKE_LIB$ac_delim
11530MAKE_SHARED_LIB!$MAKE_SHARED_LIB$ac_delim
11531MAKE_STATIC_LIB!$MAKE_STATIC_LIB$ac_delim
11532MAKE_STUB_LIB!$MAKE_STUB_LIB$ac_delim
11533RANLIB_STUB!$RANLIB_STUB$ac_delim
11534VC_MANIFEST_EMBED_DLL!$VC_MANIFEST_EMBED_DLL$ac_delim
11535VC_MANIFEST_EMBED_EXE!$VC_MANIFEST_EMBED_EXE$ac_delim
11536LIBXML2_INCLUDEDIR!$LIBXML2_INCLUDEDIR$ac_delim
11537LIBXML2_LIBDIR!$LIBXML2_LIBDIR$ac_delim
11538ICONV_LIBDIR!$ICONV_LIBDIR$ac_delim
11539TCLSH_PROG!$TCLSH_PROG$ac_delim
11540tcldomxml_BUILD_LIB_SPEC!$tcldomxml_BUILD_LIB_SPEC$ac_delim
11541tcldomxml_LIB_SPEC!$tcldomxml_LIB_SPEC$ac_delim
11542tcldomxml_BUILD_STUB_LIB_SPEC!$tcldomxml_BUILD_STUB_LIB_SPEC$ac_delim
11543tcldomxml_STUB_LIB_SPEC!$tcldomxml_STUB_LIB_SPEC$ac_delim
11544tcldomxml_BUILD_STUB_LIB_PATH!$tcldomxml_BUILD_STUB_LIB_PATH$ac_delim
11545tcldomxml_STUB_LIB_PATH!$tcldomxml_STUB_LIB_PATH$ac_delim
11546MAJOR_VERSION!$MAJOR_VERSION$ac_delim
11547MINOR_VERSION!$MINOR_VERSION$ac_delim
11548PATCHLEVEL!$PATCHLEVEL$ac_delim
11549LIBOBJS!$LIBOBJS$ac_delim
11550LTLIBOBJS!$LTLIBOBJS$ac_delim
11551_ACEOF
11552
11553  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 35; then
11554    break
11555  elif $ac_last_try; then
11556    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
11557echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
11558   { (exit 1); exit 1; }; }
11559  else
11560    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
11561  fi
11562done
11563
11564ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
11565if test -n "$ac_eof"; then
11566  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
11567  ac_eof=`expr $ac_eof + 1`
11568fi
11569
11570cat >>$CONFIG_STATUS <<_ACEOF
11571cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
11572/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
11573_ACEOF
11574sed '
11575s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
11576s/^/s,@/; s/!/@,|#_!!_#|/
11577:n
11578t n
11579s/'"$ac_delim"'$/,g/; t
11580s/$/\\/; p
11581N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
11582' >>$CONFIG_STATUS <conf$$subs.sed
11583rm -f conf$$subs.sed
11584cat >>$CONFIG_STATUS <<_ACEOF
11585:end
11586s/|#_!!_#|//g
11587CEOF$ac_eof
11588_ACEOF
11589
11590
11591# VPATH may cause trouble with some makes, so we remove $(srcdir),
11592# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
11593# trailing colons and then remove the whole line if VPATH becomes empty
11594# (actually we leave an empty line to preserve line numbers).
11595if test "x$srcdir" = x.; then
11596  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
11597s/:*\$(srcdir):*/:/
11598s/:*\${srcdir}:*/:/
11599s/:*@srcdir@:*/:/
11600s/^\([^=]*=[	 ]*\):*/\1/
11601s/:*$//
11602s/^[^=]*=[	 ]*$//
11603}'
11604fi
11605
11606cat >>$CONFIG_STATUS <<\_ACEOF
11607fi # test -n "$CONFIG_FILES"
11608
11609
11610for ac_tag in  :F $CONFIG_FILES
11611do
11612  case $ac_tag in
11613  :[FHLC]) ac_mode=$ac_tag; continue;;
11614  esac
11615  case $ac_mode$ac_tag in
11616  :[FHL]*:*);;
11617  :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
11618echo "$as_me: error: Invalid tag $ac_tag." >&2;}
11619   { (exit 1); exit 1; }; };;
11620  :[FH]-) ac_tag=-:-;;
11621  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
11622  esac
11623  ac_save_IFS=$IFS
11624  IFS=:
11625  set x $ac_tag
11626  IFS=$ac_save_IFS
11627  shift
11628  ac_file=$1
11629  shift
11630
11631  case $ac_mode in
11632  :L) ac_source=$1;;
11633  :[FH])
11634    ac_file_inputs=
11635    for ac_f
11636    do
11637      case $ac_f in
11638      -) ac_f="$tmp/stdin";;
11639      *) # Look for the file first in the build tree, then in the source tree
11640	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
11641	 # because $ac_f cannot contain `:'.
11642	 test -f "$ac_f" ||
11643	   case $ac_f in
11644	   [\\/$]*) false;;
11645	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
11646	   esac ||
11647	   { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
11648echo "$as_me: error: cannot find input file: $ac_f" >&2;}
11649   { (exit 1); exit 1; }; };;
11650      esac
11651      ac_file_inputs="$ac_file_inputs $ac_f"
11652    done
11653
11654    # Let's still pretend it is `configure' which instantiates (i.e., don't
11655    # use $as_me), people would be surprised to read:
11656    #    /* config.h.  Generated by config.status.  */
11657    configure_input="Generated from "`IFS=:
11658	  echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
11659    if test x"$ac_file" != x-; then
11660      configure_input="$ac_file.  $configure_input"
11661      { echo "$as_me:$LINENO: creating $ac_file" >&5
11662echo "$as_me: creating $ac_file" >&6;}
11663    fi
11664
11665    case $ac_tag in
11666    *:-:* | *:-) cat >"$tmp/stdin";;
11667    esac
11668    ;;
11669  esac
11670
11671  ac_dir=`$as_dirname -- "$ac_file" ||
11672$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11673	 X"$ac_file" : 'X\(//\)[^/]' \| \
11674	 X"$ac_file" : 'X\(//\)$' \| \
11675	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
11676echo X"$ac_file" |
11677    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
11678	    s//\1/
11679	    q
11680	  }
11681	  /^X\(\/\/\)[^/].*/{
11682	    s//\1/
11683	    q
11684	  }
11685	  /^X\(\/\/\)$/{
11686	    s//\1/
11687	    q
11688	  }
11689	  /^X\(\/\).*/{
11690	    s//\1/
11691	    q
11692	  }
11693	  s/.*/./; q'`
11694  { as_dir="$ac_dir"
11695  case $as_dir in #(
11696  -*) as_dir=./$as_dir;;
11697  esac
11698  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
11699    as_dirs=
11700    while :; do
11701      case $as_dir in #(
11702      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
11703      *) as_qdir=$as_dir;;
11704      esac
11705      as_dirs="'$as_qdir' $as_dirs"
11706      as_dir=`$as_dirname -- "$as_dir" ||
11707$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11708	 X"$as_dir" : 'X\(//\)[^/]' \| \
11709	 X"$as_dir" : 'X\(//\)$' \| \
11710	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
11711echo X"$as_dir" |
11712    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
11713	    s//\1/
11714	    q
11715	  }
11716	  /^X\(\/\/\)[^/].*/{
11717	    s//\1/
11718	    q
11719	  }
11720	  /^X\(\/\/\)$/{
11721	    s//\1/
11722	    q
11723	  }
11724	  /^X\(\/\).*/{
11725	    s//\1/
11726	    q
11727	  }
11728	  s/.*/./; q'`
11729      test -d "$as_dir" && break
11730    done
11731    test -z "$as_dirs" || eval "mkdir $as_dirs"
11732  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
11733echo "$as_me: error: cannot create directory $as_dir" >&2;}
11734   { (exit 1); exit 1; }; }; }
11735  ac_builddir=.
11736
11737case "$ac_dir" in
11738.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
11739*)
11740  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
11741  # A ".." for each directory in $ac_dir_suffix.
11742  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
11743  case $ac_top_builddir_sub in
11744  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
11745  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
11746  esac ;;
11747esac
11748ac_abs_top_builddir=$ac_pwd
11749ac_abs_builddir=$ac_pwd$ac_dir_suffix
11750# for backward compatibility:
11751ac_top_builddir=$ac_top_build_prefix
11752
11753case $srcdir in
11754  .)  # We are building in place.
11755    ac_srcdir=.
11756    ac_top_srcdir=$ac_top_builddir_sub
11757    ac_abs_top_srcdir=$ac_pwd ;;
11758  [\\/]* | ?:[\\/]* )  # Absolute name.
11759    ac_srcdir=$srcdir$ac_dir_suffix;
11760    ac_top_srcdir=$srcdir
11761    ac_abs_top_srcdir=$srcdir ;;
11762  *) # Relative name.
11763    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
11764    ac_top_srcdir=$ac_top_build_prefix$srcdir
11765    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
11766esac
11767ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
11768
11769
11770  case $ac_mode in
11771  :F)
11772  #
11773  # CONFIG_FILE
11774  #
11775
11776  case $INSTALL in
11777  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
11778  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
11779  esac
11780_ACEOF
11781
11782cat >>$CONFIG_STATUS <<\_ACEOF
11783# If the template does not know about datarootdir, expand it.
11784# FIXME: This hack should be removed a few years after 2.60.
11785ac_datarootdir_hack=; ac_datarootdir_seen=
11786
11787case `sed -n '/datarootdir/ {
11788  p
11789  q
11790}
11791/@datadir@/p
11792/@docdir@/p
11793/@infodir@/p
11794/@localedir@/p
11795/@mandir@/p
11796' $ac_file_inputs` in
11797*datarootdir*) ac_datarootdir_seen=yes;;
11798*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
11799  { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
11800echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
11801_ACEOF
11802cat >>$CONFIG_STATUS <<_ACEOF
11803  ac_datarootdir_hack='
11804  s&@datadir@&$datadir&g
11805  s&@docdir@&$docdir&g
11806  s&@infodir@&$infodir&g
11807  s&@localedir@&$localedir&g
11808  s&@mandir@&$mandir&g
11809    s&\\\${datarootdir}&$datarootdir&g' ;;
11810esac
11811_ACEOF
11812
11813# Neutralize VPATH when `$srcdir' = `.'.
11814# Shell code in configure.ac might set extrasub.
11815# FIXME: do we really want to maintain this feature?
11816cat >>$CONFIG_STATUS <<_ACEOF
11817  sed "$ac_vpsub
11818$extrasub
11819_ACEOF
11820cat >>$CONFIG_STATUS <<\_ACEOF
11821:t
11822/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
11823s&@configure_input@&$configure_input&;t t
11824s&@top_builddir@&$ac_top_builddir_sub&;t t
11825s&@srcdir@&$ac_srcdir&;t t
11826s&@abs_srcdir@&$ac_abs_srcdir&;t t
11827s&@top_srcdir@&$ac_top_srcdir&;t t
11828s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
11829s&@builddir@&$ac_builddir&;t t
11830s&@abs_builddir@&$ac_abs_builddir&;t t
11831s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
11832s&@INSTALL@&$ac_INSTALL&;t t
11833$ac_datarootdir_hack
11834" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
11835
11836test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
11837  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
11838  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
11839  { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
11840which seems to be undefined.  Please make sure it is defined." >&5
11841echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
11842which seems to be undefined.  Please make sure it is defined." >&2;}
11843
11844  rm -f "$tmp/stdin"
11845  case $ac_file in
11846  -) cat "$tmp/out"; rm -f "$tmp/out";;
11847  *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
11848  esac
11849 ;;
11850
11851
11852
11853  esac
11854
11855done # for ac_tag
11856
11857
11858{ (exit 0); exit 0; }
11859_ACEOF
11860chmod +x $CONFIG_STATUS
11861ac_clean_files=$ac_clean_files_save
11862
11863
11864# configure is writing to config.log, and then calls config.status.
11865# config.status does its own redirection, appending to config.log.
11866# Unfortunately, on DOS this fails, as config.log is still kept open
11867# by configure, so config.status won't be able to write to it; its
11868# output is simply discarded.  So we exec the FD to /dev/null,
11869# effectively closing config.log, so it can be properly (re)opened and
11870# appended to by config.status.  When coming back to configure, we
11871# need to make the FD available again.
11872if test "$no_create" != yes; then
11873  ac_cs_success=:
11874  ac_config_status_args=
11875  test "$silent" = yes &&
11876    ac_config_status_args="$ac_config_status_args --quiet"
11877  exec 5>/dev/null
11878  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
11879  exec 5>>config.log
11880  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
11881  # would make configure fail if this is the last instruction.
11882  $ac_cs_success || { (exit 1); exit 1; }
11883fi
11884
11885
11886#--------------------------------------------------------------------
11887