1#! /bin/sh
2# From configure.in Id: configure.in 267 2010-06-04 09:58:55Z nijtmans .
3# Guess values for system-dependent variables and create Makefiles.
4# Generated by GNU Autoconf 2.61 for tkimgwindow 1.4.
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='tkimgwindow'
575PACKAGE_TARNAME='tkimgwindow'
576PACKAGE_VERSION='1.4'
577PACKAGE_STRING='tkimgwindow 1.4'
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
653CYGPATH
654EXEEXT
655PKG_LIB_FILE
656PKG_STUB_LIB_FILE
657PKG_STUB_SOURCES
658PKG_STUB_OBJECTS
659PKG_TCL_SOURCES
660PKG_HEADERS
661PKG_INCLUDES
662PKG_LIBS
663PKG_CFLAGS
664PACKAGE_TCLNAME
665TCL_VERSION
666TCL_PATCH_LEVEL
667TCL_BIN_DIR
668TCL_SRC_DIR
669TCL_LIB_FILE
670TCL_LIB_FLAG
671TCL_LIB_SPEC
672TCL_STUB_LIB_FILE
673TCL_STUB_LIB_FLAG
674TCL_STUB_LIB_SPEC
675CLEANFILES
676TCL_LIBS
677TCL_DEFS
678TCL_EXTRA_CFLAGS
679TCL_LD_FLAGS
680TCL_SHLIB_LD_LIBS
681TK_VERSION
682TK_BIN_DIR
683TK_SRC_DIR
684TK_LIB_FILE
685TK_LIB_FLAG
686TK_LIB_SPEC
687TK_STUB_LIB_FILE
688TK_STUB_LIB_FLAG
689TK_STUB_LIB_SPEC
690TK_LIBS
691TK_XINCLUDES
692CC
693CFLAGS
694LDFLAGS
695CPPFLAGS
696ac_ct_CC
697OBJEXT
698CPP
699INSTALL_PROGRAM
700INSTALL_SCRIPT
701INSTALL_DATA
702SET_MAKE
703RANLIB
704GREP
705EGREP
706MATH_LIBS
707tkimg_VERSION
708tkimg_BIN_DIR
709tkimg_SRC_DIR
710tkimg_LIB_FILE
711tkimg_LIB_SPEC
712tkimg_STUB_LIB_FILE
713tkimg_STUB_LIB_SPEC
714tkimg_STUB_LIB_PATH
715tkimg_SRC_PATH
716tkimg_BUILD_PATH
717PKG_SOURCES
718PKG_OBJECTS
719TCL_INCLUDES
720TCL_TOP_DIR_NATIVE
721TK_INCLUDES
722TK_TOP_DIR_NATIVE
723TK_XLIB_DIR_NATIVE
724TCL_THREADS
725SHARED_BUILD
726AR
727CELIB_DIR
728CFLAGS_DEBUG
729CFLAGS_OPTIMIZE
730CFLAGS_WARNING
731STLIB_LD
732SHLIB_LD
733SHLIB_LD_LIBS
734SHLIB_CFLAGS
735LD_LIBRARY_PATH_VAR
736CFLAGS_DEFAULT
737LDFLAGS_DEFAULT
738TCL_DBGX
739XMKMF
740MAKE_LIB
741MAKE_SHARED_LIB
742MAKE_STATIC_LIB
743MAKE_STUB_LIB
744RANLIB_STUB
745VC_MANIFEST_EMBED_DLL
746VC_MANIFEST_EMBED_EXE
747TCLSH_PROG
748WISH_PROG
749LIBOBJS
750LTLIBOBJS'
751ac_subst_files=''
752      ac_precious_vars='build_alias
753host_alias
754target_alias
755CC
756CFLAGS
757LDFLAGS
758LIBS
759CPPFLAGS
760CPP
761XMKMF'
762
763
764# Initialize some variables set by options.
765ac_init_help=
766ac_init_version=false
767# The variables have the same names as the options, with
768# dashes changed to underlines.
769cache_file=/dev/null
770exec_prefix=NONE
771no_create=
772no_recursion=
773prefix=NONE
774program_prefix=NONE
775program_suffix=NONE
776program_transform_name=s,x,x,
777silent=
778site=
779srcdir=
780verbose=
781x_includes=NONE
782x_libraries=NONE
783
784# Installation directory options.
785# These are left unexpanded so users can "make install exec_prefix=/foo"
786# and all the variables that are supposed to be based on exec_prefix
787# by default will actually change.
788# Use braces instead of parens because sh, perl, etc. also accept them.
789# (The list follows the same order as the GNU Coding Standards.)
790bindir='${exec_prefix}/bin'
791sbindir='${exec_prefix}/sbin'
792libexecdir='${exec_prefix}/libexec'
793datarootdir='${prefix}/share'
794datadir='${datarootdir}'
795sysconfdir='${prefix}/etc'
796sharedstatedir='${prefix}/com'
797localstatedir='${prefix}/var'
798includedir='${prefix}/include'
799oldincludedir='/usr/include'
800docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
801infodir='${datarootdir}/info'
802htmldir='${docdir}'
803dvidir='${docdir}'
804pdfdir='${docdir}'
805psdir='${docdir}'
806libdir='${exec_prefix}/lib'
807localedir='${datarootdir}/locale'
808mandir='${datarootdir}/man'
809
810ac_prev=
811ac_dashdash=
812for ac_option
813do
814  # If the previous option needs an argument, assign it.
815  if test -n "$ac_prev"; then
816    eval $ac_prev=\$ac_option
817    ac_prev=
818    continue
819  fi
820
821  case $ac_option in
822  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
823  *)	ac_optarg=yes ;;
824  esac
825
826  # Accept the important Cygnus configure options, so we can diagnose typos.
827
828  case $ac_dashdash$ac_option in
829  --)
830    ac_dashdash=yes ;;
831
832  -bindir | --bindir | --bindi | --bind | --bin | --bi)
833    ac_prev=bindir ;;
834  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
835    bindir=$ac_optarg ;;
836
837  -build | --build | --buil | --bui | --bu)
838    ac_prev=build_alias ;;
839  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
840    build_alias=$ac_optarg ;;
841
842  -cache-file | --cache-file | --cache-fil | --cache-fi \
843  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
844    ac_prev=cache_file ;;
845  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
846  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
847    cache_file=$ac_optarg ;;
848
849  --config-cache | -C)
850    cache_file=config.cache ;;
851
852  -datadir | --datadir | --datadi | --datad)
853    ac_prev=datadir ;;
854  -datadir=* | --datadir=* | --datadi=* | --datad=*)
855    datadir=$ac_optarg ;;
856
857  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
858  | --dataroo | --dataro | --datar)
859    ac_prev=datarootdir ;;
860  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
861  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
862    datarootdir=$ac_optarg ;;
863
864  -disable-* | --disable-*)
865    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
866    # Reject names that are not valid shell variable names.
867    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
868      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
869   { (exit 1); exit 1; }; }
870    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
871    eval enable_$ac_feature=no ;;
872
873  -docdir | --docdir | --docdi | --doc | --do)
874    ac_prev=docdir ;;
875  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
876    docdir=$ac_optarg ;;
877
878  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
879    ac_prev=dvidir ;;
880  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
881    dvidir=$ac_optarg ;;
882
883  -enable-* | --enable-*)
884    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
885    # Reject names that are not valid shell variable names.
886    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
887      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
888   { (exit 1); exit 1; }; }
889    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
890    eval enable_$ac_feature=\$ac_optarg ;;
891
892  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
893  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
894  | --exec | --exe | --ex)
895    ac_prev=exec_prefix ;;
896  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
897  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
898  | --exec=* | --exe=* | --ex=*)
899    exec_prefix=$ac_optarg ;;
900
901  -gas | --gas | --ga | --g)
902    # Obsolete; use --with-gas.
903    with_gas=yes ;;
904
905  -help | --help | --hel | --he | -h)
906    ac_init_help=long ;;
907  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
908    ac_init_help=recursive ;;
909  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
910    ac_init_help=short ;;
911
912  -host | --host | --hos | --ho)
913    ac_prev=host_alias ;;
914  -host=* | --host=* | --hos=* | --ho=*)
915    host_alias=$ac_optarg ;;
916
917  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
918    ac_prev=htmldir ;;
919  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
920  | --ht=*)
921    htmldir=$ac_optarg ;;
922
923  -includedir | --includedir | --includedi | --included | --include \
924  | --includ | --inclu | --incl | --inc)
925    ac_prev=includedir ;;
926  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
927  | --includ=* | --inclu=* | --incl=* | --inc=*)
928    includedir=$ac_optarg ;;
929
930  -infodir | --infodir | --infodi | --infod | --info | --inf)
931    ac_prev=infodir ;;
932  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
933    infodir=$ac_optarg ;;
934
935  -libdir | --libdir | --libdi | --libd)
936    ac_prev=libdir ;;
937  -libdir=* | --libdir=* | --libdi=* | --libd=*)
938    libdir=$ac_optarg ;;
939
940  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
941  | --libexe | --libex | --libe)
942    ac_prev=libexecdir ;;
943  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
944  | --libexe=* | --libex=* | --libe=*)
945    libexecdir=$ac_optarg ;;
946
947  -localedir | --localedir | --localedi | --localed | --locale)
948    ac_prev=localedir ;;
949  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
950    localedir=$ac_optarg ;;
951
952  -localstatedir | --localstatedir | --localstatedi | --localstated \
953  | --localstate | --localstat | --localsta | --localst | --locals)
954    ac_prev=localstatedir ;;
955  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
956  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
957    localstatedir=$ac_optarg ;;
958
959  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
960    ac_prev=mandir ;;
961  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
962    mandir=$ac_optarg ;;
963
964  -nfp | --nfp | --nf)
965    # Obsolete; use --without-fp.
966    with_fp=no ;;
967
968  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
969  | --no-cr | --no-c | -n)
970    no_create=yes ;;
971
972  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
973  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
974    no_recursion=yes ;;
975
976  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
977  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
978  | --oldin | --oldi | --old | --ol | --o)
979    ac_prev=oldincludedir ;;
980  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
981  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
982  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
983    oldincludedir=$ac_optarg ;;
984
985  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
986    ac_prev=prefix ;;
987  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
988    prefix=$ac_optarg ;;
989
990  -program-prefix | --program-prefix | --program-prefi | --program-pref \
991  | --program-pre | --program-pr | --program-p)
992    ac_prev=program_prefix ;;
993  -program-prefix=* | --program-prefix=* | --program-prefi=* \
994  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
995    program_prefix=$ac_optarg ;;
996
997  -program-suffix | --program-suffix | --program-suffi | --program-suff \
998  | --program-suf | --program-su | --program-s)
999    ac_prev=program_suffix ;;
1000  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1001  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1002    program_suffix=$ac_optarg ;;
1003
1004  -program-transform-name | --program-transform-name \
1005  | --program-transform-nam | --program-transform-na \
1006  | --program-transform-n | --program-transform- \
1007  | --program-transform | --program-transfor \
1008  | --program-transfo | --program-transf \
1009  | --program-trans | --program-tran \
1010  | --progr-tra | --program-tr | --program-t)
1011    ac_prev=program_transform_name ;;
1012  -program-transform-name=* | --program-transform-name=* \
1013  | --program-transform-nam=* | --program-transform-na=* \
1014  | --program-transform-n=* | --program-transform-=* \
1015  | --program-transform=* | --program-transfor=* \
1016  | --program-transfo=* | --program-transf=* \
1017  | --program-trans=* | --program-tran=* \
1018  | --progr-tra=* | --program-tr=* | --program-t=*)
1019    program_transform_name=$ac_optarg ;;
1020
1021  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1022    ac_prev=pdfdir ;;
1023  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1024    pdfdir=$ac_optarg ;;
1025
1026  -psdir | --psdir | --psdi | --psd | --ps)
1027    ac_prev=psdir ;;
1028  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1029    psdir=$ac_optarg ;;
1030
1031  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1032  | -silent | --silent | --silen | --sile | --sil)
1033    silent=yes ;;
1034
1035  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1036    ac_prev=sbindir ;;
1037  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1038  | --sbi=* | --sb=*)
1039    sbindir=$ac_optarg ;;
1040
1041  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1042  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1043  | --sharedst | --shareds | --shared | --share | --shar \
1044  | --sha | --sh)
1045    ac_prev=sharedstatedir ;;
1046  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1047  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1048  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1049  | --sha=* | --sh=*)
1050    sharedstatedir=$ac_optarg ;;
1051
1052  -site | --site | --sit)
1053    ac_prev=site ;;
1054  -site=* | --site=* | --sit=*)
1055    site=$ac_optarg ;;
1056
1057  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1058    ac_prev=srcdir ;;
1059  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1060    srcdir=$ac_optarg ;;
1061
1062  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1063  | --syscon | --sysco | --sysc | --sys | --sy)
1064    ac_prev=sysconfdir ;;
1065  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1066  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1067    sysconfdir=$ac_optarg ;;
1068
1069  -target | --target | --targe | --targ | --tar | --ta | --t)
1070    ac_prev=target_alias ;;
1071  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1072    target_alias=$ac_optarg ;;
1073
1074  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1075    verbose=yes ;;
1076
1077  -version | --version | --versio | --versi | --vers | -V)
1078    ac_init_version=: ;;
1079
1080  -with-* | --with-*)
1081    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1082    # Reject names that are not valid shell variable names.
1083    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1084      { echo "$as_me: error: invalid package name: $ac_package" >&2
1085   { (exit 1); exit 1; }; }
1086    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1087    eval with_$ac_package=\$ac_optarg ;;
1088
1089  -without-* | --without-*)
1090    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1091    # Reject names that are not valid shell variable names.
1092    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1093      { echo "$as_me: error: invalid package name: $ac_package" >&2
1094   { (exit 1); exit 1; }; }
1095    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1096    eval with_$ac_package=no ;;
1097
1098  --x)
1099    # Obsolete; use --with-x.
1100    with_x=yes ;;
1101
1102  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1103  | --x-incl | --x-inc | --x-in | --x-i)
1104    ac_prev=x_includes ;;
1105  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1106  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1107    x_includes=$ac_optarg ;;
1108
1109  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1110  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1111    ac_prev=x_libraries ;;
1112  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1113  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1114    x_libraries=$ac_optarg ;;
1115
1116  -*) { echo "$as_me: error: unrecognized option: $ac_option
1117Try \`$0 --help' for more information." >&2
1118   { (exit 1); exit 1; }; }
1119    ;;
1120
1121  *=*)
1122    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1123    # Reject names that are not valid shell variable names.
1124    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1125      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1126   { (exit 1); exit 1; }; }
1127    eval $ac_envvar=\$ac_optarg
1128    export $ac_envvar ;;
1129
1130  *)
1131    # FIXME: should be removed in autoconf 3.0.
1132    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1133    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1134      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1135    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1136    ;;
1137
1138  esac
1139done
1140
1141if test -n "$ac_prev"; then
1142  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1143  { echo "$as_me: error: missing argument to $ac_option" >&2
1144   { (exit 1); exit 1; }; }
1145fi
1146
1147# Be sure to have absolute directory names.
1148for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1149		datadir sysconfdir sharedstatedir localstatedir includedir \
1150		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1151		libdir localedir mandir
1152do
1153  eval ac_val=\$$ac_var
1154  case $ac_val in
1155    [\\/$]* | ?:[\\/]* )  continue;;
1156    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1157  esac
1158  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1159   { (exit 1); exit 1; }; }
1160done
1161
1162# There might be people who depend on the old broken behavior: `$host'
1163# used to hold the argument of --host etc.
1164# FIXME: To remove some day.
1165build=$build_alias
1166host=$host_alias
1167target=$target_alias
1168
1169# FIXME: To remove some day.
1170if test "x$host_alias" != x; then
1171  if test "x$build_alias" = x; then
1172    cross_compiling=maybe
1173    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1174    If a cross compiler is detected then cross compile mode will be used." >&2
1175  elif test "x$build_alias" != "x$host_alias"; then
1176    cross_compiling=yes
1177  fi
1178fi
1179
1180ac_tool_prefix=
1181test -n "$host_alias" && ac_tool_prefix=$host_alias-
1182
1183test "$silent" = yes && exec 6>/dev/null
1184
1185
1186ac_pwd=`pwd` && test -n "$ac_pwd" &&
1187ac_ls_di=`ls -di .` &&
1188ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1189  { echo "$as_me: error: Working directory cannot be determined" >&2
1190   { (exit 1); exit 1; }; }
1191test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1192  { echo "$as_me: error: pwd does not report name of working directory" >&2
1193   { (exit 1); exit 1; }; }
1194
1195
1196# Find the source files, if location was not specified.
1197if test -z "$srcdir"; then
1198  ac_srcdir_defaulted=yes
1199  # Try the directory containing this script, then the parent directory.
1200  ac_confdir=`$as_dirname -- "$0" ||
1201$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1202	 X"$0" : 'X\(//\)[^/]' \| \
1203	 X"$0" : 'X\(//\)$' \| \
1204	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1205echo X"$0" |
1206    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1207	    s//\1/
1208	    q
1209	  }
1210	  /^X\(\/\/\)[^/].*/{
1211	    s//\1/
1212	    q
1213	  }
1214	  /^X\(\/\/\)$/{
1215	    s//\1/
1216	    q
1217	  }
1218	  /^X\(\/\).*/{
1219	    s//\1/
1220	    q
1221	  }
1222	  s/.*/./; q'`
1223  srcdir=$ac_confdir
1224  if test ! -r "$srcdir/$ac_unique_file"; then
1225    srcdir=..
1226  fi
1227else
1228  ac_srcdir_defaulted=no
1229fi
1230if test ! -r "$srcdir/$ac_unique_file"; then
1231  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1232  { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1233   { (exit 1); exit 1; }; }
1234fi
1235ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1236ac_abs_confdir=`(
1237	cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
1238   { (exit 1); exit 1; }; }
1239	pwd)`
1240# When building in place, set srcdir=.
1241if test "$ac_abs_confdir" = "$ac_pwd"; then
1242  srcdir=.
1243fi
1244# Remove unnecessary trailing slashes from srcdir.
1245# Double slashes in file names in object file debugging info
1246# mess up M-x gdb in Emacs.
1247case $srcdir in
1248*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1249esac
1250for ac_var in $ac_precious_vars; do
1251  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1252  eval ac_env_${ac_var}_value=\$${ac_var}
1253  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1254  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1255done
1256
1257#
1258# Report the --help message.
1259#
1260if test "$ac_init_help" = "long"; then
1261  # Omit some internal or obsolete options to make the list less imposing.
1262  # This message is too long to be a string in the A/UX 3.1 sh.
1263  cat <<_ACEOF
1264\`configure' configures tkimgwindow 1.4 to adapt to many kinds of systems.
1265
1266Usage: $0 [OPTION]... [VAR=VALUE]...
1267
1268To assign environment variables (e.g., CC, CFLAGS...), specify them as
1269VAR=VALUE.  See below for descriptions of some of the useful variables.
1270
1271Defaults for the options are specified in brackets.
1272
1273Configuration:
1274  -h, --help              display this help and exit
1275      --help=short        display options specific to this package
1276      --help=recursive    display the short help of all the included packages
1277  -V, --version           display version information and exit
1278  -q, --quiet, --silent   do not print \`checking...' messages
1279      --cache-file=FILE   cache test results in FILE [disabled]
1280  -C, --config-cache      alias for \`--cache-file=config.cache'
1281  -n, --no-create         do not create output files
1282      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1283
1284Installation directories:
1285  --prefix=PREFIX         install architecture-independent files in PREFIX
1286			  [$ac_default_prefix]
1287  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1288			  [PREFIX]
1289
1290By default, \`make install' will install all the files in
1291\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1292an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1293for instance \`--prefix=\$HOME'.
1294
1295For better control, use the options below.
1296
1297Fine tuning of the installation directories:
1298  --bindir=DIR           user executables [EPREFIX/bin]
1299  --sbindir=DIR          system admin executables [EPREFIX/sbin]
1300  --libexecdir=DIR       program executables [EPREFIX/libexec]
1301  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
1302  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
1303  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
1304  --libdir=DIR           object code libraries [EPREFIX/lib]
1305  --includedir=DIR       C header files [PREFIX/include]
1306  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
1307  --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
1308  --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
1309  --infodir=DIR          info documentation [DATAROOTDIR/info]
1310  --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
1311  --mandir=DIR           man documentation [DATAROOTDIR/man]
1312  --docdir=DIR           documentation root [DATAROOTDIR/doc/tkimgwindow]
1313  --htmldir=DIR          html documentation [DOCDIR]
1314  --dvidir=DIR           dvi documentation [DOCDIR]
1315  --pdfdir=DIR           pdf documentation [DOCDIR]
1316  --psdir=DIR            ps documentation [DOCDIR]
1317_ACEOF
1318
1319  cat <<\_ACEOF
1320
1321X features:
1322  --x-includes=DIR    X include files are in DIR
1323  --x-libraries=DIR   X library files are in DIR
1324_ACEOF
1325fi
1326
1327if test -n "$ac_init_help"; then
1328  case $ac_init_help in
1329     short | recursive ) echo "Configuration of tkimgwindow 1.4:";;
1330   esac
1331  cat <<\_ACEOF
1332
1333Optional Features:
1334  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1335  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1336  --enable-threads        build with threads
1337  --enable-shared         build and link with shared libraries (default: on)
1338  --enable-64bit          enable 64bit support (default: off)
1339  --enable-64bit-vis      enable 64bit Sparc VIS support (default: off)
1340  --disable-rpath         disable rpath support (default: on)
1341  --enable-wince          enable Win/CE support (where applicable)
1342  --enable-symbols        build with debugging symbols (default: off)
1343
1344Optional Packages:
1345  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1346  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1347  --with-tcl              directory containing tcl configuration
1348                          (tclConfig.sh)
1349  --with-tk               directory containing tk configuration (tkConfig.sh)
1350  --with-tkimg              directory containing tkimg configuration (tkimgConfig.sh)
1351  --with-tclinclude       directory containing the public Tcl header files
1352  --with-tkinclude        directory containing the public Tk header files
1353  --with-celib=DIR        use Windows/CE support library from DIR
1354  --with-x                use the X Window System
1355
1356Some influential environment variables:
1357  CC          C compiler command
1358  CFLAGS      C compiler flags
1359  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1360              nonstandard directory <lib dir>
1361  LIBS        libraries to pass to the linker, e.g. -l<library>
1362  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1363              you have headers in a nonstandard directory <include dir>
1364  CPP         C preprocessor
1365  XMKMF       Path to xmkmf, Makefile generator for X Window System
1366
1367Use these variables to override the choices made by `configure' or to help
1368it to find libraries and programs with nonstandard names/locations.
1369
1370_ACEOF
1371ac_status=$?
1372fi
1373
1374if test "$ac_init_help" = "recursive"; then
1375  # If there are subdirs, report their specific --help.
1376  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1377    test -d "$ac_dir" || continue
1378    ac_builddir=.
1379
1380case "$ac_dir" in
1381.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1382*)
1383  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
1384  # A ".." for each directory in $ac_dir_suffix.
1385  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1386  case $ac_top_builddir_sub in
1387  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1388  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1389  esac ;;
1390esac
1391ac_abs_top_builddir=$ac_pwd
1392ac_abs_builddir=$ac_pwd$ac_dir_suffix
1393# for backward compatibility:
1394ac_top_builddir=$ac_top_build_prefix
1395
1396case $srcdir in
1397  .)  # We are building in place.
1398    ac_srcdir=.
1399    ac_top_srcdir=$ac_top_builddir_sub
1400    ac_abs_top_srcdir=$ac_pwd ;;
1401  [\\/]* | ?:[\\/]* )  # Absolute name.
1402    ac_srcdir=$srcdir$ac_dir_suffix;
1403    ac_top_srcdir=$srcdir
1404    ac_abs_top_srcdir=$srcdir ;;
1405  *) # Relative name.
1406    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1407    ac_top_srcdir=$ac_top_build_prefix$srcdir
1408    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1409esac
1410ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1411
1412    cd "$ac_dir" || { ac_status=$?; continue; }
1413    # Check for guested configure.
1414    if test -f "$ac_srcdir/configure.gnu"; then
1415      echo &&
1416      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1417    elif test -f "$ac_srcdir/configure"; then
1418      echo &&
1419      $SHELL "$ac_srcdir/configure" --help=recursive
1420    else
1421      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1422    fi || ac_status=$?
1423    cd "$ac_pwd" || { ac_status=$?; break; }
1424  done
1425fi
1426
1427test -n "$ac_init_help" && exit $ac_status
1428if $ac_init_version; then
1429  cat <<\_ACEOF
1430tkimgwindow configure 1.4
1431generated by GNU Autoconf 2.61
1432
1433Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14342002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1435This configure script is free software; the Free Software Foundation
1436gives unlimited permission to copy, distribute and modify it.
1437_ACEOF
1438  exit
1439fi
1440cat >config.log <<_ACEOF
1441This file contains any messages produced by compilers while
1442running configure, to aid debugging if configure makes a mistake.
1443
1444It was created by tkimgwindow $as_me 1.4, which was
1445generated by GNU Autoconf 2.61.  Invocation command line was
1446
1447  $ $0 $@
1448
1449_ACEOF
1450exec 5>>config.log
1451{
1452cat <<_ASUNAME
1453## --------- ##
1454## Platform. ##
1455## --------- ##
1456
1457hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1458uname -m = `(uname -m) 2>/dev/null || echo unknown`
1459uname -r = `(uname -r) 2>/dev/null || echo unknown`
1460uname -s = `(uname -s) 2>/dev/null || echo unknown`
1461uname -v = `(uname -v) 2>/dev/null || echo unknown`
1462
1463/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1464/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1465
1466/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1467/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1468/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1469/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1470/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1471/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1472/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1473
1474_ASUNAME
1475
1476as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1477for as_dir in $PATH
1478do
1479  IFS=$as_save_IFS
1480  test -z "$as_dir" && as_dir=.
1481  echo "PATH: $as_dir"
1482done
1483IFS=$as_save_IFS
1484
1485} >&5
1486
1487cat >&5 <<_ACEOF
1488
1489
1490## ----------- ##
1491## Core tests. ##
1492## ----------- ##
1493
1494_ACEOF
1495
1496
1497# Keep a trace of the command line.
1498# Strip out --no-create and --no-recursion so they do not pile up.
1499# Strip out --silent because we don't want to record it for future runs.
1500# Also quote any args containing shell meta-characters.
1501# Make two passes to allow for proper duplicate-argument suppression.
1502ac_configure_args=
1503ac_configure_args0=
1504ac_configure_args1=
1505ac_must_keep_next=false
1506for ac_pass in 1 2
1507do
1508  for ac_arg
1509  do
1510    case $ac_arg in
1511    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1512    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1513    | -silent | --silent | --silen | --sile | --sil)
1514      continue ;;
1515    *\'*)
1516      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1517    esac
1518    case $ac_pass in
1519    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1520    2)
1521      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1522      if test $ac_must_keep_next = true; then
1523	ac_must_keep_next=false # Got value, back to normal.
1524      else
1525	case $ac_arg in
1526	  *=* | --config-cache | -C | -disable-* | --disable-* \
1527	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1528	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1529	  | -with-* | --with-* | -without-* | --without-* | --x)
1530	    case "$ac_configure_args0 " in
1531	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1532	    esac
1533	    ;;
1534	  -* ) ac_must_keep_next=true ;;
1535	esac
1536      fi
1537      ac_configure_args="$ac_configure_args '$ac_arg'"
1538      ;;
1539    esac
1540  done
1541done
1542$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1543$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1544
1545# When interrupted or exit'd, cleanup temporary files, and complete
1546# config.log.  We remove comments because anyway the quotes in there
1547# would cause problems or look ugly.
1548# WARNING: Use '\'' to represent an apostrophe within the trap.
1549# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1550trap 'exit_status=$?
1551  # Save into config.log some information that might help in debugging.
1552  {
1553    echo
1554
1555    cat <<\_ASBOX
1556## ---------------- ##
1557## Cache variables. ##
1558## ---------------- ##
1559_ASBOX
1560    echo
1561    # The following way of writing the cache mishandles newlines in values,
1562(
1563  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1564    eval ac_val=\$$ac_var
1565    case $ac_val in #(
1566    *${as_nl}*)
1567      case $ac_var in #(
1568      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1569echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1570      esac
1571      case $ac_var in #(
1572      _ | IFS | as_nl) ;; #(
1573      *) $as_unset $ac_var ;;
1574      esac ;;
1575    esac
1576  done
1577  (set) 2>&1 |
1578    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1579    *${as_nl}ac_space=\ *)
1580      sed -n \
1581	"s/'\''/'\''\\\\'\'''\''/g;
1582	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1583      ;; #(
1584    *)
1585      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1586      ;;
1587    esac |
1588    sort
1589)
1590    echo
1591
1592    cat <<\_ASBOX
1593## ----------------- ##
1594## Output variables. ##
1595## ----------------- ##
1596_ASBOX
1597    echo
1598    for ac_var in $ac_subst_vars
1599    do
1600      eval ac_val=\$$ac_var
1601      case $ac_val in
1602      *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1603      esac
1604      echo "$ac_var='\''$ac_val'\''"
1605    done | sort
1606    echo
1607
1608    if test -n "$ac_subst_files"; then
1609      cat <<\_ASBOX
1610## ------------------- ##
1611## File substitutions. ##
1612## ------------------- ##
1613_ASBOX
1614      echo
1615      for ac_var in $ac_subst_files
1616      do
1617	eval ac_val=\$$ac_var
1618	case $ac_val in
1619	*\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1620	esac
1621	echo "$ac_var='\''$ac_val'\''"
1622      done | sort
1623      echo
1624    fi
1625
1626    if test -s confdefs.h; then
1627      cat <<\_ASBOX
1628## ----------- ##
1629## confdefs.h. ##
1630## ----------- ##
1631_ASBOX
1632      echo
1633      cat confdefs.h
1634      echo
1635    fi
1636    test "$ac_signal" != 0 &&
1637      echo "$as_me: caught signal $ac_signal"
1638    echo "$as_me: exit $exit_status"
1639  } >&5
1640  rm -f core *.core core.conftest.* &&
1641    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1642    exit $exit_status
1643' 0
1644for ac_signal in 1 2 13 15; do
1645  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1646done
1647ac_signal=0
1648
1649# confdefs.h avoids OS command line length limits that DEFS can exceed.
1650rm -f -r conftest* confdefs.h
1651
1652# Predefined preprocessor variables.
1653
1654cat >>confdefs.h <<_ACEOF
1655#define PACKAGE_NAME "$PACKAGE_NAME"
1656_ACEOF
1657
1658
1659cat >>confdefs.h <<_ACEOF
1660#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1661_ACEOF
1662
1663
1664cat >>confdefs.h <<_ACEOF
1665#define PACKAGE_VERSION "$PACKAGE_VERSION"
1666_ACEOF
1667
1668
1669cat >>confdefs.h <<_ACEOF
1670#define PACKAGE_STRING "$PACKAGE_STRING"
1671_ACEOF
1672
1673
1674cat >>confdefs.h <<_ACEOF
1675#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1676_ACEOF
1677
1678
1679# Let the site file select an alternate cache file if it wants to.
1680# Prefer explicitly selected file to automatically selected ones.
1681if test -n "$CONFIG_SITE"; then
1682  set x "$CONFIG_SITE"
1683elif test "x$prefix" != xNONE; then
1684  set x "$prefix/share/config.site" "$prefix/etc/config.site"
1685else
1686  set x "$ac_default_prefix/share/config.site" \
1687	"$ac_default_prefix/etc/config.site"
1688fi
1689shift
1690for ac_site_file
1691do
1692  if test -r "$ac_site_file"; then
1693    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1694echo "$as_me: loading site script $ac_site_file" >&6;}
1695    sed 's/^/| /' "$ac_site_file" >&5
1696    . "$ac_site_file"
1697  fi
1698done
1699
1700if test -r "$cache_file"; then
1701  # Some versions of bash will fail to source /dev/null (special
1702  # files actually), so we avoid doing that.
1703  if test -f "$cache_file"; then
1704    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1705echo "$as_me: loading cache $cache_file" >&6;}
1706    case $cache_file in
1707      [\\/]* | ?:[\\/]* ) . "$cache_file";;
1708      *)                      . "./$cache_file";;
1709    esac
1710  fi
1711else
1712  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1713echo "$as_me: creating cache $cache_file" >&6;}
1714  >$cache_file
1715fi
1716
1717# Check that the precious variables saved in the cache have kept the same
1718# value.
1719ac_cache_corrupted=false
1720for ac_var in $ac_precious_vars; do
1721  eval ac_old_set=\$ac_cv_env_${ac_var}_set
1722  eval ac_new_set=\$ac_env_${ac_var}_set
1723  eval ac_old_val=\$ac_cv_env_${ac_var}_value
1724  eval ac_new_val=\$ac_env_${ac_var}_value
1725  case $ac_old_set,$ac_new_set in
1726    set,)
1727      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1728echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1729      ac_cache_corrupted=: ;;
1730    ,set)
1731      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1732echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1733      ac_cache_corrupted=: ;;
1734    ,);;
1735    *)
1736      if test "x$ac_old_val" != "x$ac_new_val"; then
1737	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1738echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1739	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1740echo "$as_me:   former value:  $ac_old_val" >&2;}
1741	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1742echo "$as_me:   current value: $ac_new_val" >&2;}
1743	ac_cache_corrupted=:
1744      fi;;
1745  esac
1746  # Pass precious variables to config.status.
1747  if test "$ac_new_set" = set; then
1748    case $ac_new_val in
1749    *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1750    *) ac_arg=$ac_var=$ac_new_val ;;
1751    esac
1752    case " $ac_configure_args " in
1753      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1754      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1755    esac
1756  fi
1757done
1758if $ac_cache_corrupted; then
1759  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1760echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1761  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1762echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1763   { (exit 1); exit 1; }; }
1764fi
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790ac_ext=c
1791ac_cpp='$CPP $CPPFLAGS'
1792ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1793ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1794ac_compiler_gnu=$ac_cv_c_compiler_gnu
1795
1796
1797
1798
1799    # TEA extensions pass this us the version of TEA they think they
1800    # are compatible with.
1801    TEA_VERSION="3.9"
1802
1803    { echo "$as_me:$LINENO: checking for correct TEA configuration" >&5
1804echo $ECHO_N "checking for correct TEA configuration... $ECHO_C" >&6; }
1805    if test x"${PACKAGE_NAME}" = x ; then
1806	{ { echo "$as_me:$LINENO: error:
1807The PACKAGE_NAME variable must be defined by your TEA configure.in" >&5
1808echo "$as_me: error:
1809The PACKAGE_NAME variable must be defined by your TEA configure.in" >&2;}
1810   { (exit 1); exit 1; }; }
1811    fi
1812    if test x"3.9" = x ; then
1813	{ { echo "$as_me:$LINENO: error:
1814TEA version not specified." >&5
1815echo "$as_me: error:
1816TEA version not specified." >&2;}
1817   { (exit 1); exit 1; }; }
1818    elif test "3.9" != "${TEA_VERSION}" ; then
1819	{ echo "$as_me:$LINENO: result: warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&5
1820echo "${ECHO_T}warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&6; }
1821    else
1822	{ echo "$as_me:$LINENO: result: ok (TEA ${TEA_VERSION})" >&5
1823echo "${ECHO_T}ok (TEA ${TEA_VERSION})" >&6; }
1824    fi
1825    case "`uname -s`" in
1826	*win32*|*WIN32*|*MINGW32_*)
1827	    # Extract the first word of "cygpath", so it can be a program name with args.
1828set dummy cygpath; ac_word=$2
1829{ echo "$as_me:$LINENO: checking for $ac_word" >&5
1830echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
1831if test "${ac_cv_prog_CYGPATH+set}" = set; then
1832  echo $ECHO_N "(cached) $ECHO_C" >&6
1833else
1834  if test -n "$CYGPATH"; then
1835  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
1836else
1837as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1838for as_dir in $PATH
1839do
1840  IFS=$as_save_IFS
1841  test -z "$as_dir" && as_dir=.
1842  for ac_exec_ext in '' $ac_executable_extensions; do
1843  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
1844    ac_cv_prog_CYGPATH="cygpath -w"
1845    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1846    break 2
1847  fi
1848done
1849done
1850IFS=$as_save_IFS
1851
1852  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
1853fi
1854fi
1855CYGPATH=$ac_cv_prog_CYGPATH
1856if test -n "$CYGPATH"; then
1857  { echo "$as_me:$LINENO: result: $CYGPATH" >&5
1858echo "${ECHO_T}$CYGPATH" >&6; }
1859else
1860  { echo "$as_me:$LINENO: result: no" >&5
1861echo "${ECHO_T}no" >&6; }
1862fi
1863
1864
1865	    EXEEXT=".exe"
1866	    TEA_PLATFORM="windows"
1867	    ;;
1868	*CYGWIN_*)
1869	    CYGPATH=echo
1870	    EXEEXT=".exe"
1871	    # TEA_PLATFORM is determined later in LOAD_TCLCONFIG
1872	    ;;
1873	*)
1874	    CYGPATH=echo
1875	    EXEEXT=""
1876	    TEA_PLATFORM="unix"
1877	    ;;
1878    esac
1879
1880    # Check if exec_prefix is set. If not use fall back to prefix.
1881    # Note when adjusted, so that TEA_PREFIX can correct for this.
1882    # This is needed for recursive configures, since autoconf propagates
1883    # $prefix, but not $exec_prefix (doh!).
1884    if test x$exec_prefix = xNONE ; then
1885	exec_prefix_default=yes
1886	exec_prefix=$prefix
1887    fi
1888
1889
1890
1891
1892    # This package name must be replaced statically for AC_SUBST to work
1893
1894    # Substitute STUB_LIB_FILE in case package creates a stub library too.
1895
1896
1897    # We AC_SUBST these here to ensure they are subst'ed,
1898    # in case the user doesn't call TEA_ADD_...
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908ac_aux_dir=
1909for ac_dir in ../tclconfig "$srcdir"/../tclconfig; do
1910  if test -f "$ac_dir/install-sh"; then
1911    ac_aux_dir=$ac_dir
1912    ac_install_sh="$ac_aux_dir/install-sh -c"
1913    break
1914  elif test -f "$ac_dir/install.sh"; then
1915    ac_aux_dir=$ac_dir
1916    ac_install_sh="$ac_aux_dir/install.sh -c"
1917    break
1918  elif test -f "$ac_dir/shtool"; then
1919    ac_aux_dir=$ac_dir
1920    ac_install_sh="$ac_aux_dir/shtool install -c"
1921    break
1922  fi
1923done
1924if test -z "$ac_aux_dir"; then
1925  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in ../tclconfig \"$srcdir\"/../tclconfig" >&5
1926echo "$as_me: error: cannot find install-sh or install.sh in ../tclconfig \"$srcdir\"/../tclconfig" >&2;}
1927   { (exit 1); exit 1; }; }
1928fi
1929
1930# These three variables are undocumented and unsupported,
1931# and are intended to be withdrawn in a future Autoconf release.
1932# They can cause serious problems if a builder's source tree is in a directory
1933# whose full name contains unusual characters.
1934ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
1935ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
1936ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
1937
1938
1939
1940PHIMGTYPE="window"
1941CPACKAGE="Tkimgwindow"
1942PACKAGE_TCLNAME="img::window"
1943
1944
1945#--------------------------------------------------------------------
1946# Load the tclConfig.sh file
1947# Load the tkConfig.sh file
1948#--------------------------------------------------------------------
1949
1950
1951
1952    #
1953    # Ok, lets find the tcl configuration
1954    # First, look for one uninstalled.
1955    # the alternative search directory is invoked by --with-tcl
1956    #
1957
1958    if test x"${no_tcl}" = x ; then
1959	# we reset no_tcl in case something fails here
1960	no_tcl=true
1961
1962# Check whether --with-tcl was given.
1963if test "${with_tcl+set}" = set; then
1964  withval=$with_tcl; with_tclconfig="${withval}"
1965fi
1966
1967	{ echo "$as_me:$LINENO: checking for Tcl configuration" >&5
1968echo $ECHO_N "checking for Tcl configuration... $ECHO_C" >&6; }
1969	if test "${ac_cv_c_tclconfig+set}" = set; then
1970  echo $ECHO_N "(cached) $ECHO_C" >&6
1971else
1972
1973
1974	    # First check to see if --with-tcl was specified.
1975	    if test x"${with_tclconfig}" != x ; then
1976		case "${with_tclconfig}" in
1977		    */tclConfig.sh )
1978			if test -f "${with_tclconfig}"; then
1979			    { echo "$as_me:$LINENO: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&5
1980echo "$as_me: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&2;}
1981			    with_tclconfig="`echo "${with_tclconfig}" | sed 's!/tclConfig\.sh$!!'`"
1982			fi ;;
1983		esac
1984		if test -f "${with_tclconfig}/tclConfig.sh" ; then
1985		    ac_cv_c_tclconfig="`(cd "${with_tclconfig}"; pwd)`"
1986		else
1987		    { { echo "$as_me:$LINENO: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&5
1988echo "$as_me: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&2;}
1989   { (exit 1); exit 1; }; }
1990		fi
1991	    fi
1992
1993	    # then check for a private Tcl installation
1994	    if test x"${ac_cv_c_tclconfig}" = x ; then
1995		for i in \
1996			../tcl \
1997			`ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
1998			`ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
1999			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
2000			../../tcl \
2001			`ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2002			`ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
2003			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
2004			../../../tcl \
2005			`ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2006			`ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
2007			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
2008		    if test "${TEA_PLATFORM}" = "windows" \
2009			    -a -f "$i/win/tclConfig.sh" ; then
2010			ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
2011			break
2012		    fi
2013		    if test -f "$i/unix/tclConfig.sh" ; then
2014			ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
2015			break
2016		    fi
2017		done
2018	    fi
2019
2020	    # on Darwin, check in Framework installation locations
2021	    if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
2022		for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
2023			`ls -d /Library/Frameworks 2>/dev/null` \
2024			`ls -d /Network/Library/Frameworks 2>/dev/null` \
2025			`ls -d /System/Library/Frameworks 2>/dev/null` \
2026			; do
2027		    if test -f "$i/Tcl.framework/tclConfig.sh" ; then
2028			ac_cv_c_tclconfig="`(cd $i/Tcl.framework; pwd)`"
2029			break
2030		    fi
2031		done
2032	    fi
2033
2034	    # TEA specific: on Windows, check in common installation locations
2035	    if test "${TEA_PLATFORM}" = "windows" \
2036		-a x"${ac_cv_c_tclconfig}" = x ; then
2037		for i in `ls -d C:/Tcl/lib 2>/dev/null` \
2038			`ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
2039			; do
2040		    if test -f "$i/tclConfig.sh" ; then
2041			ac_cv_c_tclconfig="`(cd $i; pwd)`"
2042			break
2043		    fi
2044		done
2045	    fi
2046
2047	    # check in a few common install locations
2048	    if test x"${ac_cv_c_tclconfig}" = x ; then
2049		for i in `ls -d ${libdir} 2>/dev/null` \
2050			`ls -d ${exec_prefix}/lib 2>/dev/null` \
2051			`ls -d ${prefix}/lib 2>/dev/null` \
2052			`ls -d /usr/local/lib 2>/dev/null` \
2053			`ls -d /usr/contrib/lib 2>/dev/null` \
2054			`ls -d /usr/lib 2>/dev/null` \
2055			`ls -d /usr/lib64 2>/dev/null` \
2056			; do
2057		    if test -f "$i/tclConfig.sh" ; then
2058			ac_cv_c_tclconfig="`(cd $i; pwd)`"
2059			break
2060		    fi
2061		done
2062	    fi
2063
2064	    # check in a few other private locations
2065	    if test x"${ac_cv_c_tclconfig}" = x ; then
2066		for i in \
2067			${srcdir}/../tcl \
2068			`ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2069			`ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
2070			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
2071		    if test "${TEA_PLATFORM}" = "windows" \
2072			    -a -f "$i/win/tclConfig.sh" ; then
2073			ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
2074			break
2075		    fi
2076		    if test -f "$i/unix/tclConfig.sh" ; then
2077			ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
2078			break
2079		    fi
2080		done
2081	    fi
2082
2083fi
2084
2085
2086	if test x"${ac_cv_c_tclconfig}" = x ; then
2087	    TCL_BIN_DIR="# no Tcl configs found"
2088	    { { echo "$as_me:$LINENO: error: Can't find Tcl configuration definitions" >&5
2089echo "$as_me: error: Can't find Tcl configuration definitions" >&2;}
2090   { (exit 1); exit 1; }; }
2091	else
2092	    no_tcl=
2093	    TCL_BIN_DIR="${ac_cv_c_tclconfig}"
2094	    { echo "$as_me:$LINENO: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
2095echo "${ECHO_T}found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
2096	fi
2097    fi
2098
2099
2100    { echo "$as_me:$LINENO: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
2101echo $ECHO_N "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... $ECHO_C" >&6; }
2102
2103    if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
2104        { echo "$as_me:$LINENO: result: loading" >&5
2105echo "${ECHO_T}loading" >&6; }
2106	. "${TCL_BIN_DIR}/tclConfig.sh"
2107    else
2108        { echo "$as_me:$LINENO: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
2109echo "${ECHO_T}could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
2110    fi
2111
2112    # eval is required to do the TCL_DBGX substitution
2113    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
2114    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
2115
2116    # If the TCL_BIN_DIR is the build directory (not the install directory),
2117    # then set the common variable name to the value of the build variables.
2118    # For example, the variable TCL_LIB_SPEC will be set to the value
2119    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
2120    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
2121    # installed and uninstalled version of Tcl.
2122    if test -f "${TCL_BIN_DIR}/Makefile" ; then
2123        TCL_LIB_SPEC="${TCL_BUILD_LIB_SPEC}"
2124        TCL_STUB_LIB_SPEC="${TCL_BUILD_STUB_LIB_SPEC}"
2125        TCL_STUB_LIB_PATH="${TCL_BUILD_STUB_LIB_PATH}"
2126    elif test "`uname -s`" = "Darwin"; then
2127	# If Tcl was built as a framework, attempt to use the libraries
2128	# from the framework at the given location so that linking works
2129	# against Tcl.framework installed in an arbitrary location.
2130	case ${TCL_DEFS} in
2131	    *TCL_FRAMEWORK*)
2132		if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
2133		    for i in "`cd "${TCL_BIN_DIR}"; pwd`" \
2134			     "`cd "${TCL_BIN_DIR}"/../..; pwd`"; do
2135			if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
2136			    TCL_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TCL_LIB_FILE}"
2137			    break
2138			fi
2139		    done
2140		fi
2141		if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
2142		    TCL_STUB_LIB_SPEC="-L`echo "${TCL_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
2143		    TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
2144		fi
2145		;;
2146	esac
2147    fi
2148
2149    # eval is required to do the TCL_DBGX substitution
2150    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
2151    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
2152    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
2153    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168    case "`uname -s`" in
2169	*CYGWIN_*)
2170	    { echo "$as_me:$LINENO: checking for cygwin variant" >&5
2171echo $ECHO_N "checking for cygwin variant... $ECHO_C" >&6; }
2172	    case ${TCL_EXTRA_CFLAGS} in
2173		*-mwin32*|*-mno-cygwin*)
2174		    TEA_PLATFORM="windows"
2175		    CFLAGS="$CFLAGS -mwin32"
2176		    { echo "$as_me:$LINENO: result: win32" >&5
2177echo "${ECHO_T}win32" >&6; }
2178		    ;;
2179		*)
2180		    TEA_PLATFORM="unix"
2181		    { echo "$as_me:$LINENO: result: unix" >&5
2182echo "${ECHO_T}unix" >&6; }
2183		    ;;
2184	    esac
2185	    EXEEXT=".exe"
2186	    ;;
2187	*)
2188	    ;;
2189    esac
2190
2191    # Do this here as we have fully defined TEA_PLATFORM now
2192    if test "${TEA_PLATFORM}" = "windows" ; then
2193	# The BUILD_$pkg is to define the correct extern storage class
2194	# handling when making this package
2195
2196cat >>confdefs.h <<_ACEOF
2197#define BUILD_${PACKAGE_NAME}
2198_ACEOF
2199
2200	CLEANFILES="$CLEANFILES *.lib *.dll *.pdb *.exp"
2201    fi
2202
2203    # TEA specific:
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213    #
2214    # Ok, lets find the tk configuration
2215    # First, look for one uninstalled.
2216    # the alternative search directory is invoked by --with-tk
2217    #
2218
2219    if test x"${no_tk}" = x ; then
2220	# we reset no_tk in case something fails here
2221	no_tk=true
2222
2223# Check whether --with-tk was given.
2224if test "${with_tk+set}" = set; then
2225  withval=$with_tk; with_tkconfig="${withval}"
2226fi
2227
2228	{ echo "$as_me:$LINENO: checking for Tk configuration" >&5
2229echo $ECHO_N "checking for Tk configuration... $ECHO_C" >&6; }
2230	if test "${ac_cv_c_tkconfig+set}" = set; then
2231  echo $ECHO_N "(cached) $ECHO_C" >&6
2232else
2233
2234
2235	    # First check to see if --with-tkconfig was specified.
2236	    if test x"${with_tkconfig}" != x ; then
2237		case "${with_tkconfig}" in
2238		    */tkConfig.sh )
2239			if test -f "${with_tkconfig}"; then
2240			    { echo "$as_me:$LINENO: WARNING: --with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself" >&5
2241echo "$as_me: WARNING: --with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself" >&2;}
2242			    with_tkconfig="`echo "${with_tkconfig}" | sed 's!/tkConfig\.sh$!!'`"
2243			fi ;;
2244		esac
2245		if test -f "${with_tkconfig}/tkConfig.sh" ; then
2246		    ac_cv_c_tkconfig="`(cd "${with_tkconfig}"; pwd)`"
2247		else
2248		    { { echo "$as_me:$LINENO: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&5
2249echo "$as_me: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&2;}
2250   { (exit 1); exit 1; }; }
2251		fi
2252	    fi
2253
2254	    # then check for a private Tk library
2255	    if test x"${ac_cv_c_tkconfig}" = x ; then
2256		for i in \
2257			../tk \
2258			`ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
2259			`ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
2260			`ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
2261			../../tk \
2262			`ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
2263			`ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
2264			`ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
2265			../../../tk \
2266			`ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
2267			`ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
2268			`ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
2269		    if test "${TEA_PLATFORM}" = "windows" \
2270			    -a -f "$i/win/tkConfig.sh" ; then
2271			ac_cv_c_tkconfig="`(cd $i/win; pwd)`"
2272			break
2273		    fi
2274		    if test -f "$i/unix/tkConfig.sh" ; then
2275			ac_cv_c_tkconfig="`(cd $i/unix; pwd)`"
2276			break
2277		    fi
2278		done
2279	    fi
2280
2281	    # on Darwin, check in Framework installation locations
2282	    if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
2283		for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
2284			`ls -d /Library/Frameworks 2>/dev/null` \
2285			`ls -d /Network/Library/Frameworks 2>/dev/null` \
2286			`ls -d /System/Library/Frameworks 2>/dev/null` \
2287			; do
2288		    if test -f "$i/Tk.framework/tkConfig.sh" ; then
2289			ac_cv_c_tkconfig="`(cd $i/Tk.framework; pwd)`"
2290			break
2291		    fi
2292		done
2293	    fi
2294
2295	    # check in a few common install locations
2296	    if test x"${ac_cv_c_tkconfig}" = x ; then
2297		for i in `ls -d ${libdir} 2>/dev/null` \
2298			`ls -d ${exec_prefix}/lib 2>/dev/null` \
2299			`ls -d ${prefix}/lib 2>/dev/null` \
2300			`ls -d /usr/local/lib 2>/dev/null` \
2301			`ls -d /usr/contrib/lib 2>/dev/null` \
2302			`ls -d /usr/lib 2>/dev/null` \
2303			`ls -d /usr/lib64 2>/dev/null` \
2304			; do
2305		    if test -f "$i/tkConfig.sh" ; then
2306			ac_cv_c_tkconfig="`(cd $i; pwd)`"
2307			break
2308		    fi
2309		done
2310	    fi
2311
2312	    # TEA specific: on Windows, check in common installation locations
2313	    if test "${TEA_PLATFORM}" = "windows" \
2314		-a x"${ac_cv_c_tkconfig}" = x ; then
2315		for i in `ls -d C:/Tcl/lib 2>/dev/null` \
2316			`ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
2317			; do
2318		    if test -f "$i/tkConfig.sh" ; then
2319			ac_cv_c_tkconfig="`(cd $i; pwd)`"
2320			break
2321		    fi
2322		done
2323	    fi
2324
2325	    # check in a few other private locations
2326	    if test x"${ac_cv_c_tkconfig}" = x ; then
2327		for i in \
2328			${srcdir}/../tk \
2329			`ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
2330			`ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
2331			`ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
2332		    if test "${TEA_PLATFORM}" = "windows" \
2333			    -a -f "$i/win/tkConfig.sh" ; then
2334			ac_cv_c_tkconfig="`(cd $i/win; pwd)`"
2335			break
2336		    fi
2337		    if test -f "$i/unix/tkConfig.sh" ; then
2338			ac_cv_c_tkconfig="`(cd $i/unix; pwd)`"
2339			break
2340		    fi
2341		done
2342	    fi
2343
2344fi
2345
2346
2347	if test x"${ac_cv_c_tkconfig}" = x ; then
2348	    TK_BIN_DIR="# no Tk configs found"
2349	    { { echo "$as_me:$LINENO: error: Can't find Tk configuration definitions" >&5
2350echo "$as_me: error: Can't find Tk configuration definitions" >&2;}
2351   { (exit 1); exit 1; }; }
2352	else
2353	    no_tk=
2354	    TK_BIN_DIR="${ac_cv_c_tkconfig}"
2355	    { echo "$as_me:$LINENO: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
2356echo "${ECHO_T}found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
2357	fi
2358    fi
2359
2360
2361    { echo "$as_me:$LINENO: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
2362echo $ECHO_N "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... $ECHO_C" >&6; }
2363
2364    if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
2365        { echo "$as_me:$LINENO: result: loading" >&5
2366echo "${ECHO_T}loading" >&6; }
2367	. "${TK_BIN_DIR}/tkConfig.sh"
2368    else
2369        { echo "$as_me:$LINENO: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
2370echo "${ECHO_T}could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
2371    fi
2372
2373    # eval is required to do the TK_DBGX substitution
2374    eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
2375    eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
2376
2377    # If the TK_BIN_DIR is the build directory (not the install directory),
2378    # then set the common variable name to the value of the build variables.
2379    # For example, the variable TK_LIB_SPEC will be set to the value
2380    # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
2381    # instead of TK_BUILD_LIB_SPEC since it will work with both an
2382    # installed and uninstalled version of Tcl.
2383    if test -f "${TK_BIN_DIR}/Makefile" ; then
2384        TK_LIB_SPEC="${TK_BUILD_LIB_SPEC}"
2385        TK_STUB_LIB_SPEC="${TK_BUILD_STUB_LIB_SPEC}"
2386        TK_STUB_LIB_PATH="${TK_BUILD_STUB_LIB_PATH}"
2387    elif test "`uname -s`" = "Darwin"; then
2388	# If Tk was built as a framework, attempt to use the libraries
2389	# from the framework at the given location so that linking works
2390	# against Tk.framework installed in an arbitrary location.
2391	case ${TK_DEFS} in
2392	    *TK_FRAMEWORK*)
2393		if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
2394		    for i in "`cd "${TK_BIN_DIR}"; pwd`" \
2395			     "`cd "${TK_BIN_DIR}"/../..; pwd`"; do
2396			if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
2397			    TK_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TK_LIB_FILE}"
2398			    break
2399			fi
2400		    done
2401		fi
2402		if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
2403		    TK_STUB_LIB_SPEC="-L` echo "${TK_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TK_STUB_LIB_FLAG}"
2404		    TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
2405		fi
2406		;;
2407	esac
2408    fi
2409
2410    # eval is required to do the TK_DBGX substitution
2411    eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
2412    eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
2413    eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
2414    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
2415
2416    # TEA specific: Ensure windowingsystem is defined
2417    if test "${TEA_PLATFORM}" = "unix" ; then
2418	case ${TK_DEFS} in
2419	    *MAC_OSX_TK*)
2420
2421cat >>confdefs.h <<\_ACEOF
2422#define MAC_OSX_TK 1
2423_ACEOF
2424
2425		TEA_WINDOWINGSYSTEM="aqua"
2426		;;
2427	    *)
2428		TEA_WINDOWINGSYSTEM="x11"
2429		;;
2430	esac
2431    elif test "${TEA_PLATFORM}" = "windows" ; then
2432	TEA_WINDOWINGSYSTEM="win32"
2433    fi
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447    # TEA specific:
2448
2449
2450
2451
2452#-----------------------------------------------------------------------
2453# Handle the --prefix=... option by defaulting to what Tcl gave.
2454# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
2455#-----------------------------------------------------------------------
2456
2457
2458    if test "${prefix}" = "NONE"; then
2459	prefix_default=yes
2460	if test x"${TCL_PREFIX}" != x; then
2461	    { echo "$as_me:$LINENO: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&5
2462echo "$as_me: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&6;}
2463	    prefix=${TCL_PREFIX}
2464	else
2465	    { echo "$as_me:$LINENO: --prefix defaulting to /usr/local" >&5
2466echo "$as_me: --prefix defaulting to /usr/local" >&6;}
2467	    prefix=/usr/local
2468	fi
2469    fi
2470    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \
2471	-o x"${exec_prefix_default}" = x"yes" ; then
2472	if test x"${TCL_EXEC_PREFIX}" != x; then
2473	    { echo "$as_me:$LINENO: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&5
2474echo "$as_me: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&6;}
2475	    exec_prefix=${TCL_EXEC_PREFIX}
2476	else
2477	    { echo "$as_me:$LINENO: --exec-prefix defaulting to ${prefix}" >&5
2478echo "$as_me: --exec-prefix defaulting to ${prefix}" >&6;}
2479	    exec_prefix=$prefix
2480	fi
2481    fi
2482
2483
2484#-----------------------------------------------------------------------
2485# Standard compiler checks.
2486# This sets up CC by using the CC env var, or looks for gcc otherwise.
2487# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
2488# the basic setup necessary to compile executables.
2489#-----------------------------------------------------------------------
2490
2491
2492    # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE)
2493    # in this macro, they need to go into TEA_SETUP_COMPILER instead.
2494
2495    # If the user did not set CFLAGS, set it now to keep
2496    # the AC_PROG_CC macro from adding "-g -O2".
2497    if test "${CFLAGS+set}" != "set" ; then
2498	CFLAGS=""
2499    fi
2500
2501    ac_ext=c
2502ac_cpp='$CPP $CPPFLAGS'
2503ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2504ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2505ac_compiler_gnu=$ac_cv_c_compiler_gnu
2506if test -n "$ac_tool_prefix"; then
2507  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2508set dummy ${ac_tool_prefix}gcc; ac_word=$2
2509{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2510echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2511if test "${ac_cv_prog_CC+set}" = set; then
2512  echo $ECHO_N "(cached) $ECHO_C" >&6
2513else
2514  if test -n "$CC"; then
2515  ac_cv_prog_CC="$CC" # Let the user override the test.
2516else
2517as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2518for as_dir in $PATH
2519do
2520  IFS=$as_save_IFS
2521  test -z "$as_dir" && as_dir=.
2522  for ac_exec_ext in '' $ac_executable_extensions; do
2523  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2524    ac_cv_prog_CC="${ac_tool_prefix}gcc"
2525    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2526    break 2
2527  fi
2528done
2529done
2530IFS=$as_save_IFS
2531
2532fi
2533fi
2534CC=$ac_cv_prog_CC
2535if test -n "$CC"; then
2536  { echo "$as_me:$LINENO: result: $CC" >&5
2537echo "${ECHO_T}$CC" >&6; }
2538else
2539  { echo "$as_me:$LINENO: result: no" >&5
2540echo "${ECHO_T}no" >&6; }
2541fi
2542
2543
2544fi
2545if test -z "$ac_cv_prog_CC"; then
2546  ac_ct_CC=$CC
2547  # Extract the first word of "gcc", so it can be a program name with args.
2548set dummy gcc; ac_word=$2
2549{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2550echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2551if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2552  echo $ECHO_N "(cached) $ECHO_C" >&6
2553else
2554  if test -n "$ac_ct_CC"; then
2555  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2556else
2557as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2558for as_dir in $PATH
2559do
2560  IFS=$as_save_IFS
2561  test -z "$as_dir" && as_dir=.
2562  for ac_exec_ext in '' $ac_executable_extensions; do
2563  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2564    ac_cv_prog_ac_ct_CC="gcc"
2565    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2566    break 2
2567  fi
2568done
2569done
2570IFS=$as_save_IFS
2571
2572fi
2573fi
2574ac_ct_CC=$ac_cv_prog_ac_ct_CC
2575if test -n "$ac_ct_CC"; then
2576  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2577echo "${ECHO_T}$ac_ct_CC" >&6; }
2578else
2579  { echo "$as_me:$LINENO: result: no" >&5
2580echo "${ECHO_T}no" >&6; }
2581fi
2582
2583  if test "x$ac_ct_CC" = x; then
2584    CC=""
2585  else
2586    case $cross_compiling:$ac_tool_warned in
2587yes:)
2588{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2589whose name does not start with the host triplet.  If you think this
2590configuration is useful to you, please write to autoconf@gnu.org." >&5
2591echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2592whose name does not start with the host triplet.  If you think this
2593configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2594ac_tool_warned=yes ;;
2595esac
2596    CC=$ac_ct_CC
2597  fi
2598else
2599  CC="$ac_cv_prog_CC"
2600fi
2601
2602if test -z "$CC"; then
2603          if test -n "$ac_tool_prefix"; then
2604    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2605set dummy ${ac_tool_prefix}cc; ac_word=$2
2606{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2607echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2608if test "${ac_cv_prog_CC+set}" = set; then
2609  echo $ECHO_N "(cached) $ECHO_C" >&6
2610else
2611  if test -n "$CC"; then
2612  ac_cv_prog_CC="$CC" # Let the user override the test.
2613else
2614as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2615for as_dir in $PATH
2616do
2617  IFS=$as_save_IFS
2618  test -z "$as_dir" && as_dir=.
2619  for ac_exec_ext in '' $ac_executable_extensions; do
2620  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2621    ac_cv_prog_CC="${ac_tool_prefix}cc"
2622    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2623    break 2
2624  fi
2625done
2626done
2627IFS=$as_save_IFS
2628
2629fi
2630fi
2631CC=$ac_cv_prog_CC
2632if test -n "$CC"; then
2633  { echo "$as_me:$LINENO: result: $CC" >&5
2634echo "${ECHO_T}$CC" >&6; }
2635else
2636  { echo "$as_me:$LINENO: result: no" >&5
2637echo "${ECHO_T}no" >&6; }
2638fi
2639
2640
2641  fi
2642fi
2643if test -z "$CC"; then
2644  # Extract the first word of "cc", so it can be a program name with args.
2645set dummy cc; ac_word=$2
2646{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2647echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2648if test "${ac_cv_prog_CC+set}" = set; then
2649  echo $ECHO_N "(cached) $ECHO_C" >&6
2650else
2651  if test -n "$CC"; then
2652  ac_cv_prog_CC="$CC" # Let the user override the test.
2653else
2654  ac_prog_rejected=no
2655as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2656for as_dir in $PATH
2657do
2658  IFS=$as_save_IFS
2659  test -z "$as_dir" && as_dir=.
2660  for ac_exec_ext in '' $ac_executable_extensions; do
2661  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2662    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2663       ac_prog_rejected=yes
2664       continue
2665     fi
2666    ac_cv_prog_CC="cc"
2667    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2668    break 2
2669  fi
2670done
2671done
2672IFS=$as_save_IFS
2673
2674if test $ac_prog_rejected = yes; then
2675  # We found a bogon in the path, so make sure we never use it.
2676  set dummy $ac_cv_prog_CC
2677  shift
2678  if test $# != 0; then
2679    # We chose a different compiler from the bogus one.
2680    # However, it has the same basename, so the bogon will be chosen
2681    # first if we set CC to just the basename; use the full file name.
2682    shift
2683    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2684  fi
2685fi
2686fi
2687fi
2688CC=$ac_cv_prog_CC
2689if test -n "$CC"; then
2690  { echo "$as_me:$LINENO: result: $CC" >&5
2691echo "${ECHO_T}$CC" >&6; }
2692else
2693  { echo "$as_me:$LINENO: result: no" >&5
2694echo "${ECHO_T}no" >&6; }
2695fi
2696
2697
2698fi
2699if test -z "$CC"; then
2700  if test -n "$ac_tool_prefix"; then
2701  for ac_prog in cl.exe
2702  do
2703    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2704set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2705{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2706echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2707if test "${ac_cv_prog_CC+set}" = set; then
2708  echo $ECHO_N "(cached) $ECHO_C" >&6
2709else
2710  if test -n "$CC"; then
2711  ac_cv_prog_CC="$CC" # Let the user override the test.
2712else
2713as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2714for as_dir in $PATH
2715do
2716  IFS=$as_save_IFS
2717  test -z "$as_dir" && as_dir=.
2718  for ac_exec_ext in '' $ac_executable_extensions; do
2719  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2720    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2721    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2722    break 2
2723  fi
2724done
2725done
2726IFS=$as_save_IFS
2727
2728fi
2729fi
2730CC=$ac_cv_prog_CC
2731if test -n "$CC"; then
2732  { echo "$as_me:$LINENO: result: $CC" >&5
2733echo "${ECHO_T}$CC" >&6; }
2734else
2735  { echo "$as_me:$LINENO: result: no" >&5
2736echo "${ECHO_T}no" >&6; }
2737fi
2738
2739
2740    test -n "$CC" && break
2741  done
2742fi
2743if test -z "$CC"; then
2744  ac_ct_CC=$CC
2745  for ac_prog in cl.exe
2746do
2747  # Extract the first word of "$ac_prog", so it can be a program name with args.
2748set dummy $ac_prog; ac_word=$2
2749{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2750echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2751if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2752  echo $ECHO_N "(cached) $ECHO_C" >&6
2753else
2754  if test -n "$ac_ct_CC"; then
2755  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2756else
2757as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2758for as_dir in $PATH
2759do
2760  IFS=$as_save_IFS
2761  test -z "$as_dir" && as_dir=.
2762  for ac_exec_ext in '' $ac_executable_extensions; do
2763  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2764    ac_cv_prog_ac_ct_CC="$ac_prog"
2765    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2766    break 2
2767  fi
2768done
2769done
2770IFS=$as_save_IFS
2771
2772fi
2773fi
2774ac_ct_CC=$ac_cv_prog_ac_ct_CC
2775if test -n "$ac_ct_CC"; then
2776  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2777echo "${ECHO_T}$ac_ct_CC" >&6; }
2778else
2779  { echo "$as_me:$LINENO: result: no" >&5
2780echo "${ECHO_T}no" >&6; }
2781fi
2782
2783
2784  test -n "$ac_ct_CC" && break
2785done
2786
2787  if test "x$ac_ct_CC" = x; then
2788    CC=""
2789  else
2790    case $cross_compiling:$ac_tool_warned in
2791yes:)
2792{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2793whose name does not start with the host triplet.  If you think this
2794configuration is useful to you, please write to autoconf@gnu.org." >&5
2795echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2796whose name does not start with the host triplet.  If you think this
2797configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2798ac_tool_warned=yes ;;
2799esac
2800    CC=$ac_ct_CC
2801  fi
2802fi
2803
2804fi
2805
2806
2807test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2808See \`config.log' for more details." >&5
2809echo "$as_me: error: no acceptable C compiler found in \$PATH
2810See \`config.log' for more details." >&2;}
2811   { (exit 1); exit 1; }; }
2812
2813# Provide some information about the compiler.
2814echo "$as_me:$LINENO: checking for C compiler version" >&5
2815ac_compiler=`set X $ac_compile; echo $2`
2816{ (ac_try="$ac_compiler --version >&5"
2817case "(($ac_try" in
2818  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2819  *) ac_try_echo=$ac_try;;
2820esac
2821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2822  (eval "$ac_compiler --version >&5") 2>&5
2823  ac_status=$?
2824  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2825  (exit $ac_status); }
2826{ (ac_try="$ac_compiler -v >&5"
2827case "(($ac_try" in
2828  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2829  *) ac_try_echo=$ac_try;;
2830esac
2831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2832  (eval "$ac_compiler -v >&5") 2>&5
2833  ac_status=$?
2834  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2835  (exit $ac_status); }
2836{ (ac_try="$ac_compiler -V >&5"
2837case "(($ac_try" in
2838  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2839  *) ac_try_echo=$ac_try;;
2840esac
2841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2842  (eval "$ac_compiler -V >&5") 2>&5
2843  ac_status=$?
2844  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2845  (exit $ac_status); }
2846
2847cat >conftest.$ac_ext <<_ACEOF
2848/* confdefs.h.  */
2849_ACEOF
2850cat confdefs.h >>conftest.$ac_ext
2851cat >>conftest.$ac_ext <<_ACEOF
2852/* end confdefs.h.  */
2853
2854int
2855main ()
2856{
2857
2858  ;
2859  return 0;
2860}
2861_ACEOF
2862ac_clean_files_save=$ac_clean_files
2863ac_clean_files="$ac_clean_files a.out a.exe b.out"
2864# Try to create an executable without -o first, disregard a.out.
2865# It will help us diagnose broken compilers, and finding out an intuition
2866# of exeext.
2867{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2868echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2869ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2870#
2871# List of possible output files, starting from the most likely.
2872# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2873# only as a last resort.  b.out is created by i960 compilers.
2874ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2875#
2876# The IRIX 6 linker writes into existing files which may not be
2877# executable, retaining their permissions.  Remove them first so a
2878# subsequent execution test works.
2879ac_rmfiles=
2880for ac_file in $ac_files
2881do
2882  case $ac_file in
2883    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2884    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2885  esac
2886done
2887rm -f $ac_rmfiles
2888
2889if { (ac_try="$ac_link_default"
2890case "(($ac_try" in
2891  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2892  *) ac_try_echo=$ac_try;;
2893esac
2894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2895  (eval "$ac_link_default") 2>&5
2896  ac_status=$?
2897  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2898  (exit $ac_status); }; then
2899  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2900# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2901# in a Makefile.  We should not override ac_cv_exeext if it was cached,
2902# so that the user can short-circuit this test for compilers unknown to
2903# Autoconf.
2904for ac_file in $ac_files ''
2905do
2906  test -f "$ac_file" || continue
2907  case $ac_file in
2908    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
2909	;;
2910    [ab].out )
2911	# We found the default executable, but exeext='' is most
2912	# certainly right.
2913	break;;
2914    *.* )
2915        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2916	then :; else
2917	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2918	fi
2919	# We set ac_cv_exeext here because the later test for it is not
2920	# safe: cross compilers may not add the suffix if given an `-o'
2921	# argument, so we may need to know it at that point already.
2922	# Even if this section looks crufty: it has the advantage of
2923	# actually working.
2924	break;;
2925    * )
2926	break;;
2927  esac
2928done
2929test "$ac_cv_exeext" = no && ac_cv_exeext=
2930
2931else
2932  ac_file=''
2933fi
2934
2935{ echo "$as_me:$LINENO: result: $ac_file" >&5
2936echo "${ECHO_T}$ac_file" >&6; }
2937if test -z "$ac_file"; then
2938  echo "$as_me: failed program was:" >&5
2939sed 's/^/| /' conftest.$ac_ext >&5
2940
2941{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2942See \`config.log' for more details." >&5
2943echo "$as_me: error: C compiler cannot create executables
2944See \`config.log' for more details." >&2;}
2945   { (exit 77); exit 77; }; }
2946fi
2947
2948ac_exeext=$ac_cv_exeext
2949
2950# Check that the compiler produces executables we can run.  If not, either
2951# the compiler is broken, or we cross compile.
2952{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2953echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
2954# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2955# If not cross compiling, check that we can run a simple program.
2956if test "$cross_compiling" != yes; then
2957  if { ac_try='./$ac_file'
2958  { (case "(($ac_try" in
2959  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2960  *) ac_try_echo=$ac_try;;
2961esac
2962eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2963  (eval "$ac_try") 2>&5
2964  ac_status=$?
2965  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2966  (exit $ac_status); }; }; then
2967    cross_compiling=no
2968  else
2969    if test "$cross_compiling" = maybe; then
2970	cross_compiling=yes
2971    else
2972	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2973If you meant to cross compile, use \`--host'.
2974See \`config.log' for more details." >&5
2975echo "$as_me: error: cannot run C compiled programs.
2976If you meant to cross compile, use \`--host'.
2977See \`config.log' for more details." >&2;}
2978   { (exit 1); exit 1; }; }
2979    fi
2980  fi
2981fi
2982{ echo "$as_me:$LINENO: result: yes" >&5
2983echo "${ECHO_T}yes" >&6; }
2984
2985rm -f a.out a.exe conftest$ac_cv_exeext b.out
2986ac_clean_files=$ac_clean_files_save
2987# Check that the compiler produces executables we can run.  If not, either
2988# the compiler is broken, or we cross compile.
2989{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2990echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2991{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2992echo "${ECHO_T}$cross_compiling" >&6; }
2993
2994{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2995echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2996if { (ac_try="$ac_link"
2997case "(($ac_try" in
2998  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2999  *) ac_try_echo=$ac_try;;
3000esac
3001eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3002  (eval "$ac_link") 2>&5
3003  ac_status=$?
3004  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3005  (exit $ac_status); }; then
3006  # If both `conftest.exe' and `conftest' are `present' (well, observable)
3007# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3008# work properly (i.e., refer to `conftest.exe'), while it won't with
3009# `rm'.
3010for ac_file in conftest.exe conftest conftest.*; do
3011  test -f "$ac_file" || continue
3012  case $ac_file in
3013    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
3014    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3015	  break;;
3016    * ) break;;
3017  esac
3018done
3019else
3020  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3021See \`config.log' for more details." >&5
3022echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3023See \`config.log' for more details." >&2;}
3024   { (exit 1); exit 1; }; }
3025fi
3026
3027rm -f conftest$ac_cv_exeext
3028{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3029echo "${ECHO_T}$ac_cv_exeext" >&6; }
3030
3031rm -f conftest.$ac_ext
3032EXEEXT=$ac_cv_exeext
3033ac_exeext=$EXEEXT
3034{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
3035echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
3036if test "${ac_cv_objext+set}" = set; then
3037  echo $ECHO_N "(cached) $ECHO_C" >&6
3038else
3039  cat >conftest.$ac_ext <<_ACEOF
3040/* confdefs.h.  */
3041_ACEOF
3042cat confdefs.h >>conftest.$ac_ext
3043cat >>conftest.$ac_ext <<_ACEOF
3044/* end confdefs.h.  */
3045
3046int
3047main ()
3048{
3049
3050  ;
3051  return 0;
3052}
3053_ACEOF
3054rm -f conftest.o conftest.obj
3055if { (ac_try="$ac_compile"
3056case "(($ac_try" in
3057  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3058  *) ac_try_echo=$ac_try;;
3059esac
3060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3061  (eval "$ac_compile") 2>&5
3062  ac_status=$?
3063  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3064  (exit $ac_status); }; then
3065  for ac_file in conftest.o conftest.obj conftest.*; do
3066  test -f "$ac_file" || continue;
3067  case $ac_file in
3068    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
3069    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3070       break;;
3071  esac
3072done
3073else
3074  echo "$as_me: failed program was:" >&5
3075sed 's/^/| /' conftest.$ac_ext >&5
3076
3077{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3078See \`config.log' for more details." >&5
3079echo "$as_me: error: cannot compute suffix of object files: cannot compile
3080See \`config.log' for more details." >&2;}
3081   { (exit 1); exit 1; }; }
3082fi
3083
3084rm -f conftest.$ac_cv_objext conftest.$ac_ext
3085fi
3086{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3087echo "${ECHO_T}$ac_cv_objext" >&6; }
3088OBJEXT=$ac_cv_objext
3089ac_objext=$OBJEXT
3090{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3091echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
3092if test "${ac_cv_c_compiler_gnu+set}" = set; then
3093  echo $ECHO_N "(cached) $ECHO_C" >&6
3094else
3095  cat >conftest.$ac_ext <<_ACEOF
3096/* confdefs.h.  */
3097_ACEOF
3098cat confdefs.h >>conftest.$ac_ext
3099cat >>conftest.$ac_ext <<_ACEOF
3100/* end confdefs.h.  */
3101
3102int
3103main ()
3104{
3105#ifndef __GNUC__
3106       choke me
3107#endif
3108
3109  ;
3110  return 0;
3111}
3112_ACEOF
3113rm -f conftest.$ac_objext
3114if { (ac_try="$ac_compile"
3115case "(($ac_try" in
3116  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3117  *) ac_try_echo=$ac_try;;
3118esac
3119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3120  (eval "$ac_compile") 2>conftest.er1
3121  ac_status=$?
3122  grep -v '^ *+' conftest.er1 >conftest.err
3123  rm -f conftest.er1
3124  cat conftest.err >&5
3125  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3126  (exit $ac_status); } && {
3127	 test -z "$ac_c_werror_flag" ||
3128	 test ! -s conftest.err
3129       } && test -s conftest.$ac_objext; then
3130  ac_compiler_gnu=yes
3131else
3132  echo "$as_me: failed program was:" >&5
3133sed 's/^/| /' conftest.$ac_ext >&5
3134
3135	ac_compiler_gnu=no
3136fi
3137
3138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3139ac_cv_c_compiler_gnu=$ac_compiler_gnu
3140
3141fi
3142{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3143echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
3144GCC=`test $ac_compiler_gnu = yes && echo yes`
3145ac_test_CFLAGS=${CFLAGS+set}
3146ac_save_CFLAGS=$CFLAGS
3147{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3148echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
3149if test "${ac_cv_prog_cc_g+set}" = set; then
3150  echo $ECHO_N "(cached) $ECHO_C" >&6
3151else
3152  ac_save_c_werror_flag=$ac_c_werror_flag
3153   ac_c_werror_flag=yes
3154   ac_cv_prog_cc_g=no
3155   CFLAGS="-g"
3156   cat >conftest.$ac_ext <<_ACEOF
3157/* confdefs.h.  */
3158_ACEOF
3159cat confdefs.h >>conftest.$ac_ext
3160cat >>conftest.$ac_ext <<_ACEOF
3161/* end confdefs.h.  */
3162
3163int
3164main ()
3165{
3166
3167  ;
3168  return 0;
3169}
3170_ACEOF
3171rm -f conftest.$ac_objext
3172if { (ac_try="$ac_compile"
3173case "(($ac_try" in
3174  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3175  *) ac_try_echo=$ac_try;;
3176esac
3177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3178  (eval "$ac_compile") 2>conftest.er1
3179  ac_status=$?
3180  grep -v '^ *+' conftest.er1 >conftest.err
3181  rm -f conftest.er1
3182  cat conftest.err >&5
3183  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3184  (exit $ac_status); } && {
3185	 test -z "$ac_c_werror_flag" ||
3186	 test ! -s conftest.err
3187       } && test -s conftest.$ac_objext; then
3188  ac_cv_prog_cc_g=yes
3189else
3190  echo "$as_me: failed program was:" >&5
3191sed 's/^/| /' conftest.$ac_ext >&5
3192
3193	CFLAGS=""
3194      cat >conftest.$ac_ext <<_ACEOF
3195/* confdefs.h.  */
3196_ACEOF
3197cat confdefs.h >>conftest.$ac_ext
3198cat >>conftest.$ac_ext <<_ACEOF
3199/* end confdefs.h.  */
3200
3201int
3202main ()
3203{
3204
3205  ;
3206  return 0;
3207}
3208_ACEOF
3209rm -f conftest.$ac_objext
3210if { (ac_try="$ac_compile"
3211case "(($ac_try" in
3212  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3213  *) ac_try_echo=$ac_try;;
3214esac
3215eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3216  (eval "$ac_compile") 2>conftest.er1
3217  ac_status=$?
3218  grep -v '^ *+' conftest.er1 >conftest.err
3219  rm -f conftest.er1
3220  cat conftest.err >&5
3221  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3222  (exit $ac_status); } && {
3223	 test -z "$ac_c_werror_flag" ||
3224	 test ! -s conftest.err
3225       } && test -s conftest.$ac_objext; then
3226  :
3227else
3228  echo "$as_me: failed program was:" >&5
3229sed 's/^/| /' conftest.$ac_ext >&5
3230
3231	ac_c_werror_flag=$ac_save_c_werror_flag
3232	 CFLAGS="-g"
3233	 cat >conftest.$ac_ext <<_ACEOF
3234/* confdefs.h.  */
3235_ACEOF
3236cat confdefs.h >>conftest.$ac_ext
3237cat >>conftest.$ac_ext <<_ACEOF
3238/* end confdefs.h.  */
3239
3240int
3241main ()
3242{
3243
3244  ;
3245  return 0;
3246}
3247_ACEOF
3248rm -f conftest.$ac_objext
3249if { (ac_try="$ac_compile"
3250case "(($ac_try" in
3251  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3252  *) ac_try_echo=$ac_try;;
3253esac
3254eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3255  (eval "$ac_compile") 2>conftest.er1
3256  ac_status=$?
3257  grep -v '^ *+' conftest.er1 >conftest.err
3258  rm -f conftest.er1
3259  cat conftest.err >&5
3260  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3261  (exit $ac_status); } && {
3262	 test -z "$ac_c_werror_flag" ||
3263	 test ! -s conftest.err
3264       } && test -s conftest.$ac_objext; then
3265  ac_cv_prog_cc_g=yes
3266else
3267  echo "$as_me: failed program was:" >&5
3268sed 's/^/| /' conftest.$ac_ext >&5
3269
3270
3271fi
3272
3273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3274fi
3275
3276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3277fi
3278
3279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3280   ac_c_werror_flag=$ac_save_c_werror_flag
3281fi
3282{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3283echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
3284if test "$ac_test_CFLAGS" = set; then
3285  CFLAGS=$ac_save_CFLAGS
3286elif test $ac_cv_prog_cc_g = yes; then
3287  if test "$GCC" = yes; then
3288    CFLAGS="-g -O2"
3289  else
3290    CFLAGS="-g"
3291  fi
3292else
3293  if test "$GCC" = yes; then
3294    CFLAGS="-O2"
3295  else
3296    CFLAGS=
3297  fi
3298fi
3299{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3300echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3301if test "${ac_cv_prog_cc_c89+set}" = set; then
3302  echo $ECHO_N "(cached) $ECHO_C" >&6
3303else
3304  ac_cv_prog_cc_c89=no
3305ac_save_CC=$CC
3306cat >conftest.$ac_ext <<_ACEOF
3307/* confdefs.h.  */
3308_ACEOF
3309cat confdefs.h >>conftest.$ac_ext
3310cat >>conftest.$ac_ext <<_ACEOF
3311/* end confdefs.h.  */
3312#include <stdarg.h>
3313#include <stdio.h>
3314#include <sys/types.h>
3315#include <sys/stat.h>
3316/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3317struct buf { int x; };
3318FILE * (*rcsopen) (struct buf *, struct stat *, int);
3319static char *e (p, i)
3320     char **p;
3321     int i;
3322{
3323  return p[i];
3324}
3325static char *f (char * (*g) (char **, int), char **p, ...)
3326{
3327  char *s;
3328  va_list v;
3329  va_start (v,p);
3330  s = g (p, va_arg (v,int));
3331  va_end (v);
3332  return s;
3333}
3334
3335/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3336   function prototypes and stuff, but not '\xHH' hex character constants.
3337   These don't provoke an error unfortunately, instead are silently treated
3338   as 'x'.  The following induces an error, until -std is added to get
3339   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3340   array size at least.  It's necessary to write '\x00'==0 to get something
3341   that's true only with -std.  */
3342int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3343
3344/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3345   inside strings and character constants.  */
3346#define FOO(x) 'x'
3347int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3348
3349int test (int i, double x);
3350struct s1 {int (*f) (int a);};
3351struct s2 {int (*f) (double a);};
3352int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3353int argc;
3354char **argv;
3355int
3356main ()
3357{
3358return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3359  ;
3360  return 0;
3361}
3362_ACEOF
3363for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3364	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3365do
3366  CC="$ac_save_CC $ac_arg"
3367  rm -f conftest.$ac_objext
3368if { (ac_try="$ac_compile"
3369case "(($ac_try" in
3370  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3371  *) ac_try_echo=$ac_try;;
3372esac
3373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3374  (eval "$ac_compile") 2>conftest.er1
3375  ac_status=$?
3376  grep -v '^ *+' conftest.er1 >conftest.err
3377  rm -f conftest.er1
3378  cat conftest.err >&5
3379  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3380  (exit $ac_status); } && {
3381	 test -z "$ac_c_werror_flag" ||
3382	 test ! -s conftest.err
3383       } && test -s conftest.$ac_objext; then
3384  ac_cv_prog_cc_c89=$ac_arg
3385else
3386  echo "$as_me: failed program was:" >&5
3387sed 's/^/| /' conftest.$ac_ext >&5
3388
3389
3390fi
3391
3392rm -f core conftest.err conftest.$ac_objext
3393  test "x$ac_cv_prog_cc_c89" != "xno" && break
3394done
3395rm -f conftest.$ac_ext
3396CC=$ac_save_CC
3397
3398fi
3399# AC_CACHE_VAL
3400case "x$ac_cv_prog_cc_c89" in
3401  x)
3402    { echo "$as_me:$LINENO: result: none needed" >&5
3403echo "${ECHO_T}none needed" >&6; } ;;
3404  xno)
3405    { echo "$as_me:$LINENO: result: unsupported" >&5
3406echo "${ECHO_T}unsupported" >&6; } ;;
3407  *)
3408    CC="$CC $ac_cv_prog_cc_c89"
3409    { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3410echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
3411esac
3412
3413
3414ac_ext=c
3415ac_cpp='$CPP $CPPFLAGS'
3416ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3417ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3418ac_compiler_gnu=$ac_cv_c_compiler_gnu
3419
3420    ac_ext=c
3421ac_cpp='$CPP $CPPFLAGS'
3422ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3423ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3424ac_compiler_gnu=$ac_cv_c_compiler_gnu
3425{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3426echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
3427# On Suns, sometimes $CPP names a directory.
3428if test -n "$CPP" && test -d "$CPP"; then
3429  CPP=
3430fi
3431if test -z "$CPP"; then
3432  if test "${ac_cv_prog_CPP+set}" = set; then
3433  echo $ECHO_N "(cached) $ECHO_C" >&6
3434else
3435      # Double quotes because CPP needs to be expanded
3436    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3437    do
3438      ac_preproc_ok=false
3439for ac_c_preproc_warn_flag in '' yes
3440do
3441  # Use a header file that comes with gcc, so configuring glibc
3442  # with a fresh cross-compiler works.
3443  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3444  # <limits.h> exists even on freestanding compilers.
3445  # On the NeXT, cc -E runs the code through the compiler's parser,
3446  # not just through cpp. "Syntax error" is here to catch this case.
3447  cat >conftest.$ac_ext <<_ACEOF
3448/* confdefs.h.  */
3449_ACEOF
3450cat confdefs.h >>conftest.$ac_ext
3451cat >>conftest.$ac_ext <<_ACEOF
3452/* end confdefs.h.  */
3453#ifdef __STDC__
3454# include <limits.h>
3455#else
3456# include <assert.h>
3457#endif
3458		     Syntax error
3459_ACEOF
3460if { (ac_try="$ac_cpp conftest.$ac_ext"
3461case "(($ac_try" in
3462  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3463  *) ac_try_echo=$ac_try;;
3464esac
3465eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3466  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3467  ac_status=$?
3468  grep -v '^ *+' conftest.er1 >conftest.err
3469  rm -f conftest.er1
3470  cat conftest.err >&5
3471  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3472  (exit $ac_status); } >/dev/null && {
3473	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3474	 test ! -s conftest.err
3475       }; then
3476  :
3477else
3478  echo "$as_me: failed program was:" >&5
3479sed 's/^/| /' conftest.$ac_ext >&5
3480
3481  # Broken: fails on valid input.
3482continue
3483fi
3484
3485rm -f conftest.err conftest.$ac_ext
3486
3487  # OK, works on sane cases.  Now check whether nonexistent headers
3488  # can be detected and how.
3489  cat >conftest.$ac_ext <<_ACEOF
3490/* confdefs.h.  */
3491_ACEOF
3492cat confdefs.h >>conftest.$ac_ext
3493cat >>conftest.$ac_ext <<_ACEOF
3494/* end confdefs.h.  */
3495#include <ac_nonexistent.h>
3496_ACEOF
3497if { (ac_try="$ac_cpp conftest.$ac_ext"
3498case "(($ac_try" in
3499  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3500  *) ac_try_echo=$ac_try;;
3501esac
3502eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3503  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3504  ac_status=$?
3505  grep -v '^ *+' conftest.er1 >conftest.err
3506  rm -f conftest.er1
3507  cat conftest.err >&5
3508  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3509  (exit $ac_status); } >/dev/null && {
3510	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3511	 test ! -s conftest.err
3512       }; then
3513  # Broken: success on invalid input.
3514continue
3515else
3516  echo "$as_me: failed program was:" >&5
3517sed 's/^/| /' conftest.$ac_ext >&5
3518
3519  # Passes both tests.
3520ac_preproc_ok=:
3521break
3522fi
3523
3524rm -f conftest.err conftest.$ac_ext
3525
3526done
3527# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3528rm -f conftest.err conftest.$ac_ext
3529if $ac_preproc_ok; then
3530  break
3531fi
3532
3533    done
3534    ac_cv_prog_CPP=$CPP
3535
3536fi
3537  CPP=$ac_cv_prog_CPP
3538else
3539  ac_cv_prog_CPP=$CPP
3540fi
3541{ echo "$as_me:$LINENO: result: $CPP" >&5
3542echo "${ECHO_T}$CPP" >&6; }
3543ac_preproc_ok=false
3544for ac_c_preproc_warn_flag in '' yes
3545do
3546  # Use a header file that comes with gcc, so configuring glibc
3547  # with a fresh cross-compiler works.
3548  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3549  # <limits.h> exists even on freestanding compilers.
3550  # On the NeXT, cc -E runs the code through the compiler's parser,
3551  # not just through cpp. "Syntax error" is here to catch this case.
3552  cat >conftest.$ac_ext <<_ACEOF
3553/* confdefs.h.  */
3554_ACEOF
3555cat confdefs.h >>conftest.$ac_ext
3556cat >>conftest.$ac_ext <<_ACEOF
3557/* end confdefs.h.  */
3558#ifdef __STDC__
3559# include <limits.h>
3560#else
3561# include <assert.h>
3562#endif
3563		     Syntax error
3564_ACEOF
3565if { (ac_try="$ac_cpp conftest.$ac_ext"
3566case "(($ac_try" in
3567  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3568  *) ac_try_echo=$ac_try;;
3569esac
3570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3571  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3572  ac_status=$?
3573  grep -v '^ *+' conftest.er1 >conftest.err
3574  rm -f conftest.er1
3575  cat conftest.err >&5
3576  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3577  (exit $ac_status); } >/dev/null && {
3578	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3579	 test ! -s conftest.err
3580       }; then
3581  :
3582else
3583  echo "$as_me: failed program was:" >&5
3584sed 's/^/| /' conftest.$ac_ext >&5
3585
3586  # Broken: fails on valid input.
3587continue
3588fi
3589
3590rm -f conftest.err conftest.$ac_ext
3591
3592  # OK, works on sane cases.  Now check whether nonexistent headers
3593  # can be detected and how.
3594  cat >conftest.$ac_ext <<_ACEOF
3595/* confdefs.h.  */
3596_ACEOF
3597cat confdefs.h >>conftest.$ac_ext
3598cat >>conftest.$ac_ext <<_ACEOF
3599/* end confdefs.h.  */
3600#include <ac_nonexistent.h>
3601_ACEOF
3602if { (ac_try="$ac_cpp conftest.$ac_ext"
3603case "(($ac_try" in
3604  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3605  *) ac_try_echo=$ac_try;;
3606esac
3607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3608  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3609  ac_status=$?
3610  grep -v '^ *+' conftest.er1 >conftest.err
3611  rm -f conftest.er1
3612  cat conftest.err >&5
3613  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3614  (exit $ac_status); } >/dev/null && {
3615	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3616	 test ! -s conftest.err
3617       }; then
3618  # Broken: success on invalid input.
3619continue
3620else
3621  echo "$as_me: failed program was:" >&5
3622sed 's/^/| /' conftest.$ac_ext >&5
3623
3624  # Passes both tests.
3625ac_preproc_ok=:
3626break
3627fi
3628
3629rm -f conftest.err conftest.$ac_ext
3630
3631done
3632# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3633rm -f conftest.err conftest.$ac_ext
3634if $ac_preproc_ok; then
3635  :
3636else
3637  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3638See \`config.log' for more details." >&5
3639echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3640See \`config.log' for more details." >&2;}
3641   { (exit 1); exit 1; }; }
3642fi
3643
3644ac_ext=c
3645ac_cpp='$CPP $CPPFLAGS'
3646ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3647ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3648ac_compiler_gnu=$ac_cv_c_compiler_gnu
3649
3650
3651    # Find a good install program.  We prefer a C program (faster),
3652# so one script is as good as another.  But avoid the broken or
3653# incompatible versions:
3654# SysV /etc/install, /usr/sbin/install
3655# SunOS /usr/etc/install
3656# IRIX /sbin/install
3657# AIX /bin/install
3658# AmigaOS /C/install, which installs bootblocks on floppy discs
3659# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3660# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3661# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3662# OS/2's system install, which has a completely different semantic
3663# ./install, which can be erroneously created by make from ./install.sh.
3664{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3665echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
3666if test -z "$INSTALL"; then
3667if test "${ac_cv_path_install+set}" = set; then
3668  echo $ECHO_N "(cached) $ECHO_C" >&6
3669else
3670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3671for as_dir in $PATH
3672do
3673  IFS=$as_save_IFS
3674  test -z "$as_dir" && as_dir=.
3675  # Account for people who put trailing slashes in PATH elements.
3676case $as_dir/ in
3677  ./ | .// | /cC/* | \
3678  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3679  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
3680  /usr/ucb/* ) ;;
3681  *)
3682    # OSF1 and SCO ODT 3.0 have their own names for install.
3683    # Don't use installbsd from OSF since it installs stuff as root
3684    # by default.
3685    for ac_prog in ginstall scoinst install; do
3686      for ac_exec_ext in '' $ac_executable_extensions; do
3687	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3688	  if test $ac_prog = install &&
3689	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3690	    # AIX install.  It has an incompatible calling convention.
3691	    :
3692	  elif test $ac_prog = install &&
3693	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3694	    # program-specific install script used by HP pwplus--don't use.
3695	    :
3696	  else
3697	    ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3698	    break 3
3699	  fi
3700	fi
3701      done
3702    done
3703    ;;
3704esac
3705done
3706IFS=$as_save_IFS
3707
3708
3709fi
3710  if test "${ac_cv_path_install+set}" = set; then
3711    INSTALL=$ac_cv_path_install
3712  else
3713    # As a last resort, use the slow shell script.  Don't cache a
3714    # value for INSTALL within a source directory, because that will
3715    # break other packages using the cache if that directory is
3716    # removed, or if the value is a relative name.
3717    INSTALL=$ac_install_sh
3718  fi
3719fi
3720{ echo "$as_me:$LINENO: result: $INSTALL" >&5
3721echo "${ECHO_T}$INSTALL" >&6; }
3722
3723# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3724# It thinks the first close brace ends the variable substitution.
3725test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3726
3727test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3728
3729test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3730
3731
3732    #--------------------------------------------------------------------
3733    # Checks to see if the make program sets the $MAKE variable.
3734    #--------------------------------------------------------------------
3735
3736    { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3737echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
3738set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3739if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
3740  echo $ECHO_N "(cached) $ECHO_C" >&6
3741else
3742  cat >conftest.make <<\_ACEOF
3743SHELL = /bin/sh
3744all:
3745	@echo '@@@%%%=$(MAKE)=@@@%%%'
3746_ACEOF
3747# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3748case `${MAKE-make} -f conftest.make 2>/dev/null` in
3749  *@@@%%%=?*=@@@%%%*)
3750    eval ac_cv_prog_make_${ac_make}_set=yes;;
3751  *)
3752    eval ac_cv_prog_make_${ac_make}_set=no;;
3753esac
3754rm -f conftest.make
3755fi
3756if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3757  { echo "$as_me:$LINENO: result: yes" >&5
3758echo "${ECHO_T}yes" >&6; }
3759  SET_MAKE=
3760else
3761  { echo "$as_me:$LINENO: result: no" >&5
3762echo "${ECHO_T}no" >&6; }
3763  SET_MAKE="MAKE=${MAKE-make}"
3764fi
3765
3766
3767    #--------------------------------------------------------------------
3768    # Find ranlib
3769    #--------------------------------------------------------------------
3770
3771    if test -n "$ac_tool_prefix"; then
3772  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3773set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3774{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3775echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3776if test "${ac_cv_prog_RANLIB+set}" = set; then
3777  echo $ECHO_N "(cached) $ECHO_C" >&6
3778else
3779  if test -n "$RANLIB"; then
3780  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3781else
3782as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3783for as_dir in $PATH
3784do
3785  IFS=$as_save_IFS
3786  test -z "$as_dir" && as_dir=.
3787  for ac_exec_ext in '' $ac_executable_extensions; do
3788  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3789    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3790    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3791    break 2
3792  fi
3793done
3794done
3795IFS=$as_save_IFS
3796
3797fi
3798fi
3799RANLIB=$ac_cv_prog_RANLIB
3800if test -n "$RANLIB"; then
3801  { echo "$as_me:$LINENO: result: $RANLIB" >&5
3802echo "${ECHO_T}$RANLIB" >&6; }
3803else
3804  { echo "$as_me:$LINENO: result: no" >&5
3805echo "${ECHO_T}no" >&6; }
3806fi
3807
3808
3809fi
3810if test -z "$ac_cv_prog_RANLIB"; then
3811  ac_ct_RANLIB=$RANLIB
3812  # Extract the first word of "ranlib", so it can be a program name with args.
3813set dummy ranlib; ac_word=$2
3814{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3815echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3816if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3817  echo $ECHO_N "(cached) $ECHO_C" >&6
3818else
3819  if test -n "$ac_ct_RANLIB"; then
3820  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3821else
3822as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3823for as_dir in $PATH
3824do
3825  IFS=$as_save_IFS
3826  test -z "$as_dir" && as_dir=.
3827  for ac_exec_ext in '' $ac_executable_extensions; do
3828  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3829    ac_cv_prog_ac_ct_RANLIB="ranlib"
3830    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3831    break 2
3832  fi
3833done
3834done
3835IFS=$as_save_IFS
3836
3837fi
3838fi
3839ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3840if test -n "$ac_ct_RANLIB"; then
3841  { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3842echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
3843else
3844  { echo "$as_me:$LINENO: result: no" >&5
3845echo "${ECHO_T}no" >&6; }
3846fi
3847
3848  if test "x$ac_ct_RANLIB" = x; then
3849    RANLIB=":"
3850  else
3851    case $cross_compiling:$ac_tool_warned in
3852yes:)
3853{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3854whose name does not start with the host triplet.  If you think this
3855configuration is useful to you, please write to autoconf@gnu.org." >&5
3856echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3857whose name does not start with the host triplet.  If you think this
3858configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3859ac_tool_warned=yes ;;
3860esac
3861    RANLIB=$ac_ct_RANLIB
3862  fi
3863else
3864  RANLIB="$ac_cv_prog_RANLIB"
3865fi
3866
3867
3868    #--------------------------------------------------------------------
3869    # Determines the correct binary file extension (.o, .obj, .exe etc.)
3870    #--------------------------------------------------------------------
3871
3872
3873
3874
3875
3876
3877{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3878echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3879if test "${ac_cv_path_GREP+set}" = set; then
3880  echo $ECHO_N "(cached) $ECHO_C" >&6
3881else
3882  # Extract the first word of "grep ggrep" to use in msg output
3883if test -z "$GREP"; then
3884set dummy grep ggrep; ac_prog_name=$2
3885if test "${ac_cv_path_GREP+set}" = set; then
3886  echo $ECHO_N "(cached) $ECHO_C" >&6
3887else
3888  ac_path_GREP_found=false
3889# Loop through the user's path and test for each of PROGNAME-LIST
3890as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3891for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3892do
3893  IFS=$as_save_IFS
3894  test -z "$as_dir" && as_dir=.
3895  for ac_prog in grep ggrep; do
3896  for ac_exec_ext in '' $ac_executable_extensions; do
3897    ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3898    { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3899    # Check for GNU ac_path_GREP and select it if it is found.
3900  # Check for GNU $ac_path_GREP
3901case `"$ac_path_GREP" --version 2>&1` in
3902*GNU*)
3903  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3904*)
3905  ac_count=0
3906  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3907  while :
3908  do
3909    cat "conftest.in" "conftest.in" >"conftest.tmp"
3910    mv "conftest.tmp" "conftest.in"
3911    cp "conftest.in" "conftest.nl"
3912    echo 'GREP' >> "conftest.nl"
3913    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3914    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3915    ac_count=`expr $ac_count + 1`
3916    if test $ac_count -gt ${ac_path_GREP_max-0}; then
3917      # Best one so far, save it but keep looking for a better one
3918      ac_cv_path_GREP="$ac_path_GREP"
3919      ac_path_GREP_max=$ac_count
3920    fi
3921    # 10*(2^10) chars as input seems more than enough
3922    test $ac_count -gt 10 && break
3923  done
3924  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3925esac
3926
3927
3928    $ac_path_GREP_found && break 3
3929  done
3930done
3931
3932done
3933IFS=$as_save_IFS
3934
3935
3936fi
3937
3938GREP="$ac_cv_path_GREP"
3939if test -z "$GREP"; then
3940  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3941echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3942   { (exit 1); exit 1; }; }
3943fi
3944
3945else
3946  ac_cv_path_GREP=$GREP
3947fi
3948
3949
3950fi
3951{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3952echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3953 GREP="$ac_cv_path_GREP"
3954
3955
3956{ echo "$as_me:$LINENO: checking for egrep" >&5
3957echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3958if test "${ac_cv_path_EGREP+set}" = set; then
3959  echo $ECHO_N "(cached) $ECHO_C" >&6
3960else
3961  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3962   then ac_cv_path_EGREP="$GREP -E"
3963   else
3964     # Extract the first word of "egrep" to use in msg output
3965if test -z "$EGREP"; then
3966set dummy egrep; ac_prog_name=$2
3967if test "${ac_cv_path_EGREP+set}" = set; then
3968  echo $ECHO_N "(cached) $ECHO_C" >&6
3969else
3970  ac_path_EGREP_found=false
3971# Loop through the user's path and test for each of PROGNAME-LIST
3972as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3973for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3974do
3975  IFS=$as_save_IFS
3976  test -z "$as_dir" && as_dir=.
3977  for ac_prog in egrep; do
3978  for ac_exec_ext in '' $ac_executable_extensions; do
3979    ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3980    { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3981    # Check for GNU ac_path_EGREP and select it if it is found.
3982  # Check for GNU $ac_path_EGREP
3983case `"$ac_path_EGREP" --version 2>&1` in
3984*GNU*)
3985  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3986*)
3987  ac_count=0
3988  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3989  while :
3990  do
3991    cat "conftest.in" "conftest.in" >"conftest.tmp"
3992    mv "conftest.tmp" "conftest.in"
3993    cp "conftest.in" "conftest.nl"
3994    echo 'EGREP' >> "conftest.nl"
3995    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3996    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3997    ac_count=`expr $ac_count + 1`
3998    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3999      # Best one so far, save it but keep looking for a better one
4000      ac_cv_path_EGREP="$ac_path_EGREP"
4001      ac_path_EGREP_max=$ac_count
4002    fi
4003    # 10*(2^10) chars as input seems more than enough
4004    test $ac_count -gt 10 && break
4005  done
4006  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4007esac
4008
4009
4010    $ac_path_EGREP_found && break 3
4011  done
4012done
4013
4014done
4015IFS=$as_save_IFS
4016
4017
4018fi
4019
4020EGREP="$ac_cv_path_EGREP"
4021if test -z "$EGREP"; then
4022  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4023echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4024   { (exit 1); exit 1; }; }
4025fi
4026
4027else
4028  ac_cv_path_EGREP=$EGREP
4029fi
4030
4031
4032   fi
4033fi
4034{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4035echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
4036 EGREP="$ac_cv_path_EGREP"
4037
4038
4039{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4040echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
4041if test "${ac_cv_header_stdc+set}" = set; then
4042  echo $ECHO_N "(cached) $ECHO_C" >&6
4043else
4044  cat >conftest.$ac_ext <<_ACEOF
4045/* confdefs.h.  */
4046_ACEOF
4047cat confdefs.h >>conftest.$ac_ext
4048cat >>conftest.$ac_ext <<_ACEOF
4049/* end confdefs.h.  */
4050#include <stdlib.h>
4051#include <stdarg.h>
4052#include <string.h>
4053#include <float.h>
4054
4055int
4056main ()
4057{
4058
4059  ;
4060  return 0;
4061}
4062_ACEOF
4063rm -f conftest.$ac_objext
4064if { (ac_try="$ac_compile"
4065case "(($ac_try" in
4066  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4067  *) ac_try_echo=$ac_try;;
4068esac
4069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4070  (eval "$ac_compile") 2>conftest.er1
4071  ac_status=$?
4072  grep -v '^ *+' conftest.er1 >conftest.err
4073  rm -f conftest.er1
4074  cat conftest.err >&5
4075  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4076  (exit $ac_status); } && {
4077	 test -z "$ac_c_werror_flag" ||
4078	 test ! -s conftest.err
4079       } && test -s conftest.$ac_objext; then
4080  ac_cv_header_stdc=yes
4081else
4082  echo "$as_me: failed program was:" >&5
4083sed 's/^/| /' conftest.$ac_ext >&5
4084
4085	ac_cv_header_stdc=no
4086fi
4087
4088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4089
4090if test $ac_cv_header_stdc = yes; then
4091  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4092  cat >conftest.$ac_ext <<_ACEOF
4093/* confdefs.h.  */
4094_ACEOF
4095cat confdefs.h >>conftest.$ac_ext
4096cat >>conftest.$ac_ext <<_ACEOF
4097/* end confdefs.h.  */
4098#include <string.h>
4099
4100_ACEOF
4101if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4102  $EGREP "memchr" >/dev/null 2>&1; then
4103  :
4104else
4105  ac_cv_header_stdc=no
4106fi
4107rm -f -r conftest*
4108
4109fi
4110
4111if test $ac_cv_header_stdc = yes; then
4112  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4113  cat >conftest.$ac_ext <<_ACEOF
4114/* confdefs.h.  */
4115_ACEOF
4116cat confdefs.h >>conftest.$ac_ext
4117cat >>conftest.$ac_ext <<_ACEOF
4118/* end confdefs.h.  */
4119#include <stdlib.h>
4120
4121_ACEOF
4122if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4123  $EGREP "free" >/dev/null 2>&1; then
4124  :
4125else
4126  ac_cv_header_stdc=no
4127fi
4128rm -f -r conftest*
4129
4130fi
4131
4132if test $ac_cv_header_stdc = yes; then
4133  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4134  if test "$cross_compiling" = yes; then
4135  :
4136else
4137  cat >conftest.$ac_ext <<_ACEOF
4138/* confdefs.h.  */
4139_ACEOF
4140cat confdefs.h >>conftest.$ac_ext
4141cat >>conftest.$ac_ext <<_ACEOF
4142/* end confdefs.h.  */
4143#include <ctype.h>
4144#include <stdlib.h>
4145#if ((' ' & 0x0FF) == 0x020)
4146# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4147# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4148#else
4149# define ISLOWER(c) \
4150		   (('a' <= (c) && (c) <= 'i') \
4151		     || ('j' <= (c) && (c) <= 'r') \
4152		     || ('s' <= (c) && (c) <= 'z'))
4153# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4154#endif
4155
4156#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4157int
4158main ()
4159{
4160  int i;
4161  for (i = 0; i < 256; i++)
4162    if (XOR (islower (i), ISLOWER (i))
4163	|| toupper (i) != TOUPPER (i))
4164      return 2;
4165  return 0;
4166}
4167_ACEOF
4168rm -f conftest$ac_exeext
4169if { (ac_try="$ac_link"
4170case "(($ac_try" in
4171  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4172  *) ac_try_echo=$ac_try;;
4173esac
4174eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4175  (eval "$ac_link") 2>&5
4176  ac_status=$?
4177  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4178  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4179  { (case "(($ac_try" in
4180  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4181  *) ac_try_echo=$ac_try;;
4182esac
4183eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4184  (eval "$ac_try") 2>&5
4185  ac_status=$?
4186  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4187  (exit $ac_status); }; }; then
4188  :
4189else
4190  echo "$as_me: program exited with status $ac_status" >&5
4191echo "$as_me: failed program was:" >&5
4192sed 's/^/| /' conftest.$ac_ext >&5
4193
4194( exit $ac_status )
4195ac_cv_header_stdc=no
4196fi
4197rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4198fi
4199
4200
4201fi
4202fi
4203{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4204echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
4205if test $ac_cv_header_stdc = yes; then
4206
4207cat >>confdefs.h <<\_ACEOF
4208#define STDC_HEADERS 1
4209_ACEOF
4210
4211fi
4212
4213# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4224		  inttypes.h stdint.h unistd.h
4225do
4226as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4227{ echo "$as_me:$LINENO: checking for $ac_header" >&5
4228echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4229if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4230  echo $ECHO_N "(cached) $ECHO_C" >&6
4231else
4232  cat >conftest.$ac_ext <<_ACEOF
4233/* confdefs.h.  */
4234_ACEOF
4235cat confdefs.h >>conftest.$ac_ext
4236cat >>conftest.$ac_ext <<_ACEOF
4237/* end confdefs.h.  */
4238$ac_includes_default
4239
4240#include <$ac_header>
4241_ACEOF
4242rm -f conftest.$ac_objext
4243if { (ac_try="$ac_compile"
4244case "(($ac_try" in
4245  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4246  *) ac_try_echo=$ac_try;;
4247esac
4248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4249  (eval "$ac_compile") 2>conftest.er1
4250  ac_status=$?
4251  grep -v '^ *+' conftest.er1 >conftest.err
4252  rm -f conftest.er1
4253  cat conftest.err >&5
4254  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4255  (exit $ac_status); } && {
4256	 test -z "$ac_c_werror_flag" ||
4257	 test ! -s conftest.err
4258       } && test -s conftest.$ac_objext; then
4259  eval "$as_ac_Header=yes"
4260else
4261  echo "$as_me: failed program was:" >&5
4262sed 's/^/| /' conftest.$ac_ext >&5
4263
4264	eval "$as_ac_Header=no"
4265fi
4266
4267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4268fi
4269ac_res=`eval echo '${'$as_ac_Header'}'`
4270	       { echo "$as_me:$LINENO: result: $ac_res" >&5
4271echo "${ECHO_T}$ac_res" >&6; }
4272if test `eval echo '${'$as_ac_Header'}'` = yes; then
4273  cat >>confdefs.h <<_ACEOF
4274#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4275_ACEOF
4276
4277fi
4278
4279done
4280
4281
4282
4283    # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here.
4284
4285
4286    #------------------------------------------------------------------------
4287    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
4288    # It makes compiling go faster.  (This is only a performance feature.)
4289    #------------------------------------------------------------------------
4290
4291    if test -z "$no_pipe" -a -n "$GCC"; then
4292	{ echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5
4293echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6; }
4294if test "${tcl_cv_cc_pipe+set}" = set; then
4295  echo $ECHO_N "(cached) $ECHO_C" >&6
4296else
4297
4298	    hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
4299	    cat >conftest.$ac_ext <<_ACEOF
4300/* confdefs.h.  */
4301_ACEOF
4302cat confdefs.h >>conftest.$ac_ext
4303cat >>conftest.$ac_ext <<_ACEOF
4304/* end confdefs.h.  */
4305
4306int
4307main ()
4308{
4309
4310  ;
4311  return 0;
4312}
4313_ACEOF
4314rm -f conftest.$ac_objext
4315if { (ac_try="$ac_compile"
4316case "(($ac_try" in
4317  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4318  *) ac_try_echo=$ac_try;;
4319esac
4320eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4321  (eval "$ac_compile") 2>conftest.er1
4322  ac_status=$?
4323  grep -v '^ *+' conftest.er1 >conftest.err
4324  rm -f conftest.er1
4325  cat conftest.err >&5
4326  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4327  (exit $ac_status); } && {
4328	 test -z "$ac_c_werror_flag" ||
4329	 test ! -s conftest.err
4330       } && test -s conftest.$ac_objext; then
4331  tcl_cv_cc_pipe=yes
4332else
4333  echo "$as_me: failed program was:" >&5
4334sed 's/^/| /' conftest.$ac_ext >&5
4335
4336	tcl_cv_cc_pipe=no
4337fi
4338
4339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4340	    CFLAGS=$hold_cflags
4341fi
4342{ echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5
4343echo "${ECHO_T}$tcl_cv_cc_pipe" >&6; }
4344	if test $tcl_cv_cc_pipe = yes; then
4345	    CFLAGS="$CFLAGS -pipe"
4346	fi
4347    fi
4348
4349    #--------------------------------------------------------------------
4350    # Common compiler flag setup
4351    #--------------------------------------------------------------------
4352
4353    { echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
4354echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
4355if test "${ac_cv_c_bigendian+set}" = set; then
4356  echo $ECHO_N "(cached) $ECHO_C" >&6
4357else
4358  # See if sys/param.h defines the BYTE_ORDER macro.
4359cat >conftest.$ac_ext <<_ACEOF
4360/* confdefs.h.  */
4361_ACEOF
4362cat confdefs.h >>conftest.$ac_ext
4363cat >>conftest.$ac_ext <<_ACEOF
4364/* end confdefs.h.  */
4365#include <sys/types.h>
4366#include <sys/param.h>
4367
4368int
4369main ()
4370{
4371#if  ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
4372	&& BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
4373 bogus endian macros
4374#endif
4375
4376  ;
4377  return 0;
4378}
4379_ACEOF
4380rm -f conftest.$ac_objext
4381if { (ac_try="$ac_compile"
4382case "(($ac_try" in
4383  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4384  *) ac_try_echo=$ac_try;;
4385esac
4386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4387  (eval "$ac_compile") 2>conftest.er1
4388  ac_status=$?
4389  grep -v '^ *+' conftest.er1 >conftest.err
4390  rm -f conftest.er1
4391  cat conftest.err >&5
4392  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4393  (exit $ac_status); } && {
4394	 test -z "$ac_c_werror_flag" ||
4395	 test ! -s conftest.err
4396       } && test -s conftest.$ac_objext; then
4397  # It does; now see whether it defined to BIG_ENDIAN or not.
4398cat >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#include <sys/types.h>
4405#include <sys/param.h>
4406
4407int
4408main ()
4409{
4410#if BYTE_ORDER != BIG_ENDIAN
4411 not big endian
4412#endif
4413
4414  ;
4415  return 0;
4416}
4417_ACEOF
4418rm -f conftest.$ac_objext
4419if { (ac_try="$ac_compile"
4420case "(($ac_try" in
4421  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4422  *) ac_try_echo=$ac_try;;
4423esac
4424eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4425  (eval "$ac_compile") 2>conftest.er1
4426  ac_status=$?
4427  grep -v '^ *+' conftest.er1 >conftest.err
4428  rm -f conftest.er1
4429  cat conftest.err >&5
4430  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4431  (exit $ac_status); } && {
4432	 test -z "$ac_c_werror_flag" ||
4433	 test ! -s conftest.err
4434       } && test -s conftest.$ac_objext; then
4435  ac_cv_c_bigendian=yes
4436else
4437  echo "$as_me: failed program was:" >&5
4438sed 's/^/| /' conftest.$ac_ext >&5
4439
4440	ac_cv_c_bigendian=no
4441fi
4442
4443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4444else
4445  echo "$as_me: failed program was:" >&5
4446sed 's/^/| /' conftest.$ac_ext >&5
4447
4448	# It does not; compile a test program.
4449if test "$cross_compiling" = yes; then
4450  # try to guess the endianness by grepping values into an object file
4451  ac_cv_c_bigendian=unknown
4452  cat >conftest.$ac_ext <<_ACEOF
4453/* confdefs.h.  */
4454_ACEOF
4455cat confdefs.h >>conftest.$ac_ext
4456cat >>conftest.$ac_ext <<_ACEOF
4457/* end confdefs.h.  */
4458short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
4459short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
4460void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
4461short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
4462short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
4463void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
4464int
4465main ()
4466{
4467 _ascii (); _ebcdic ();
4468  ;
4469  return 0;
4470}
4471_ACEOF
4472rm -f conftest.$ac_objext
4473if { (ac_try="$ac_compile"
4474case "(($ac_try" in
4475  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4476  *) ac_try_echo=$ac_try;;
4477esac
4478eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4479  (eval "$ac_compile") 2>conftest.er1
4480  ac_status=$?
4481  grep -v '^ *+' conftest.er1 >conftest.err
4482  rm -f conftest.er1
4483  cat conftest.err >&5
4484  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4485  (exit $ac_status); } && {
4486	 test -z "$ac_c_werror_flag" ||
4487	 test ! -s conftest.err
4488       } && test -s conftest.$ac_objext; then
4489  if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
4490  ac_cv_c_bigendian=yes
4491fi
4492if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
4493  if test "$ac_cv_c_bigendian" = unknown; then
4494    ac_cv_c_bigendian=no
4495  else
4496    # finding both strings is unlikely to happen, but who knows?
4497    ac_cv_c_bigendian=unknown
4498  fi
4499fi
4500else
4501  echo "$as_me: failed program was:" >&5
4502sed 's/^/| /' conftest.$ac_ext >&5
4503
4504
4505fi
4506
4507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4508else
4509  cat >conftest.$ac_ext <<_ACEOF
4510/* confdefs.h.  */
4511_ACEOF
4512cat confdefs.h >>conftest.$ac_ext
4513cat >>conftest.$ac_ext <<_ACEOF
4514/* end confdefs.h.  */
4515$ac_includes_default
4516int
4517main ()
4518{
4519
4520  /* Are we little or big endian?  From Harbison&Steele.  */
4521  union
4522  {
4523    long int l;
4524    char c[sizeof (long int)];
4525  } u;
4526  u.l = 1;
4527  return u.c[sizeof (long int) - 1] == 1;
4528
4529  ;
4530  return 0;
4531}
4532_ACEOF
4533rm -f conftest$ac_exeext
4534if { (ac_try="$ac_link"
4535case "(($ac_try" in
4536  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4537  *) ac_try_echo=$ac_try;;
4538esac
4539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4540  (eval "$ac_link") 2>&5
4541  ac_status=$?
4542  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4543  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4544  { (case "(($ac_try" in
4545  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4546  *) ac_try_echo=$ac_try;;
4547esac
4548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4549  (eval "$ac_try") 2>&5
4550  ac_status=$?
4551  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4552  (exit $ac_status); }; }; then
4553  ac_cv_c_bigendian=no
4554else
4555  echo "$as_me: program exited with status $ac_status" >&5
4556echo "$as_me: failed program was:" >&5
4557sed 's/^/| /' conftest.$ac_ext >&5
4558
4559( exit $ac_status )
4560ac_cv_c_bigendian=yes
4561fi
4562rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4563fi
4564
4565
4566fi
4567
4568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4569fi
4570{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
4571echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
4572case $ac_cv_c_bigendian in
4573  yes)
4574
4575cat >>confdefs.h <<\_ACEOF
4576#define WORDS_BIGENDIAN 1
4577_ACEOF
4578 ;;
4579  no)
4580     ;;
4581  *)
4582    { { echo "$as_me:$LINENO: error: unknown endianness
4583presetting ac_cv_c_bigendian=no (or yes) will help" >&5
4584echo "$as_me: error: unknown endianness
4585presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
4586   { (exit 1); exit 1; }; } ;;
4587esac
4588
4589    if test "${TEA_PLATFORM}" = "unix" ; then
4590
4591    #--------------------------------------------------------------------
4592    # On a few very rare systems, all of the libm.a stuff is
4593    # already in libc.a.  Set compiler flags accordingly.
4594    # Also, Linux requires the "ieee" library for math to work
4595    # right (and it must appear before "-lm").
4596    #--------------------------------------------------------------------
4597
4598    { echo "$as_me:$LINENO: checking for sin" >&5
4599echo $ECHO_N "checking for sin... $ECHO_C" >&6; }
4600if test "${ac_cv_func_sin+set}" = set; then
4601  echo $ECHO_N "(cached) $ECHO_C" >&6
4602else
4603  cat >conftest.$ac_ext <<_ACEOF
4604/* confdefs.h.  */
4605_ACEOF
4606cat confdefs.h >>conftest.$ac_ext
4607cat >>conftest.$ac_ext <<_ACEOF
4608/* end confdefs.h.  */
4609/* Define sin to an innocuous variant, in case <limits.h> declares sin.
4610   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4611#define sin innocuous_sin
4612
4613/* System header to define __stub macros and hopefully few prototypes,
4614    which can conflict with char sin (); below.
4615    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4616    <limits.h> exists even on freestanding compilers.  */
4617
4618#ifdef __STDC__
4619# include <limits.h>
4620#else
4621# include <assert.h>
4622#endif
4623
4624#undef sin
4625
4626/* Override any GCC internal prototype to avoid an error.
4627   Use char because int might match the return type of a GCC
4628   builtin and then its argument prototype would still apply.  */
4629#ifdef __cplusplus
4630extern "C"
4631#endif
4632char sin ();
4633/* The GNU C library defines this for functions which it implements
4634    to always fail with ENOSYS.  Some functions are actually named
4635    something starting with __ and the normal name is an alias.  */
4636#if defined __stub_sin || defined __stub___sin
4637choke me
4638#endif
4639
4640int
4641main ()
4642{
4643return sin ();
4644  ;
4645  return 0;
4646}
4647_ACEOF
4648rm -f conftest.$ac_objext conftest$ac_exeext
4649if { (ac_try="$ac_link"
4650case "(($ac_try" in
4651  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4652  *) ac_try_echo=$ac_try;;
4653esac
4654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4655  (eval "$ac_link") 2>conftest.er1
4656  ac_status=$?
4657  grep -v '^ *+' conftest.er1 >conftest.err
4658  rm -f conftest.er1
4659  cat conftest.err >&5
4660  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4661  (exit $ac_status); } && {
4662	 test -z "$ac_c_werror_flag" ||
4663	 test ! -s conftest.err
4664       } && test -s conftest$ac_exeext &&
4665       $as_test_x conftest$ac_exeext; then
4666  ac_cv_func_sin=yes
4667else
4668  echo "$as_me: failed program was:" >&5
4669sed 's/^/| /' conftest.$ac_ext >&5
4670
4671	ac_cv_func_sin=no
4672fi
4673
4674rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4675      conftest$ac_exeext conftest.$ac_ext
4676fi
4677{ echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5
4678echo "${ECHO_T}$ac_cv_func_sin" >&6; }
4679if test $ac_cv_func_sin = yes; then
4680  MATH_LIBS=""
4681else
4682  MATH_LIBS="-lm"
4683fi
4684
4685    { echo "$as_me:$LINENO: checking for main in -lieee" >&5
4686echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6; }
4687if test "${ac_cv_lib_ieee_main+set}" = set; then
4688  echo $ECHO_N "(cached) $ECHO_C" >&6
4689else
4690  ac_check_lib_save_LIBS=$LIBS
4691LIBS="-lieee  $LIBS"
4692cat >conftest.$ac_ext <<_ACEOF
4693/* confdefs.h.  */
4694_ACEOF
4695cat confdefs.h >>conftest.$ac_ext
4696cat >>conftest.$ac_ext <<_ACEOF
4697/* end confdefs.h.  */
4698
4699
4700int
4701main ()
4702{
4703return main ();
4704  ;
4705  return 0;
4706}
4707_ACEOF
4708rm -f conftest.$ac_objext conftest$ac_exeext
4709if { (ac_try="$ac_link"
4710case "(($ac_try" in
4711  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4712  *) ac_try_echo=$ac_try;;
4713esac
4714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4715  (eval "$ac_link") 2>conftest.er1
4716  ac_status=$?
4717  grep -v '^ *+' conftest.er1 >conftest.err
4718  rm -f conftest.er1
4719  cat conftest.err >&5
4720  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4721  (exit $ac_status); } && {
4722	 test -z "$ac_c_werror_flag" ||
4723	 test ! -s conftest.err
4724       } && test -s conftest$ac_exeext &&
4725       $as_test_x conftest$ac_exeext; then
4726  ac_cv_lib_ieee_main=yes
4727else
4728  echo "$as_me: failed program was:" >&5
4729sed 's/^/| /' conftest.$ac_ext >&5
4730
4731	ac_cv_lib_ieee_main=no
4732fi
4733
4734rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4735      conftest$ac_exeext conftest.$ac_ext
4736LIBS=$ac_check_lib_save_LIBS
4737fi
4738{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5
4739echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6; }
4740if test $ac_cv_lib_ieee_main = yes; then
4741  MATH_LIBS="-lieee $MATH_LIBS"
4742fi
4743
4744
4745    #--------------------------------------------------------------------
4746    # Interactive UNIX requires -linet instead of -lsocket, plus it
4747    # needs net/errno.h to define the socket-related error codes.
4748    #--------------------------------------------------------------------
4749
4750    { echo "$as_me:$LINENO: checking for main in -linet" >&5
4751echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6; }
4752if test "${ac_cv_lib_inet_main+set}" = set; then
4753  echo $ECHO_N "(cached) $ECHO_C" >&6
4754else
4755  ac_check_lib_save_LIBS=$LIBS
4756LIBS="-linet  $LIBS"
4757cat >conftest.$ac_ext <<_ACEOF
4758/* confdefs.h.  */
4759_ACEOF
4760cat confdefs.h >>conftest.$ac_ext
4761cat >>conftest.$ac_ext <<_ACEOF
4762/* end confdefs.h.  */
4763
4764
4765int
4766main ()
4767{
4768return main ();
4769  ;
4770  return 0;
4771}
4772_ACEOF
4773rm -f conftest.$ac_objext conftest$ac_exeext
4774if { (ac_try="$ac_link"
4775case "(($ac_try" in
4776  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4777  *) ac_try_echo=$ac_try;;
4778esac
4779eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4780  (eval "$ac_link") 2>conftest.er1
4781  ac_status=$?
4782  grep -v '^ *+' conftest.er1 >conftest.err
4783  rm -f conftest.er1
4784  cat conftest.err >&5
4785  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4786  (exit $ac_status); } && {
4787	 test -z "$ac_c_werror_flag" ||
4788	 test ! -s conftest.err
4789       } && test -s conftest$ac_exeext &&
4790       $as_test_x conftest$ac_exeext; then
4791  ac_cv_lib_inet_main=yes
4792else
4793  echo "$as_me: failed program was:" >&5
4794sed 's/^/| /' conftest.$ac_ext >&5
4795
4796	ac_cv_lib_inet_main=no
4797fi
4798
4799rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4800      conftest$ac_exeext conftest.$ac_ext
4801LIBS=$ac_check_lib_save_LIBS
4802fi
4803{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5
4804echo "${ECHO_T}$ac_cv_lib_inet_main" >&6; }
4805if test $ac_cv_lib_inet_main = yes; then
4806  LIBS="$LIBS -linet"
4807fi
4808
4809    if test "${ac_cv_header_net_errno_h+set}" = set; then
4810  { echo "$as_me:$LINENO: checking for net/errno.h" >&5
4811echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; }
4812if test "${ac_cv_header_net_errno_h+set}" = set; then
4813  echo $ECHO_N "(cached) $ECHO_C" >&6
4814fi
4815{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
4816echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; }
4817else
4818  # Is the header compilable?
4819{ echo "$as_me:$LINENO: checking net/errno.h usability" >&5
4820echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6; }
4821cat >conftest.$ac_ext <<_ACEOF
4822/* confdefs.h.  */
4823_ACEOF
4824cat confdefs.h >>conftest.$ac_ext
4825cat >>conftest.$ac_ext <<_ACEOF
4826/* end confdefs.h.  */
4827$ac_includes_default
4828#include <net/errno.h>
4829_ACEOF
4830rm -f conftest.$ac_objext
4831if { (ac_try="$ac_compile"
4832case "(($ac_try" in
4833  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4834  *) ac_try_echo=$ac_try;;
4835esac
4836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4837  (eval "$ac_compile") 2>conftest.er1
4838  ac_status=$?
4839  grep -v '^ *+' conftest.er1 >conftest.err
4840  rm -f conftest.er1
4841  cat conftest.err >&5
4842  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4843  (exit $ac_status); } && {
4844	 test -z "$ac_c_werror_flag" ||
4845	 test ! -s conftest.err
4846       } && test -s conftest.$ac_objext; then
4847  ac_header_compiler=yes
4848else
4849  echo "$as_me: failed program was:" >&5
4850sed 's/^/| /' conftest.$ac_ext >&5
4851
4852	ac_header_compiler=no
4853fi
4854
4855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4856{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4857echo "${ECHO_T}$ac_header_compiler" >&6; }
4858
4859# Is the header present?
4860{ echo "$as_me:$LINENO: checking net/errno.h presence" >&5
4861echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6; }
4862cat >conftest.$ac_ext <<_ACEOF
4863/* confdefs.h.  */
4864_ACEOF
4865cat confdefs.h >>conftest.$ac_ext
4866cat >>conftest.$ac_ext <<_ACEOF
4867/* end confdefs.h.  */
4868#include <net/errno.h>
4869_ACEOF
4870if { (ac_try="$ac_cpp conftest.$ac_ext"
4871case "(($ac_try" in
4872  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4873  *) ac_try_echo=$ac_try;;
4874esac
4875eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4876  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4877  ac_status=$?
4878  grep -v '^ *+' conftest.er1 >conftest.err
4879  rm -f conftest.er1
4880  cat conftest.err >&5
4881  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4882  (exit $ac_status); } >/dev/null && {
4883	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4884	 test ! -s conftest.err
4885       }; then
4886  ac_header_preproc=yes
4887else
4888  echo "$as_me: failed program was:" >&5
4889sed 's/^/| /' conftest.$ac_ext >&5
4890
4891  ac_header_preproc=no
4892fi
4893
4894rm -f conftest.err conftest.$ac_ext
4895{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4896echo "${ECHO_T}$ac_header_preproc" >&6; }
4897
4898# So?  What about this header?
4899case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4900  yes:no: )
4901    { echo "$as_me:$LINENO: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
4902echo "$as_me: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4903    { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the compiler's result" >&5
4904echo "$as_me: WARNING: net/errno.h: proceeding with the compiler's result" >&2;}
4905    ac_header_preproc=yes
4906    ;;
4907  no:yes:* )
4908    { echo "$as_me:$LINENO: WARNING: net/errno.h: present but cannot be compiled" >&5
4909echo "$as_me: WARNING: net/errno.h: present but cannot be compiled" >&2;}
4910    { echo "$as_me:$LINENO: WARNING: net/errno.h:     check for missing prerequisite headers?" >&5
4911echo "$as_me: WARNING: net/errno.h:     check for missing prerequisite headers?" >&2;}
4912    { echo "$as_me:$LINENO: WARNING: net/errno.h: see the Autoconf documentation" >&5
4913echo "$as_me: WARNING: net/errno.h: see the Autoconf documentation" >&2;}
4914    { echo "$as_me:$LINENO: WARNING: net/errno.h:     section \"Present But Cannot Be Compiled\"" >&5
4915echo "$as_me: WARNING: net/errno.h:     section \"Present But Cannot Be Compiled\"" >&2;}
4916    { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the preprocessor's result" >&5
4917echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;}
4918    { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5
4919echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;}
4920
4921    ;;
4922esac
4923{ echo "$as_me:$LINENO: checking for net/errno.h" >&5
4924echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; }
4925if test "${ac_cv_header_net_errno_h+set}" = set; then
4926  echo $ECHO_N "(cached) $ECHO_C" >&6
4927else
4928  ac_cv_header_net_errno_h=$ac_header_preproc
4929fi
4930{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
4931echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; }
4932
4933fi
4934if test $ac_cv_header_net_errno_h = yes; then
4935
4936
4937cat >>confdefs.h <<\_ACEOF
4938#define HAVE_NET_ERRNO_H 1
4939_ACEOF
4940
4941fi
4942
4943
4944
4945    #--------------------------------------------------------------------
4946    #	Check for the existence of the -lsocket and -lnsl libraries.
4947    #	The order here is important, so that they end up in the right
4948    #	order in the command line generated by make.  Here are some
4949    #	special considerations:
4950    #	1. Use "connect" and "accept" to check for -lsocket, and
4951    #	   "gethostbyname" to check for -lnsl.
4952    #	2. Use each function name only once:  can't redo a check because
4953    #	   autoconf caches the results of the last check and won't redo it.
4954    #	3. Use -lnsl and -lsocket only if they supply procedures that
4955    #	   aren't already present in the normal libraries.  This is because
4956    #	   IRIX 5.2 has libraries, but they aren't needed and they're
4957    #	   bogus:  they goof up name resolution if used.
4958    #	4. On some SVR4 systems, can't use -lsocket without -lnsl too.
4959    #	   To get around this problem, check for both libraries together
4960    #	   if -lsocket doesn't work by itself.
4961    #--------------------------------------------------------------------
4962
4963    tcl_checkBoth=0
4964    { echo "$as_me:$LINENO: checking for connect" >&5
4965echo $ECHO_N "checking for connect... $ECHO_C" >&6; }
4966if test "${ac_cv_func_connect+set}" = set; then
4967  echo $ECHO_N "(cached) $ECHO_C" >&6
4968else
4969  cat >conftest.$ac_ext <<_ACEOF
4970/* confdefs.h.  */
4971_ACEOF
4972cat confdefs.h >>conftest.$ac_ext
4973cat >>conftest.$ac_ext <<_ACEOF
4974/* end confdefs.h.  */
4975/* Define connect to an innocuous variant, in case <limits.h> declares connect.
4976   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4977#define connect innocuous_connect
4978
4979/* System header to define __stub macros and hopefully few prototypes,
4980    which can conflict with char connect (); below.
4981    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4982    <limits.h> exists even on freestanding compilers.  */
4983
4984#ifdef __STDC__
4985# include <limits.h>
4986#else
4987# include <assert.h>
4988#endif
4989
4990#undef connect
4991
4992/* Override any GCC internal prototype to avoid an error.
4993   Use char because int might match the return type of a GCC
4994   builtin and then its argument prototype would still apply.  */
4995#ifdef __cplusplus
4996extern "C"
4997#endif
4998char connect ();
4999/* The GNU C library defines this for functions which it implements
5000    to always fail with ENOSYS.  Some functions are actually named
5001    something starting with __ and the normal name is an alias.  */
5002#if defined __stub_connect || defined __stub___connect
5003choke me
5004#endif
5005
5006int
5007main ()
5008{
5009return connect ();
5010  ;
5011  return 0;
5012}
5013_ACEOF
5014rm -f conftest.$ac_objext conftest$ac_exeext
5015if { (ac_try="$ac_link"
5016case "(($ac_try" in
5017  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5018  *) ac_try_echo=$ac_try;;
5019esac
5020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5021  (eval "$ac_link") 2>conftest.er1
5022  ac_status=$?
5023  grep -v '^ *+' conftest.er1 >conftest.err
5024  rm -f conftest.er1
5025  cat conftest.err >&5
5026  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5027  (exit $ac_status); } && {
5028	 test -z "$ac_c_werror_flag" ||
5029	 test ! -s conftest.err
5030       } && test -s conftest$ac_exeext &&
5031       $as_test_x conftest$ac_exeext; then
5032  ac_cv_func_connect=yes
5033else
5034  echo "$as_me: failed program was:" >&5
5035sed 's/^/| /' conftest.$ac_ext >&5
5036
5037	ac_cv_func_connect=no
5038fi
5039
5040rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5041      conftest$ac_exeext conftest.$ac_ext
5042fi
5043{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
5044echo "${ECHO_T}$ac_cv_func_connect" >&6; }
5045if test $ac_cv_func_connect = yes; then
5046  tcl_checkSocket=0
5047else
5048  tcl_checkSocket=1
5049fi
5050
5051    if test "$tcl_checkSocket" = 1; then
5052	{ echo "$as_me:$LINENO: checking for setsockopt" >&5
5053echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6; }
5054if test "${ac_cv_func_setsockopt+set}" = set; then
5055  echo $ECHO_N "(cached) $ECHO_C" >&6
5056else
5057  cat >conftest.$ac_ext <<_ACEOF
5058/* confdefs.h.  */
5059_ACEOF
5060cat confdefs.h >>conftest.$ac_ext
5061cat >>conftest.$ac_ext <<_ACEOF
5062/* end confdefs.h.  */
5063/* Define setsockopt to an innocuous variant, in case <limits.h> declares setsockopt.
5064   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5065#define setsockopt innocuous_setsockopt
5066
5067/* System header to define __stub macros and hopefully few prototypes,
5068    which can conflict with char setsockopt (); below.
5069    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5070    <limits.h> exists even on freestanding compilers.  */
5071
5072#ifdef __STDC__
5073# include <limits.h>
5074#else
5075# include <assert.h>
5076#endif
5077
5078#undef setsockopt
5079
5080/* Override any GCC internal prototype to avoid an error.
5081   Use char because int might match the return type of a GCC
5082   builtin and then its argument prototype would still apply.  */
5083#ifdef __cplusplus
5084extern "C"
5085#endif
5086char setsockopt ();
5087/* The GNU C library defines this for functions which it implements
5088    to always fail with ENOSYS.  Some functions are actually named
5089    something starting with __ and the normal name is an alias.  */
5090#if defined __stub_setsockopt || defined __stub___setsockopt
5091choke me
5092#endif
5093
5094int
5095main ()
5096{
5097return setsockopt ();
5098  ;
5099  return 0;
5100}
5101_ACEOF
5102rm -f conftest.$ac_objext conftest$ac_exeext
5103if { (ac_try="$ac_link"
5104case "(($ac_try" in
5105  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5106  *) ac_try_echo=$ac_try;;
5107esac
5108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5109  (eval "$ac_link") 2>conftest.er1
5110  ac_status=$?
5111  grep -v '^ *+' conftest.er1 >conftest.err
5112  rm -f conftest.er1
5113  cat conftest.err >&5
5114  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5115  (exit $ac_status); } && {
5116	 test -z "$ac_c_werror_flag" ||
5117	 test ! -s conftest.err
5118       } && test -s conftest$ac_exeext &&
5119       $as_test_x conftest$ac_exeext; then
5120  ac_cv_func_setsockopt=yes
5121else
5122  echo "$as_me: failed program was:" >&5
5123sed 's/^/| /' conftest.$ac_ext >&5
5124
5125	ac_cv_func_setsockopt=no
5126fi
5127
5128rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5129      conftest$ac_exeext conftest.$ac_ext
5130fi
5131{ echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5
5132echo "${ECHO_T}$ac_cv_func_setsockopt" >&6; }
5133if test $ac_cv_func_setsockopt = yes; then
5134  :
5135else
5136  { echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5
5137echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6; }
5138if test "${ac_cv_lib_socket_setsockopt+set}" = set; then
5139  echo $ECHO_N "(cached) $ECHO_C" >&6
5140else
5141  ac_check_lib_save_LIBS=$LIBS
5142LIBS="-lsocket  $LIBS"
5143cat >conftest.$ac_ext <<_ACEOF
5144/* confdefs.h.  */
5145_ACEOF
5146cat confdefs.h >>conftest.$ac_ext
5147cat >>conftest.$ac_ext <<_ACEOF
5148/* end confdefs.h.  */
5149
5150/* Override any GCC internal prototype to avoid an error.
5151   Use char because int might match the return type of a GCC
5152   builtin and then its argument prototype would still apply.  */
5153#ifdef __cplusplus
5154extern "C"
5155#endif
5156char setsockopt ();
5157int
5158main ()
5159{
5160return setsockopt ();
5161  ;
5162  return 0;
5163}
5164_ACEOF
5165rm -f conftest.$ac_objext conftest$ac_exeext
5166if { (ac_try="$ac_link"
5167case "(($ac_try" in
5168  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5169  *) ac_try_echo=$ac_try;;
5170esac
5171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5172  (eval "$ac_link") 2>conftest.er1
5173  ac_status=$?
5174  grep -v '^ *+' conftest.er1 >conftest.err
5175  rm -f conftest.er1
5176  cat conftest.err >&5
5177  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5178  (exit $ac_status); } && {
5179	 test -z "$ac_c_werror_flag" ||
5180	 test ! -s conftest.err
5181       } && test -s conftest$ac_exeext &&
5182       $as_test_x conftest$ac_exeext; then
5183  ac_cv_lib_socket_setsockopt=yes
5184else
5185  echo "$as_me: failed program was:" >&5
5186sed 's/^/| /' conftest.$ac_ext >&5
5187
5188	ac_cv_lib_socket_setsockopt=no
5189fi
5190
5191rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5192      conftest$ac_exeext conftest.$ac_ext
5193LIBS=$ac_check_lib_save_LIBS
5194fi
5195{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5
5196echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6; }
5197if test $ac_cv_lib_socket_setsockopt = yes; then
5198  LIBS="$LIBS -lsocket"
5199else
5200  tcl_checkBoth=1
5201fi
5202
5203fi
5204
5205    fi
5206    if test "$tcl_checkBoth" = 1; then
5207	tk_oldLibs=$LIBS
5208	LIBS="$LIBS -lsocket -lnsl"
5209	{ echo "$as_me:$LINENO: checking for accept" >&5
5210echo $ECHO_N "checking for accept... $ECHO_C" >&6; }
5211if test "${ac_cv_func_accept+set}" = set; then
5212  echo $ECHO_N "(cached) $ECHO_C" >&6
5213else
5214  cat >conftest.$ac_ext <<_ACEOF
5215/* confdefs.h.  */
5216_ACEOF
5217cat confdefs.h >>conftest.$ac_ext
5218cat >>conftest.$ac_ext <<_ACEOF
5219/* end confdefs.h.  */
5220/* Define accept to an innocuous variant, in case <limits.h> declares accept.
5221   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5222#define accept innocuous_accept
5223
5224/* System header to define __stub macros and hopefully few prototypes,
5225    which can conflict with char accept (); below.
5226    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5227    <limits.h> exists even on freestanding compilers.  */
5228
5229#ifdef __STDC__
5230# include <limits.h>
5231#else
5232# include <assert.h>
5233#endif
5234
5235#undef accept
5236
5237/* Override any GCC internal prototype to avoid an error.
5238   Use char because int might match the return type of a GCC
5239   builtin and then its argument prototype would still apply.  */
5240#ifdef __cplusplus
5241extern "C"
5242#endif
5243char accept ();
5244/* The GNU C library defines this for functions which it implements
5245    to always fail with ENOSYS.  Some functions are actually named
5246    something starting with __ and the normal name is an alias.  */
5247#if defined __stub_accept || defined __stub___accept
5248choke me
5249#endif
5250
5251int
5252main ()
5253{
5254return accept ();
5255  ;
5256  return 0;
5257}
5258_ACEOF
5259rm -f conftest.$ac_objext conftest$ac_exeext
5260if { (ac_try="$ac_link"
5261case "(($ac_try" in
5262  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5263  *) ac_try_echo=$ac_try;;
5264esac
5265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5266  (eval "$ac_link") 2>conftest.er1
5267  ac_status=$?
5268  grep -v '^ *+' conftest.er1 >conftest.err
5269  rm -f conftest.er1
5270  cat conftest.err >&5
5271  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5272  (exit $ac_status); } && {
5273	 test -z "$ac_c_werror_flag" ||
5274	 test ! -s conftest.err
5275       } && test -s conftest$ac_exeext &&
5276       $as_test_x conftest$ac_exeext; then
5277  ac_cv_func_accept=yes
5278else
5279  echo "$as_me: failed program was:" >&5
5280sed 's/^/| /' conftest.$ac_ext >&5
5281
5282	ac_cv_func_accept=no
5283fi
5284
5285rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5286      conftest$ac_exeext conftest.$ac_ext
5287fi
5288{ echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5
5289echo "${ECHO_T}$ac_cv_func_accept" >&6; }
5290if test $ac_cv_func_accept = yes; then
5291  tcl_checkNsl=0
5292else
5293  LIBS=$tk_oldLibs
5294fi
5295
5296    fi
5297    { echo "$as_me:$LINENO: checking for gethostbyname" >&5
5298echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; }
5299if test "${ac_cv_func_gethostbyname+set}" = set; then
5300  echo $ECHO_N "(cached) $ECHO_C" >&6
5301else
5302  cat >conftest.$ac_ext <<_ACEOF
5303/* confdefs.h.  */
5304_ACEOF
5305cat confdefs.h >>conftest.$ac_ext
5306cat >>conftest.$ac_ext <<_ACEOF
5307/* end confdefs.h.  */
5308/* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
5309   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5310#define gethostbyname innocuous_gethostbyname
5311
5312/* System header to define __stub macros and hopefully few prototypes,
5313    which can conflict with char gethostbyname (); below.
5314    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5315    <limits.h> exists even on freestanding compilers.  */
5316
5317#ifdef __STDC__
5318# include <limits.h>
5319#else
5320# include <assert.h>
5321#endif
5322
5323#undef gethostbyname
5324
5325/* Override any GCC internal prototype to avoid an error.
5326   Use char because int might match the return type of a GCC
5327   builtin and then its argument prototype would still apply.  */
5328#ifdef __cplusplus
5329extern "C"
5330#endif
5331char gethostbyname ();
5332/* The GNU C library defines this for functions which it implements
5333    to always fail with ENOSYS.  Some functions are actually named
5334    something starting with __ and the normal name is an alias.  */
5335#if defined __stub_gethostbyname || defined __stub___gethostbyname
5336choke me
5337#endif
5338
5339int
5340main ()
5341{
5342return gethostbyname ();
5343  ;
5344  return 0;
5345}
5346_ACEOF
5347rm -f conftest.$ac_objext conftest$ac_exeext
5348if { (ac_try="$ac_link"
5349case "(($ac_try" in
5350  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5351  *) ac_try_echo=$ac_try;;
5352esac
5353eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5354  (eval "$ac_link") 2>conftest.er1
5355  ac_status=$?
5356  grep -v '^ *+' conftest.er1 >conftest.err
5357  rm -f conftest.er1
5358  cat conftest.err >&5
5359  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5360  (exit $ac_status); } && {
5361	 test -z "$ac_c_werror_flag" ||
5362	 test ! -s conftest.err
5363       } && test -s conftest$ac_exeext &&
5364       $as_test_x conftest$ac_exeext; then
5365  ac_cv_func_gethostbyname=yes
5366else
5367  echo "$as_me: failed program was:" >&5
5368sed 's/^/| /' conftest.$ac_ext >&5
5369
5370	ac_cv_func_gethostbyname=no
5371fi
5372
5373rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5374      conftest$ac_exeext conftest.$ac_ext
5375fi
5376{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
5377echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; }
5378if test $ac_cv_func_gethostbyname = yes; then
5379  :
5380else
5381  { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
5382echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; }
5383if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
5384  echo $ECHO_N "(cached) $ECHO_C" >&6
5385else
5386  ac_check_lib_save_LIBS=$LIBS
5387LIBS="-lnsl  $LIBS"
5388cat >conftest.$ac_ext <<_ACEOF
5389/* confdefs.h.  */
5390_ACEOF
5391cat confdefs.h >>conftest.$ac_ext
5392cat >>conftest.$ac_ext <<_ACEOF
5393/* end confdefs.h.  */
5394
5395/* Override any GCC internal prototype to avoid an error.
5396   Use char because int might match the return type of a GCC
5397   builtin and then its argument prototype would still apply.  */
5398#ifdef __cplusplus
5399extern "C"
5400#endif
5401char gethostbyname ();
5402int
5403main ()
5404{
5405return gethostbyname ();
5406  ;
5407  return 0;
5408}
5409_ACEOF
5410rm -f conftest.$ac_objext conftest$ac_exeext
5411if { (ac_try="$ac_link"
5412case "(($ac_try" in
5413  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5414  *) ac_try_echo=$ac_try;;
5415esac
5416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5417  (eval "$ac_link") 2>conftest.er1
5418  ac_status=$?
5419  grep -v '^ *+' conftest.er1 >conftest.err
5420  rm -f conftest.er1
5421  cat conftest.err >&5
5422  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5423  (exit $ac_status); } && {
5424	 test -z "$ac_c_werror_flag" ||
5425	 test ! -s conftest.err
5426       } && test -s conftest$ac_exeext &&
5427       $as_test_x conftest$ac_exeext; then
5428  ac_cv_lib_nsl_gethostbyname=yes
5429else
5430  echo "$as_me: failed program was:" >&5
5431sed 's/^/| /' conftest.$ac_ext >&5
5432
5433	ac_cv_lib_nsl_gethostbyname=no
5434fi
5435
5436rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5437      conftest$ac_exeext conftest.$ac_ext
5438LIBS=$ac_check_lib_save_LIBS
5439fi
5440{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
5441echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; }
5442if test $ac_cv_lib_nsl_gethostbyname = yes; then
5443  LIBS="$LIBS -lnsl"
5444fi
5445
5446fi
5447
5448
5449    # TEA specific: Don't perform the eval of the libraries here because
5450    # DL_LIBS won't be set until we call TEA_CONFIG_CFLAGS
5451
5452    TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}'
5453
5454
5455
5456
5457    { echo "$as_me:$LINENO: checking dirent.h" >&5
5458echo $ECHO_N "checking dirent.h... $ECHO_C" >&6; }
5459if test "${tcl_cv_dirent_h+set}" = set; then
5460  echo $ECHO_N "(cached) $ECHO_C" >&6
5461else
5462
5463    cat >conftest.$ac_ext <<_ACEOF
5464/* confdefs.h.  */
5465_ACEOF
5466cat confdefs.h >>conftest.$ac_ext
5467cat >>conftest.$ac_ext <<_ACEOF
5468/* end confdefs.h.  */
5469#include <sys/types.h>
5470#include <dirent.h>
5471int
5472main ()
5473{
5474
5475#ifndef _POSIX_SOURCE
5476#   ifdef __Lynx__
5477	/*
5478	 * Generate compilation error to make the test fail:  Lynx headers
5479	 * are only valid if really in the POSIX environment.
5480	 */
5481
5482	missing_procedure();
5483#   endif
5484#endif
5485DIR *d;
5486struct dirent *entryPtr;
5487char *p;
5488d = opendir("foobar");
5489entryPtr = readdir(d);
5490p = entryPtr->d_name;
5491closedir(d);
5492
5493  ;
5494  return 0;
5495}
5496_ACEOF
5497rm -f conftest.$ac_objext conftest$ac_exeext
5498if { (ac_try="$ac_link"
5499case "(($ac_try" in
5500  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5501  *) ac_try_echo=$ac_try;;
5502esac
5503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5504  (eval "$ac_link") 2>conftest.er1
5505  ac_status=$?
5506  grep -v '^ *+' conftest.er1 >conftest.err
5507  rm -f conftest.er1
5508  cat conftest.err >&5
5509  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5510  (exit $ac_status); } && {
5511	 test -z "$ac_c_werror_flag" ||
5512	 test ! -s conftest.err
5513       } && test -s conftest$ac_exeext &&
5514       $as_test_x conftest$ac_exeext; then
5515  tcl_cv_dirent_h=yes
5516else
5517  echo "$as_me: failed program was:" >&5
5518sed 's/^/| /' conftest.$ac_ext >&5
5519
5520	tcl_cv_dirent_h=no
5521fi
5522
5523rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5524      conftest$ac_exeext conftest.$ac_ext
5525fi
5526{ echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5
5527echo "${ECHO_T}$tcl_cv_dirent_h" >&6; }
5528
5529    if test $tcl_cv_dirent_h = no; then
5530
5531cat >>confdefs.h <<\_ACEOF
5532#define NO_DIRENT_H 1
5533_ACEOF
5534
5535    fi
5536
5537    # TEA specific:
5538    if test "${ac_cv_header_errno_h+set}" = set; then
5539  { echo "$as_me:$LINENO: checking for errno.h" >&5
5540echo $ECHO_N "checking for errno.h... $ECHO_C" >&6; }
5541if test "${ac_cv_header_errno_h+set}" = set; then
5542  echo $ECHO_N "(cached) $ECHO_C" >&6
5543fi
5544{ echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
5545echo "${ECHO_T}$ac_cv_header_errno_h" >&6; }
5546else
5547  # Is the header compilable?
5548{ echo "$as_me:$LINENO: checking errno.h usability" >&5
5549echo $ECHO_N "checking errno.h usability... $ECHO_C" >&6; }
5550cat >conftest.$ac_ext <<_ACEOF
5551/* confdefs.h.  */
5552_ACEOF
5553cat confdefs.h >>conftest.$ac_ext
5554cat >>conftest.$ac_ext <<_ACEOF
5555/* end confdefs.h.  */
5556$ac_includes_default
5557#include <errno.h>
5558_ACEOF
5559rm -f conftest.$ac_objext
5560if { (ac_try="$ac_compile"
5561case "(($ac_try" in
5562  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5563  *) ac_try_echo=$ac_try;;
5564esac
5565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5566  (eval "$ac_compile") 2>conftest.er1
5567  ac_status=$?
5568  grep -v '^ *+' conftest.er1 >conftest.err
5569  rm -f conftest.er1
5570  cat conftest.err >&5
5571  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5572  (exit $ac_status); } && {
5573	 test -z "$ac_c_werror_flag" ||
5574	 test ! -s conftest.err
5575       } && test -s conftest.$ac_objext; then
5576  ac_header_compiler=yes
5577else
5578  echo "$as_me: failed program was:" >&5
5579sed 's/^/| /' conftest.$ac_ext >&5
5580
5581	ac_header_compiler=no
5582fi
5583
5584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5585{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5586echo "${ECHO_T}$ac_header_compiler" >&6; }
5587
5588# Is the header present?
5589{ echo "$as_me:$LINENO: checking errno.h presence" >&5
5590echo $ECHO_N "checking errno.h presence... $ECHO_C" >&6; }
5591cat >conftest.$ac_ext <<_ACEOF
5592/* confdefs.h.  */
5593_ACEOF
5594cat confdefs.h >>conftest.$ac_ext
5595cat >>conftest.$ac_ext <<_ACEOF
5596/* end confdefs.h.  */
5597#include <errno.h>
5598_ACEOF
5599if { (ac_try="$ac_cpp conftest.$ac_ext"
5600case "(($ac_try" in
5601  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5602  *) ac_try_echo=$ac_try;;
5603esac
5604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5605  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5606  ac_status=$?
5607  grep -v '^ *+' conftest.er1 >conftest.err
5608  rm -f conftest.er1
5609  cat conftest.err >&5
5610  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5611  (exit $ac_status); } >/dev/null && {
5612	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5613	 test ! -s conftest.err
5614       }; then
5615  ac_header_preproc=yes
5616else
5617  echo "$as_me: failed program was:" >&5
5618sed 's/^/| /' conftest.$ac_ext >&5
5619
5620  ac_header_preproc=no
5621fi
5622
5623rm -f conftest.err conftest.$ac_ext
5624{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5625echo "${ECHO_T}$ac_header_preproc" >&6; }
5626
5627# So?  What about this header?
5628case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5629  yes:no: )
5630    { echo "$as_me:$LINENO: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
5631echo "$as_me: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5632    { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the compiler's result" >&5
5633echo "$as_me: WARNING: errno.h: proceeding with the compiler's result" >&2;}
5634    ac_header_preproc=yes
5635    ;;
5636  no:yes:* )
5637    { echo "$as_me:$LINENO: WARNING: errno.h: present but cannot be compiled" >&5
5638echo "$as_me: WARNING: errno.h: present but cannot be compiled" >&2;}
5639    { echo "$as_me:$LINENO: WARNING: errno.h:     check for missing prerequisite headers?" >&5
5640echo "$as_me: WARNING: errno.h:     check for missing prerequisite headers?" >&2;}
5641    { echo "$as_me:$LINENO: WARNING: errno.h: see the Autoconf documentation" >&5
5642echo "$as_me: WARNING: errno.h: see the Autoconf documentation" >&2;}
5643    { echo "$as_me:$LINENO: WARNING: errno.h:     section \"Present But Cannot Be Compiled\"" >&5
5644echo "$as_me: WARNING: errno.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5645    { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the preprocessor's result" >&5
5646echo "$as_me: WARNING: errno.h: proceeding with the preprocessor's result" >&2;}
5647    { echo "$as_me:$LINENO: WARNING: errno.h: in the future, the compiler will take precedence" >&5
5648echo "$as_me: WARNING: errno.h: in the future, the compiler will take precedence" >&2;}
5649
5650    ;;
5651esac
5652{ echo "$as_me:$LINENO: checking for errno.h" >&5
5653echo $ECHO_N "checking for errno.h... $ECHO_C" >&6; }
5654if test "${ac_cv_header_errno_h+set}" = set; then
5655  echo $ECHO_N "(cached) $ECHO_C" >&6
5656else
5657  ac_cv_header_errno_h=$ac_header_preproc
5658fi
5659{ echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
5660echo "${ECHO_T}$ac_cv_header_errno_h" >&6; }
5661
5662fi
5663if test $ac_cv_header_errno_h = yes; then
5664  :
5665else
5666
5667cat >>confdefs.h <<\_ACEOF
5668#define NO_ERRNO_H 1
5669_ACEOF
5670
5671fi
5672
5673
5674    if test "${ac_cv_header_float_h+set}" = set; then
5675  { echo "$as_me:$LINENO: checking for float.h" >&5
5676echo $ECHO_N "checking for float.h... $ECHO_C" >&6; }
5677if test "${ac_cv_header_float_h+set}" = set; then
5678  echo $ECHO_N "(cached) $ECHO_C" >&6
5679fi
5680{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
5681echo "${ECHO_T}$ac_cv_header_float_h" >&6; }
5682else
5683  # Is the header compilable?
5684{ echo "$as_me:$LINENO: checking float.h usability" >&5
5685echo $ECHO_N "checking float.h usability... $ECHO_C" >&6; }
5686cat >conftest.$ac_ext <<_ACEOF
5687/* confdefs.h.  */
5688_ACEOF
5689cat confdefs.h >>conftest.$ac_ext
5690cat >>conftest.$ac_ext <<_ACEOF
5691/* end confdefs.h.  */
5692$ac_includes_default
5693#include <float.h>
5694_ACEOF
5695rm -f conftest.$ac_objext
5696if { (ac_try="$ac_compile"
5697case "(($ac_try" in
5698  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5699  *) ac_try_echo=$ac_try;;
5700esac
5701eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5702  (eval "$ac_compile") 2>conftest.er1
5703  ac_status=$?
5704  grep -v '^ *+' conftest.er1 >conftest.err
5705  rm -f conftest.er1
5706  cat conftest.err >&5
5707  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5708  (exit $ac_status); } && {
5709	 test -z "$ac_c_werror_flag" ||
5710	 test ! -s conftest.err
5711       } && test -s conftest.$ac_objext; then
5712  ac_header_compiler=yes
5713else
5714  echo "$as_me: failed program was:" >&5
5715sed 's/^/| /' conftest.$ac_ext >&5
5716
5717	ac_header_compiler=no
5718fi
5719
5720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5721{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5722echo "${ECHO_T}$ac_header_compiler" >&6; }
5723
5724# Is the header present?
5725{ echo "$as_me:$LINENO: checking float.h presence" >&5
5726echo $ECHO_N "checking float.h presence... $ECHO_C" >&6; }
5727cat >conftest.$ac_ext <<_ACEOF
5728/* confdefs.h.  */
5729_ACEOF
5730cat confdefs.h >>conftest.$ac_ext
5731cat >>conftest.$ac_ext <<_ACEOF
5732/* end confdefs.h.  */
5733#include <float.h>
5734_ACEOF
5735if { (ac_try="$ac_cpp conftest.$ac_ext"
5736case "(($ac_try" in
5737  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5738  *) ac_try_echo=$ac_try;;
5739esac
5740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5741  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5742  ac_status=$?
5743  grep -v '^ *+' conftest.er1 >conftest.err
5744  rm -f conftest.er1
5745  cat conftest.err >&5
5746  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5747  (exit $ac_status); } >/dev/null && {
5748	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5749	 test ! -s conftest.err
5750       }; then
5751  ac_header_preproc=yes
5752else
5753  echo "$as_me: failed program was:" >&5
5754sed 's/^/| /' conftest.$ac_ext >&5
5755
5756  ac_header_preproc=no
5757fi
5758
5759rm -f conftest.err conftest.$ac_ext
5760{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5761echo "${ECHO_T}$ac_header_preproc" >&6; }
5762
5763# So?  What about this header?
5764case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5765  yes:no: )
5766    { echo "$as_me:$LINENO: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&5
5767echo "$as_me: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5768    { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the compiler's result" >&5
5769echo "$as_me: WARNING: float.h: proceeding with the compiler's result" >&2;}
5770    ac_header_preproc=yes
5771    ;;
5772  no:yes:* )
5773    { echo "$as_me:$LINENO: WARNING: float.h: present but cannot be compiled" >&5
5774echo "$as_me: WARNING: float.h: present but cannot be compiled" >&2;}
5775    { echo "$as_me:$LINENO: WARNING: float.h:     check for missing prerequisite headers?" >&5
5776echo "$as_me: WARNING: float.h:     check for missing prerequisite headers?" >&2;}
5777    { echo "$as_me:$LINENO: WARNING: float.h: see the Autoconf documentation" >&5
5778echo "$as_me: WARNING: float.h: see the Autoconf documentation" >&2;}
5779    { echo "$as_me:$LINENO: WARNING: float.h:     section \"Present But Cannot Be Compiled\"" >&5
5780echo "$as_me: WARNING: float.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5781    { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the preprocessor's result" >&5
5782echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;}
5783    { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5
5784echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;}
5785
5786    ;;
5787esac
5788{ echo "$as_me:$LINENO: checking for float.h" >&5
5789echo $ECHO_N "checking for float.h... $ECHO_C" >&6; }
5790if test "${ac_cv_header_float_h+set}" = set; then
5791  echo $ECHO_N "(cached) $ECHO_C" >&6
5792else
5793  ac_cv_header_float_h=$ac_header_preproc
5794fi
5795{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
5796echo "${ECHO_T}$ac_cv_header_float_h" >&6; }
5797
5798fi
5799if test $ac_cv_header_float_h = yes; then
5800  :
5801else
5802
5803cat >>confdefs.h <<\_ACEOF
5804#define NO_FLOAT_H 1
5805_ACEOF
5806
5807fi
5808
5809
5810    if test "${ac_cv_header_values_h+set}" = set; then
5811  { echo "$as_me:$LINENO: checking for values.h" >&5
5812echo $ECHO_N "checking for values.h... $ECHO_C" >&6; }
5813if test "${ac_cv_header_values_h+set}" = set; then
5814  echo $ECHO_N "(cached) $ECHO_C" >&6
5815fi
5816{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
5817echo "${ECHO_T}$ac_cv_header_values_h" >&6; }
5818else
5819  # Is the header compilable?
5820{ echo "$as_me:$LINENO: checking values.h usability" >&5
5821echo $ECHO_N "checking values.h usability... $ECHO_C" >&6; }
5822cat >conftest.$ac_ext <<_ACEOF
5823/* confdefs.h.  */
5824_ACEOF
5825cat confdefs.h >>conftest.$ac_ext
5826cat >>conftest.$ac_ext <<_ACEOF
5827/* end confdefs.h.  */
5828$ac_includes_default
5829#include <values.h>
5830_ACEOF
5831rm -f conftest.$ac_objext
5832if { (ac_try="$ac_compile"
5833case "(($ac_try" in
5834  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5835  *) ac_try_echo=$ac_try;;
5836esac
5837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5838  (eval "$ac_compile") 2>conftest.er1
5839  ac_status=$?
5840  grep -v '^ *+' conftest.er1 >conftest.err
5841  rm -f conftest.er1
5842  cat conftest.err >&5
5843  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5844  (exit $ac_status); } && {
5845	 test -z "$ac_c_werror_flag" ||
5846	 test ! -s conftest.err
5847       } && test -s conftest.$ac_objext; then
5848  ac_header_compiler=yes
5849else
5850  echo "$as_me: failed program was:" >&5
5851sed 's/^/| /' conftest.$ac_ext >&5
5852
5853	ac_header_compiler=no
5854fi
5855
5856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5857{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5858echo "${ECHO_T}$ac_header_compiler" >&6; }
5859
5860# Is the header present?
5861{ echo "$as_me:$LINENO: checking values.h presence" >&5
5862echo $ECHO_N "checking values.h presence... $ECHO_C" >&6; }
5863cat >conftest.$ac_ext <<_ACEOF
5864/* confdefs.h.  */
5865_ACEOF
5866cat confdefs.h >>conftest.$ac_ext
5867cat >>conftest.$ac_ext <<_ACEOF
5868/* end confdefs.h.  */
5869#include <values.h>
5870_ACEOF
5871if { (ac_try="$ac_cpp conftest.$ac_ext"
5872case "(($ac_try" in
5873  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5874  *) ac_try_echo=$ac_try;;
5875esac
5876eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5877  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5878  ac_status=$?
5879  grep -v '^ *+' conftest.er1 >conftest.err
5880  rm -f conftest.er1
5881  cat conftest.err >&5
5882  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5883  (exit $ac_status); } >/dev/null && {
5884	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5885	 test ! -s conftest.err
5886       }; then
5887  ac_header_preproc=yes
5888else
5889  echo "$as_me: failed program was:" >&5
5890sed 's/^/| /' conftest.$ac_ext >&5
5891
5892  ac_header_preproc=no
5893fi
5894
5895rm -f conftest.err conftest.$ac_ext
5896{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5897echo "${ECHO_T}$ac_header_preproc" >&6; }
5898
5899# So?  What about this header?
5900case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5901  yes:no: )
5902    { echo "$as_me:$LINENO: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&5
5903echo "$as_me: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5904    { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the compiler's result" >&5
5905echo "$as_me: WARNING: values.h: proceeding with the compiler's result" >&2;}
5906    ac_header_preproc=yes
5907    ;;
5908  no:yes:* )
5909    { echo "$as_me:$LINENO: WARNING: values.h: present but cannot be compiled" >&5
5910echo "$as_me: WARNING: values.h: present but cannot be compiled" >&2;}
5911    { echo "$as_me:$LINENO: WARNING: values.h:     check for missing prerequisite headers?" >&5
5912echo "$as_me: WARNING: values.h:     check for missing prerequisite headers?" >&2;}
5913    { echo "$as_me:$LINENO: WARNING: values.h: see the Autoconf documentation" >&5
5914echo "$as_me: WARNING: values.h: see the Autoconf documentation" >&2;}
5915    { echo "$as_me:$LINENO: WARNING: values.h:     section \"Present But Cannot Be Compiled\"" >&5
5916echo "$as_me: WARNING: values.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5917    { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the preprocessor's result" >&5
5918echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;}
5919    { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5
5920echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;}
5921
5922    ;;
5923esac
5924{ echo "$as_me:$LINENO: checking for values.h" >&5
5925echo $ECHO_N "checking for values.h... $ECHO_C" >&6; }
5926if test "${ac_cv_header_values_h+set}" = set; then
5927  echo $ECHO_N "(cached) $ECHO_C" >&6
5928else
5929  ac_cv_header_values_h=$ac_header_preproc
5930fi
5931{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
5932echo "${ECHO_T}$ac_cv_header_values_h" >&6; }
5933
5934fi
5935if test $ac_cv_header_values_h = yes; then
5936  :
5937else
5938
5939cat >>confdefs.h <<\_ACEOF
5940#define NO_VALUES_H 1
5941_ACEOF
5942
5943fi
5944
5945
5946    if test "${ac_cv_header_limits_h+set}" = set; then
5947  { echo "$as_me:$LINENO: checking for limits.h" >&5
5948echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; }
5949if test "${ac_cv_header_limits_h+set}" = set; then
5950  echo $ECHO_N "(cached) $ECHO_C" >&6
5951fi
5952{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
5953echo "${ECHO_T}$ac_cv_header_limits_h" >&6; }
5954else
5955  # Is the header compilable?
5956{ echo "$as_me:$LINENO: checking limits.h usability" >&5
5957echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6; }
5958cat >conftest.$ac_ext <<_ACEOF
5959/* confdefs.h.  */
5960_ACEOF
5961cat confdefs.h >>conftest.$ac_ext
5962cat >>conftest.$ac_ext <<_ACEOF
5963/* end confdefs.h.  */
5964$ac_includes_default
5965#include <limits.h>
5966_ACEOF
5967rm -f conftest.$ac_objext
5968if { (ac_try="$ac_compile"
5969case "(($ac_try" in
5970  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5971  *) ac_try_echo=$ac_try;;
5972esac
5973eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5974  (eval "$ac_compile") 2>conftest.er1
5975  ac_status=$?
5976  grep -v '^ *+' conftest.er1 >conftest.err
5977  rm -f conftest.er1
5978  cat conftest.err >&5
5979  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5980  (exit $ac_status); } && {
5981	 test -z "$ac_c_werror_flag" ||
5982	 test ! -s conftest.err
5983       } && test -s conftest.$ac_objext; then
5984  ac_header_compiler=yes
5985else
5986  echo "$as_me: failed program was:" >&5
5987sed 's/^/| /' conftest.$ac_ext >&5
5988
5989	ac_header_compiler=no
5990fi
5991
5992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5993{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5994echo "${ECHO_T}$ac_header_compiler" >&6; }
5995
5996# Is the header present?
5997{ echo "$as_me:$LINENO: checking limits.h presence" >&5
5998echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6; }
5999cat >conftest.$ac_ext <<_ACEOF
6000/* confdefs.h.  */
6001_ACEOF
6002cat confdefs.h >>conftest.$ac_ext
6003cat >>conftest.$ac_ext <<_ACEOF
6004/* end confdefs.h.  */
6005#include <limits.h>
6006_ACEOF
6007if { (ac_try="$ac_cpp conftest.$ac_ext"
6008case "(($ac_try" in
6009  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6010  *) ac_try_echo=$ac_try;;
6011esac
6012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6013  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6014  ac_status=$?
6015  grep -v '^ *+' conftest.er1 >conftest.err
6016  rm -f conftest.er1
6017  cat conftest.err >&5
6018  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6019  (exit $ac_status); } >/dev/null && {
6020	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6021	 test ! -s conftest.err
6022       }; then
6023  ac_header_preproc=yes
6024else
6025  echo "$as_me: failed program was:" >&5
6026sed 's/^/| /' conftest.$ac_ext >&5
6027
6028  ac_header_preproc=no
6029fi
6030
6031rm -f conftest.err conftest.$ac_ext
6032{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6033echo "${ECHO_T}$ac_header_preproc" >&6; }
6034
6035# So?  What about this header?
6036case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6037  yes:no: )
6038    { echo "$as_me:$LINENO: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&5
6039echo "$as_me: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6040    { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the compiler's result" >&5
6041echo "$as_me: WARNING: limits.h: proceeding with the compiler's result" >&2;}
6042    ac_header_preproc=yes
6043    ;;
6044  no:yes:* )
6045    { echo "$as_me:$LINENO: WARNING: limits.h: present but cannot be compiled" >&5
6046echo "$as_me: WARNING: limits.h: present but cannot be compiled" >&2;}
6047    { echo "$as_me:$LINENO: WARNING: limits.h:     check for missing prerequisite headers?" >&5
6048echo "$as_me: WARNING: limits.h:     check for missing prerequisite headers?" >&2;}
6049    { echo "$as_me:$LINENO: WARNING: limits.h: see the Autoconf documentation" >&5
6050echo "$as_me: WARNING: limits.h: see the Autoconf documentation" >&2;}
6051    { echo "$as_me:$LINENO: WARNING: limits.h:     section \"Present But Cannot Be Compiled\"" >&5
6052echo "$as_me: WARNING: limits.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6053    { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the preprocessor's result" >&5
6054echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;}
6055    { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5
6056echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;}
6057
6058    ;;
6059esac
6060{ echo "$as_me:$LINENO: checking for limits.h" >&5
6061echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; }
6062if test "${ac_cv_header_limits_h+set}" = set; then
6063  echo $ECHO_N "(cached) $ECHO_C" >&6
6064else
6065  ac_cv_header_limits_h=$ac_header_preproc
6066fi
6067{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
6068echo "${ECHO_T}$ac_cv_header_limits_h" >&6; }
6069
6070fi
6071if test $ac_cv_header_limits_h = yes; then
6072
6073cat >>confdefs.h <<\_ACEOF
6074#define HAVE_LIMITS_H 1
6075_ACEOF
6076
6077else
6078
6079cat >>confdefs.h <<\_ACEOF
6080#define NO_LIMITS_H 1
6081_ACEOF
6082
6083fi
6084
6085
6086    if test "${ac_cv_header_stdlib_h+set}" = set; then
6087  { echo "$as_me:$LINENO: checking for stdlib.h" >&5
6088echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; }
6089if test "${ac_cv_header_stdlib_h+set}" = set; then
6090  echo $ECHO_N "(cached) $ECHO_C" >&6
6091fi
6092{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
6093echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; }
6094else
6095  # Is the header compilable?
6096{ echo "$as_me:$LINENO: checking stdlib.h usability" >&5
6097echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6; }
6098cat >conftest.$ac_ext <<_ACEOF
6099/* confdefs.h.  */
6100_ACEOF
6101cat confdefs.h >>conftest.$ac_ext
6102cat >>conftest.$ac_ext <<_ACEOF
6103/* end confdefs.h.  */
6104$ac_includes_default
6105#include <stdlib.h>
6106_ACEOF
6107rm -f conftest.$ac_objext
6108if { (ac_try="$ac_compile"
6109case "(($ac_try" in
6110  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6111  *) ac_try_echo=$ac_try;;
6112esac
6113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6114  (eval "$ac_compile") 2>conftest.er1
6115  ac_status=$?
6116  grep -v '^ *+' conftest.er1 >conftest.err
6117  rm -f conftest.er1
6118  cat conftest.err >&5
6119  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6120  (exit $ac_status); } && {
6121	 test -z "$ac_c_werror_flag" ||
6122	 test ! -s conftest.err
6123       } && test -s conftest.$ac_objext; then
6124  ac_header_compiler=yes
6125else
6126  echo "$as_me: failed program was:" >&5
6127sed 's/^/| /' conftest.$ac_ext >&5
6128
6129	ac_header_compiler=no
6130fi
6131
6132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6133{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6134echo "${ECHO_T}$ac_header_compiler" >&6; }
6135
6136# Is the header present?
6137{ echo "$as_me:$LINENO: checking stdlib.h presence" >&5
6138echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6; }
6139cat >conftest.$ac_ext <<_ACEOF
6140/* confdefs.h.  */
6141_ACEOF
6142cat confdefs.h >>conftest.$ac_ext
6143cat >>conftest.$ac_ext <<_ACEOF
6144/* end confdefs.h.  */
6145#include <stdlib.h>
6146_ACEOF
6147if { (ac_try="$ac_cpp conftest.$ac_ext"
6148case "(($ac_try" in
6149  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6150  *) ac_try_echo=$ac_try;;
6151esac
6152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6153  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6154  ac_status=$?
6155  grep -v '^ *+' conftest.er1 >conftest.err
6156  rm -f conftest.er1
6157  cat conftest.err >&5
6158  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6159  (exit $ac_status); } >/dev/null && {
6160	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6161	 test ! -s conftest.err
6162       }; then
6163  ac_header_preproc=yes
6164else
6165  echo "$as_me: failed program was:" >&5
6166sed 's/^/| /' conftest.$ac_ext >&5
6167
6168  ac_header_preproc=no
6169fi
6170
6171rm -f conftest.err conftest.$ac_ext
6172{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6173echo "${ECHO_T}$ac_header_preproc" >&6; }
6174
6175# So?  What about this header?
6176case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6177  yes:no: )
6178    { echo "$as_me:$LINENO: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
6179echo "$as_me: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6180    { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the compiler's result" >&5
6181echo "$as_me: WARNING: stdlib.h: proceeding with the compiler's result" >&2;}
6182    ac_header_preproc=yes
6183    ;;
6184  no:yes:* )
6185    { echo "$as_me:$LINENO: WARNING: stdlib.h: present but cannot be compiled" >&5
6186echo "$as_me: WARNING: stdlib.h: present but cannot be compiled" >&2;}
6187    { echo "$as_me:$LINENO: WARNING: stdlib.h:     check for missing prerequisite headers?" >&5
6188echo "$as_me: WARNING: stdlib.h:     check for missing prerequisite headers?" >&2;}
6189    { echo "$as_me:$LINENO: WARNING: stdlib.h: see the Autoconf documentation" >&5
6190echo "$as_me: WARNING: stdlib.h: see the Autoconf documentation" >&2;}
6191    { echo "$as_me:$LINENO: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&5
6192echo "$as_me: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6193    { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the preprocessor's result" >&5
6194echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;}
6195    { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5
6196echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;}
6197
6198    ;;
6199esac
6200{ echo "$as_me:$LINENO: checking for stdlib.h" >&5
6201echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; }
6202if test "${ac_cv_header_stdlib_h+set}" = set; then
6203  echo $ECHO_N "(cached) $ECHO_C" >&6
6204else
6205  ac_cv_header_stdlib_h=$ac_header_preproc
6206fi
6207{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
6208echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; }
6209
6210fi
6211if test $ac_cv_header_stdlib_h = yes; then
6212  tcl_ok=1
6213else
6214  tcl_ok=0
6215fi
6216
6217
6218    cat >conftest.$ac_ext <<_ACEOF
6219/* confdefs.h.  */
6220_ACEOF
6221cat confdefs.h >>conftest.$ac_ext
6222cat >>conftest.$ac_ext <<_ACEOF
6223/* end confdefs.h.  */
6224#include <stdlib.h>
6225
6226_ACEOF
6227if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6228  $EGREP "strtol" >/dev/null 2>&1; then
6229  :
6230else
6231  tcl_ok=0
6232fi
6233rm -f -r conftest*
6234
6235    cat >conftest.$ac_ext <<_ACEOF
6236/* confdefs.h.  */
6237_ACEOF
6238cat confdefs.h >>conftest.$ac_ext
6239cat >>conftest.$ac_ext <<_ACEOF
6240/* end confdefs.h.  */
6241#include <stdlib.h>
6242
6243_ACEOF
6244if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6245  $EGREP "strtoul" >/dev/null 2>&1; then
6246  :
6247else
6248  tcl_ok=0
6249fi
6250rm -f -r conftest*
6251
6252    cat >conftest.$ac_ext <<_ACEOF
6253/* confdefs.h.  */
6254_ACEOF
6255cat confdefs.h >>conftest.$ac_ext
6256cat >>conftest.$ac_ext <<_ACEOF
6257/* end confdefs.h.  */
6258#include <stdlib.h>
6259
6260_ACEOF
6261if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6262  $EGREP "strtod" >/dev/null 2>&1; then
6263  :
6264else
6265  tcl_ok=0
6266fi
6267rm -f -r conftest*
6268
6269    if test $tcl_ok = 0; then
6270
6271cat >>confdefs.h <<\_ACEOF
6272#define NO_STDLIB_H 1
6273_ACEOF
6274
6275    fi
6276    if test "${ac_cv_header_string_h+set}" = set; then
6277  { echo "$as_me:$LINENO: checking for string.h" >&5
6278echo $ECHO_N "checking for string.h... $ECHO_C" >&6; }
6279if test "${ac_cv_header_string_h+set}" = set; then
6280  echo $ECHO_N "(cached) $ECHO_C" >&6
6281fi
6282{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
6283echo "${ECHO_T}$ac_cv_header_string_h" >&6; }
6284else
6285  # Is the header compilable?
6286{ echo "$as_me:$LINENO: checking string.h usability" >&5
6287echo $ECHO_N "checking string.h usability... $ECHO_C" >&6; }
6288cat >conftest.$ac_ext <<_ACEOF
6289/* confdefs.h.  */
6290_ACEOF
6291cat confdefs.h >>conftest.$ac_ext
6292cat >>conftest.$ac_ext <<_ACEOF
6293/* end confdefs.h.  */
6294$ac_includes_default
6295#include <string.h>
6296_ACEOF
6297rm -f conftest.$ac_objext
6298if { (ac_try="$ac_compile"
6299case "(($ac_try" in
6300  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6301  *) ac_try_echo=$ac_try;;
6302esac
6303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6304  (eval "$ac_compile") 2>conftest.er1
6305  ac_status=$?
6306  grep -v '^ *+' conftest.er1 >conftest.err
6307  rm -f conftest.er1
6308  cat conftest.err >&5
6309  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6310  (exit $ac_status); } && {
6311	 test -z "$ac_c_werror_flag" ||
6312	 test ! -s conftest.err
6313       } && test -s conftest.$ac_objext; then
6314  ac_header_compiler=yes
6315else
6316  echo "$as_me: failed program was:" >&5
6317sed 's/^/| /' conftest.$ac_ext >&5
6318
6319	ac_header_compiler=no
6320fi
6321
6322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6323{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6324echo "${ECHO_T}$ac_header_compiler" >&6; }
6325
6326# Is the header present?
6327{ echo "$as_me:$LINENO: checking string.h presence" >&5
6328echo $ECHO_N "checking string.h presence... $ECHO_C" >&6; }
6329cat >conftest.$ac_ext <<_ACEOF
6330/* confdefs.h.  */
6331_ACEOF
6332cat confdefs.h >>conftest.$ac_ext
6333cat >>conftest.$ac_ext <<_ACEOF
6334/* end confdefs.h.  */
6335#include <string.h>
6336_ACEOF
6337if { (ac_try="$ac_cpp conftest.$ac_ext"
6338case "(($ac_try" in
6339  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6340  *) ac_try_echo=$ac_try;;
6341esac
6342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6343  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6344  ac_status=$?
6345  grep -v '^ *+' conftest.er1 >conftest.err
6346  rm -f conftest.er1
6347  cat conftest.err >&5
6348  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6349  (exit $ac_status); } >/dev/null && {
6350	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6351	 test ! -s conftest.err
6352       }; then
6353  ac_header_preproc=yes
6354else
6355  echo "$as_me: failed program was:" >&5
6356sed 's/^/| /' conftest.$ac_ext >&5
6357
6358  ac_header_preproc=no
6359fi
6360
6361rm -f conftest.err conftest.$ac_ext
6362{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6363echo "${ECHO_T}$ac_header_preproc" >&6; }
6364
6365# So?  What about this header?
6366case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6367  yes:no: )
6368    { echo "$as_me:$LINENO: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&5
6369echo "$as_me: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6370    { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the compiler's result" >&5
6371echo "$as_me: WARNING: string.h: proceeding with the compiler's result" >&2;}
6372    ac_header_preproc=yes
6373    ;;
6374  no:yes:* )
6375    { echo "$as_me:$LINENO: WARNING: string.h: present but cannot be compiled" >&5
6376echo "$as_me: WARNING: string.h: present but cannot be compiled" >&2;}
6377    { echo "$as_me:$LINENO: WARNING: string.h:     check for missing prerequisite headers?" >&5
6378echo "$as_me: WARNING: string.h:     check for missing prerequisite headers?" >&2;}
6379    { echo "$as_me:$LINENO: WARNING: string.h: see the Autoconf documentation" >&5
6380echo "$as_me: WARNING: string.h: see the Autoconf documentation" >&2;}
6381    { echo "$as_me:$LINENO: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&5
6382echo "$as_me: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6383    { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the preprocessor's result" >&5
6384echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;}
6385    { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5
6386echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;}
6387
6388    ;;
6389esac
6390{ echo "$as_me:$LINENO: checking for string.h" >&5
6391echo $ECHO_N "checking for string.h... $ECHO_C" >&6; }
6392if test "${ac_cv_header_string_h+set}" = set; then
6393  echo $ECHO_N "(cached) $ECHO_C" >&6
6394else
6395  ac_cv_header_string_h=$ac_header_preproc
6396fi
6397{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
6398echo "${ECHO_T}$ac_cv_header_string_h" >&6; }
6399
6400fi
6401if test $ac_cv_header_string_h = yes; then
6402  tcl_ok=1
6403else
6404  tcl_ok=0
6405fi
6406
6407
6408    cat >conftest.$ac_ext <<_ACEOF
6409/* confdefs.h.  */
6410_ACEOF
6411cat confdefs.h >>conftest.$ac_ext
6412cat >>conftest.$ac_ext <<_ACEOF
6413/* end confdefs.h.  */
6414#include <string.h>
6415
6416_ACEOF
6417if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6418  $EGREP "strstr" >/dev/null 2>&1; then
6419  :
6420else
6421  tcl_ok=0
6422fi
6423rm -f -r conftest*
6424
6425    cat >conftest.$ac_ext <<_ACEOF
6426/* confdefs.h.  */
6427_ACEOF
6428cat confdefs.h >>conftest.$ac_ext
6429cat >>conftest.$ac_ext <<_ACEOF
6430/* end confdefs.h.  */
6431#include <string.h>
6432
6433_ACEOF
6434if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6435  $EGREP "strerror" >/dev/null 2>&1; then
6436  :
6437else
6438  tcl_ok=0
6439fi
6440rm -f -r conftest*
6441
6442
6443    # See also memmove check below for a place where NO_STRING_H can be
6444    # set and why.
6445
6446    if test $tcl_ok = 0; then
6447
6448cat >>confdefs.h <<\_ACEOF
6449#define NO_STRING_H 1
6450_ACEOF
6451
6452    fi
6453
6454    if test "${ac_cv_header_sys_wait_h+set}" = set; then
6455  { echo "$as_me:$LINENO: checking for sys/wait.h" >&5
6456echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; }
6457if test "${ac_cv_header_sys_wait_h+set}" = set; then
6458  echo $ECHO_N "(cached) $ECHO_C" >&6
6459fi
6460{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
6461echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
6462else
6463  # Is the header compilable?
6464{ echo "$as_me:$LINENO: checking sys/wait.h usability" >&5
6465echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6; }
6466cat >conftest.$ac_ext <<_ACEOF
6467/* confdefs.h.  */
6468_ACEOF
6469cat confdefs.h >>conftest.$ac_ext
6470cat >>conftest.$ac_ext <<_ACEOF
6471/* end confdefs.h.  */
6472$ac_includes_default
6473#include <sys/wait.h>
6474_ACEOF
6475rm -f conftest.$ac_objext
6476if { (ac_try="$ac_compile"
6477case "(($ac_try" in
6478  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6479  *) ac_try_echo=$ac_try;;
6480esac
6481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6482  (eval "$ac_compile") 2>conftest.er1
6483  ac_status=$?
6484  grep -v '^ *+' conftest.er1 >conftest.err
6485  rm -f conftest.er1
6486  cat conftest.err >&5
6487  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6488  (exit $ac_status); } && {
6489	 test -z "$ac_c_werror_flag" ||
6490	 test ! -s conftest.err
6491       } && test -s conftest.$ac_objext; then
6492  ac_header_compiler=yes
6493else
6494  echo "$as_me: failed program was:" >&5
6495sed 's/^/| /' conftest.$ac_ext >&5
6496
6497	ac_header_compiler=no
6498fi
6499
6500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6501{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6502echo "${ECHO_T}$ac_header_compiler" >&6; }
6503
6504# Is the header present?
6505{ echo "$as_me:$LINENO: checking sys/wait.h presence" >&5
6506echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6; }
6507cat >conftest.$ac_ext <<_ACEOF
6508/* confdefs.h.  */
6509_ACEOF
6510cat confdefs.h >>conftest.$ac_ext
6511cat >>conftest.$ac_ext <<_ACEOF
6512/* end confdefs.h.  */
6513#include <sys/wait.h>
6514_ACEOF
6515if { (ac_try="$ac_cpp conftest.$ac_ext"
6516case "(($ac_try" in
6517  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6518  *) ac_try_echo=$ac_try;;
6519esac
6520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6521  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6522  ac_status=$?
6523  grep -v '^ *+' conftest.er1 >conftest.err
6524  rm -f conftest.er1
6525  cat conftest.err >&5
6526  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6527  (exit $ac_status); } >/dev/null && {
6528	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6529	 test ! -s conftest.err
6530       }; then
6531  ac_header_preproc=yes
6532else
6533  echo "$as_me: failed program was:" >&5
6534sed 's/^/| /' conftest.$ac_ext >&5
6535
6536  ac_header_preproc=no
6537fi
6538
6539rm -f conftest.err conftest.$ac_ext
6540{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6541echo "${ECHO_T}$ac_header_preproc" >&6; }
6542
6543# So?  What about this header?
6544case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6545  yes:no: )
6546    { echo "$as_me:$LINENO: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&5
6547echo "$as_me: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6548    { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the compiler's result" >&5
6549echo "$as_me: WARNING: sys/wait.h: proceeding with the compiler's result" >&2;}
6550    ac_header_preproc=yes
6551    ;;
6552  no:yes:* )
6553    { echo "$as_me:$LINENO: WARNING: sys/wait.h: present but cannot be compiled" >&5
6554echo "$as_me: WARNING: sys/wait.h: present but cannot be compiled" >&2;}
6555    { echo "$as_me:$LINENO: WARNING: sys/wait.h:     check for missing prerequisite headers?" >&5
6556echo "$as_me: WARNING: sys/wait.h:     check for missing prerequisite headers?" >&2;}
6557    { echo "$as_me:$LINENO: WARNING: sys/wait.h: see the Autoconf documentation" >&5
6558echo "$as_me: WARNING: sys/wait.h: see the Autoconf documentation" >&2;}
6559    { echo "$as_me:$LINENO: WARNING: sys/wait.h:     section \"Present But Cannot Be Compiled\"" >&5
6560echo "$as_me: WARNING: sys/wait.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6561    { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&5
6562echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;}
6563    { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5
6564echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;}
6565
6566    ;;
6567esac
6568{ echo "$as_me:$LINENO: checking for sys/wait.h" >&5
6569echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; }
6570if test "${ac_cv_header_sys_wait_h+set}" = set; then
6571  echo $ECHO_N "(cached) $ECHO_C" >&6
6572else
6573  ac_cv_header_sys_wait_h=$ac_header_preproc
6574fi
6575{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
6576echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
6577
6578fi
6579if test $ac_cv_header_sys_wait_h = yes; then
6580  :
6581else
6582
6583cat >>confdefs.h <<\_ACEOF
6584#define NO_SYS_WAIT_H 1
6585_ACEOF
6586
6587fi
6588
6589
6590    if test "${ac_cv_header_dlfcn_h+set}" = set; then
6591  { echo "$as_me:$LINENO: checking for dlfcn.h" >&5
6592echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; }
6593if test "${ac_cv_header_dlfcn_h+set}" = set; then
6594  echo $ECHO_N "(cached) $ECHO_C" >&6
6595fi
6596{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
6597echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; }
6598else
6599  # Is the header compilable?
6600{ echo "$as_me:$LINENO: checking dlfcn.h usability" >&5
6601echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6; }
6602cat >conftest.$ac_ext <<_ACEOF
6603/* confdefs.h.  */
6604_ACEOF
6605cat confdefs.h >>conftest.$ac_ext
6606cat >>conftest.$ac_ext <<_ACEOF
6607/* end confdefs.h.  */
6608$ac_includes_default
6609#include <dlfcn.h>
6610_ACEOF
6611rm -f conftest.$ac_objext
6612if { (ac_try="$ac_compile"
6613case "(($ac_try" in
6614  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6615  *) ac_try_echo=$ac_try;;
6616esac
6617eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6618  (eval "$ac_compile") 2>conftest.er1
6619  ac_status=$?
6620  grep -v '^ *+' conftest.er1 >conftest.err
6621  rm -f conftest.er1
6622  cat conftest.err >&5
6623  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6624  (exit $ac_status); } && {
6625	 test -z "$ac_c_werror_flag" ||
6626	 test ! -s conftest.err
6627       } && test -s conftest.$ac_objext; then
6628  ac_header_compiler=yes
6629else
6630  echo "$as_me: failed program was:" >&5
6631sed 's/^/| /' conftest.$ac_ext >&5
6632
6633	ac_header_compiler=no
6634fi
6635
6636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6637{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6638echo "${ECHO_T}$ac_header_compiler" >&6; }
6639
6640# Is the header present?
6641{ echo "$as_me:$LINENO: checking dlfcn.h presence" >&5
6642echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6; }
6643cat >conftest.$ac_ext <<_ACEOF
6644/* confdefs.h.  */
6645_ACEOF
6646cat confdefs.h >>conftest.$ac_ext
6647cat >>conftest.$ac_ext <<_ACEOF
6648/* end confdefs.h.  */
6649#include <dlfcn.h>
6650_ACEOF
6651if { (ac_try="$ac_cpp conftest.$ac_ext"
6652case "(($ac_try" in
6653  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6654  *) ac_try_echo=$ac_try;;
6655esac
6656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6657  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6658  ac_status=$?
6659  grep -v '^ *+' conftest.er1 >conftest.err
6660  rm -f conftest.er1
6661  cat conftest.err >&5
6662  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6663  (exit $ac_status); } >/dev/null && {
6664	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6665	 test ! -s conftest.err
6666       }; then
6667  ac_header_preproc=yes
6668else
6669  echo "$as_me: failed program was:" >&5
6670sed 's/^/| /' conftest.$ac_ext >&5
6671
6672  ac_header_preproc=no
6673fi
6674
6675rm -f conftest.err conftest.$ac_ext
6676{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6677echo "${ECHO_T}$ac_header_preproc" >&6; }
6678
6679# So?  What about this header?
6680case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6681  yes:no: )
6682    { echo "$as_me:$LINENO: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&5
6683echo "$as_me: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6684    { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the compiler's result" >&5
6685echo "$as_me: WARNING: dlfcn.h: proceeding with the compiler's result" >&2;}
6686    ac_header_preproc=yes
6687    ;;
6688  no:yes:* )
6689    { echo "$as_me:$LINENO: WARNING: dlfcn.h: present but cannot be compiled" >&5
6690echo "$as_me: WARNING: dlfcn.h: present but cannot be compiled" >&2;}
6691    { echo "$as_me:$LINENO: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&5
6692echo "$as_me: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&2;}
6693    { echo "$as_me:$LINENO: WARNING: dlfcn.h: see the Autoconf documentation" >&5
6694echo "$as_me: WARNING: dlfcn.h: see the Autoconf documentation" >&2;}
6695    { echo "$as_me:$LINENO: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&5
6696echo "$as_me: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6697    { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5
6698echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;}
6699    { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5
6700echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;}
6701
6702    ;;
6703esac
6704{ echo "$as_me:$LINENO: checking for dlfcn.h" >&5
6705echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; }
6706if test "${ac_cv_header_dlfcn_h+set}" = set; then
6707  echo $ECHO_N "(cached) $ECHO_C" >&6
6708else
6709  ac_cv_header_dlfcn_h=$ac_header_preproc
6710fi
6711{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
6712echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; }
6713
6714fi
6715if test $ac_cv_header_dlfcn_h = yes; then
6716  :
6717else
6718
6719cat >>confdefs.h <<\_ACEOF
6720#define NO_DLFCN_H 1
6721_ACEOF
6722
6723fi
6724
6725
6726
6727    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
6728
6729for ac_header in sys/param.h
6730do
6731as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6732if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6733  { echo "$as_me:$LINENO: checking for $ac_header" >&5
6734echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6735if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6736  echo $ECHO_N "(cached) $ECHO_C" >&6
6737fi
6738ac_res=`eval echo '${'$as_ac_Header'}'`
6739	       { echo "$as_me:$LINENO: result: $ac_res" >&5
6740echo "${ECHO_T}$ac_res" >&6; }
6741else
6742  # Is the header compilable?
6743{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6744echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
6745cat >conftest.$ac_ext <<_ACEOF
6746/* confdefs.h.  */
6747_ACEOF
6748cat confdefs.h >>conftest.$ac_ext
6749cat >>conftest.$ac_ext <<_ACEOF
6750/* end confdefs.h.  */
6751$ac_includes_default
6752#include <$ac_header>
6753_ACEOF
6754rm -f conftest.$ac_objext
6755if { (ac_try="$ac_compile"
6756case "(($ac_try" in
6757  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6758  *) ac_try_echo=$ac_try;;
6759esac
6760eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6761  (eval "$ac_compile") 2>conftest.er1
6762  ac_status=$?
6763  grep -v '^ *+' conftest.er1 >conftest.err
6764  rm -f conftest.er1
6765  cat conftest.err >&5
6766  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6767  (exit $ac_status); } && {
6768	 test -z "$ac_c_werror_flag" ||
6769	 test ! -s conftest.err
6770       } && test -s conftest.$ac_objext; then
6771  ac_header_compiler=yes
6772else
6773  echo "$as_me: failed program was:" >&5
6774sed 's/^/| /' conftest.$ac_ext >&5
6775
6776	ac_header_compiler=no
6777fi
6778
6779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6780{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6781echo "${ECHO_T}$ac_header_compiler" >&6; }
6782
6783# Is the header present?
6784{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6785echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
6786cat >conftest.$ac_ext <<_ACEOF
6787/* confdefs.h.  */
6788_ACEOF
6789cat confdefs.h >>conftest.$ac_ext
6790cat >>conftest.$ac_ext <<_ACEOF
6791/* end confdefs.h.  */
6792#include <$ac_header>
6793_ACEOF
6794if { (ac_try="$ac_cpp conftest.$ac_ext"
6795case "(($ac_try" in
6796  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6797  *) ac_try_echo=$ac_try;;
6798esac
6799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6800  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6801  ac_status=$?
6802  grep -v '^ *+' conftest.er1 >conftest.err
6803  rm -f conftest.er1
6804  cat conftest.err >&5
6805  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6806  (exit $ac_status); } >/dev/null && {
6807	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6808	 test ! -s conftest.err
6809       }; then
6810  ac_header_preproc=yes
6811else
6812  echo "$as_me: failed program was:" >&5
6813sed 's/^/| /' conftest.$ac_ext >&5
6814
6815  ac_header_preproc=no
6816fi
6817
6818rm -f conftest.err conftest.$ac_ext
6819{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6820echo "${ECHO_T}$ac_header_preproc" >&6; }
6821
6822# So?  What about this header?
6823case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6824  yes:no: )
6825    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6826echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6827    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6828echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6829    ac_header_preproc=yes
6830    ;;
6831  no:yes:* )
6832    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6833echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6834    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
6835echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
6836    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6837echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6838    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
6839echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
6840    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6841echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6842    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6843echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6844
6845    ;;
6846esac
6847{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6848echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6849if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6850  echo $ECHO_N "(cached) $ECHO_C" >&6
6851else
6852  eval "$as_ac_Header=\$ac_header_preproc"
6853fi
6854ac_res=`eval echo '${'$as_ac_Header'}'`
6855	       { echo "$as_me:$LINENO: result: $ac_res" >&5
6856echo "${ECHO_T}$ac_res" >&6; }
6857
6858fi
6859if test `eval echo '${'$as_ac_Header'}'` = yes; then
6860  cat >>confdefs.h <<_ACEOF
6861#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6862_ACEOF
6863
6864fi
6865
6866done
6867
6868
6869	# Let the user call this, because if it triggers, they will
6870	# need a compat/strtod.c that is correct.  Users can also
6871	# use Tcl_GetDouble(FromObj) instead.
6872	#TEA_BUGGY_STRTOD
6873    fi
6874
6875
6876
6877    #
6878    # Ok, lets find the tkimg configuration
6879    # First, look for one uninstalled.
6880    # the alternative search directory is invoked by --with-tkimg
6881    #
6882
6883    if test x"${no_tkimg}" = x ; then
6884	# we reset no_tkimg in case something fails here
6885	no_tkimg=true
6886
6887# Check whether --with-tkimg was given.
6888if test "${with_tkimg+set}" = set; then
6889  withval=$with_tkimg; with_tkimgconfig=${withval}
6890fi
6891
6892	{ echo "$as_me:$LINENO: checking for tkimg configuration" >&5
6893echo $ECHO_N "checking for tkimg configuration... $ECHO_C" >&6; }
6894	if test "${ac_cv_c_tkimgconfig+set}" = set; then
6895  echo $ECHO_N "(cached) $ECHO_C" >&6
6896else
6897
6898
6899	    # First check to see if --with-tkimg was specified.
6900	    if test x"${with_tkimgconfig}" != x ; then
6901		case ${with_tkimgconfig} in
6902		    */tkimgConfig.sh )
6903			if test -f ${with_tkimgconfig}; then
6904			    { echo "$as_me:$LINENO: WARNING: --with-tkimg argument should refer to directory containing tkimgConfig.sh, not to tkimgConfig.sh itself" >&5
6905echo "$as_me: WARNING: --with-tkimg argument should refer to directory containing tkimgConfig.sh, not to tkimgConfig.sh itself" >&2;}
6906			    with_tkimgconfig=`echo ${with_tkimgconfig} | sed 's!/tkimgConfig\.sh$!!'`
6907			fi;;
6908		esac
6909		if test -f "${with_tkimgconfig}/tkimgConfig.sh" ; then
6910		    ac_cv_c_tkimgconfig=`(cd ${with_tkimgconfig}; pwd)`
6911		else
6912		    { { echo "$as_me:$LINENO: error: ${with_tkimgconfig} directory doesn't contain tkimgConfig.sh" >&5
6913echo "$as_me: error: ${with_tkimgconfig} directory doesn't contain tkimgConfig.sh" >&2;}
6914   { (exit 1); exit 1; }; }
6915		fi
6916	    fi
6917
6918	    # then check for a private tkimg installation
6919	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
6920		for i in \
6921			../tkimg \
6922			`ls -dr ../tkimg*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
6923			`ls -dr ../tkimg*[0-9].[0-9][0-9] 2>/dev/null` \
6924			`ls -dr ../tkimg*[0-9].[0-9] 2>/dev/null` \
6925			`ls -dr ../tkimg*[0-9].[0-9]* 2>/dev/null` \
6926			../../tkimg \
6927			`ls -dr ../../tkimg*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
6928			`ls -dr ../../tkimg*[0-9].[0-9][0-9] 2>/dev/null` \
6929			`ls -dr ../../tkimg*[0-9].[0-9] 2>/dev/null` \
6930			`ls -dr ../../tkimg*[0-9].[0-9]* 2>/dev/null` \
6931			../../../tkimg \
6932			`ls -dr ../../../tkimg*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
6933			`ls -dr ../../../tkimg*[0-9].[0-9][0-9] 2>/dev/null` \
6934			`ls -dr ../../../tkimg*[0-9].[0-9] 2>/dev/null` \
6935			`ls -dr ../../../tkimg*[0-9].[0-9]* 2>/dev/null` \
6936			${srcdir}/../tkimg \
6937			`ls -dr ${srcdir}/../tkimg*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
6938			`ls -dr ${srcdir}/../tkimg*[0-9].[0-9][0-9] 2>/dev/null` \
6939			`ls -dr ${srcdir}/../tkimg*[0-9].[0-9] 2>/dev/null` \
6940			`ls -dr ${srcdir}/../tkimg*[0-9].[0-9]* 2>/dev/null` \
6941			; do
6942		    if test -f "$i/tkimgConfig.sh" ; then
6943			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
6944			break
6945		    fi
6946		    if test -f "$i/unix/tkimgConfig.sh" ; then
6947			ac_cv_c_tkimgconfig=`(cd $i/unix; pwd)`
6948			break
6949		    fi
6950		done
6951	    fi
6952
6953	    # check in a few common install locations
6954	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
6955		for i in `ls -d ${libdir} 2>/dev/null` \
6956			`ls -d ${exec_prefix}/lib 2>/dev/null` \
6957			`ls -d ${prefix}/lib 2>/dev/null` \
6958			`ls -d /usr/local/lib 2>/dev/null` \
6959			`ls -d /usr/contrib/lib 2>/dev/null` \
6960			`ls -d /usr/lib 2>/dev/null` \
6961			`ls -d /usr/lib64 2>/dev/null` \
6962			; do
6963		    if test -f "$i/tkimgConfig.sh" ; then
6964			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
6965			break
6966		    fi
6967		done
6968	    fi
6969
6970fi
6971
6972
6973	if test x"${ac_cv_c_tkimgconfig}" = x ; then
6974	    tkimg_BIN_DIR="# no tkimg configs found"
6975	    { echo "$as_me:$LINENO: WARNING: Cannot find tkimg configuration definitions" >&5
6976echo "$as_me: WARNING: Cannot find tkimg configuration definitions" >&2;}
6977	    exit 0
6978	else
6979	    no_tkimg=
6980	    tkimg_BIN_DIR=${ac_cv_c_tkimgconfig}
6981	    { echo "$as_me:$LINENO: result: found $tkimg_BIN_DIR/tkimgConfig.sh" >&5
6982echo "${ECHO_T}found $tkimg_BIN_DIR/tkimgConfig.sh" >&6; }
6983	fi
6984    fi
6985
6986
6987    { echo "$as_me:$LINENO: checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh" >&5
6988echo $ECHO_N "checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh... $ECHO_C" >&6; }
6989
6990    if test -f "${tkimg_BIN_DIR}/tkimgConfig.sh" ; then
6991        { echo "$as_me:$LINENO: result: loading" >&5
6992echo "${ECHO_T}loading" >&6; }
6993	. "${tkimg_BIN_DIR}/tkimgConfig.sh"
6994    else
6995        { echo "$as_me:$LINENO: result: file not found" >&5
6996echo "${ECHO_T}file not found" >&6; }
6997    fi
6998
6999    #
7000    # If the tkimg_BIN_DIR is the build directory (not the install directory),
7001    # then set the common variable name to the value of the build variables.
7002    # For example, the variable tkimg_LIB_SPEC will be set to the value
7003    # of tkimg_BUILD_LIB_SPEC. An extension should make use of tkimg_LIB_SPEC
7004    # instead of tkimg_BUILD_LIB_SPEC since it will work with both an
7005    # installed and uninstalled version of Tcl.
7006    #
7007
7008    if test -f "${tkimg_BIN_DIR}/Makefile" ; then
7009	{ echo "$as_me:$LINENO: WARNING: Found Makefile - using build library specs for tkimg" >&5
7010echo "$as_me: WARNING: Found Makefile - using build library specs for tkimg" >&2;}
7011        tkimg_LIB_SPEC=${tkimg_BUILD_LIB_SPEC}
7012        tkimg_STUB_LIB_SPEC=${tkimg_BUILD_STUB_LIB_SPEC}
7013        tkimg_STUB_LIB_PATH=${tkimg_BUILD_STUB_LIB_PATH}
7014    fi
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027    # Allow the caller to prevent this auto-check by specifying any 2nd arg
7028    if test "x" = x; then
7029
7030	# Check both upper and lower-case variants
7031	# If a dev wanted non-stubs libs, this function could take an option
7032	# to not use _STUB in the paths below
7033	if test "x${tkimg_STUB_LIB_SPEC}" = x; then
7034
7035    { echo "$as_me:$LINENO: checking For TKIMG_STUB library for LIBS" >&5
7036echo $ECHO_N "checking For TKIMG_STUB library for LIBS... $ECHO_C" >&6; }
7037    # This simplifies the use of stub libraries by automatically adding
7038    # the stub lib to your path.  Normally this would add to SHLIB_LD_LIBS,
7039    # but this is called before CONFIG_CFLAGS.  More importantly, this adds
7040    # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD.
7041    if test "x${TKIMG_STUB_LIB_SPEC}" != "x" ; then
7042	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
7043
7044    vars="\"`${CYGPATH} ${TKIMG_STUB_LIB_PATH}`\""
7045    for i in $vars; do
7046	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
7047	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
7048	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
7049	fi
7050	PKG_LIBS="$PKG_LIBS $i"
7051    done
7052
7053
7054	    { echo "$as_me:$LINENO: result: using TKIMG_STUB_LIB_PATH ${TKIMG_STUB_LIB_PATH}" >&5
7055echo "${ECHO_T}using TKIMG_STUB_LIB_PATH ${TKIMG_STUB_LIB_PATH}" >&6; }
7056	else
7057
7058    vars="${TKIMG_STUB_LIB_SPEC}"
7059    for i in $vars; do
7060	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
7061	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
7062	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
7063	fi
7064	PKG_LIBS="$PKG_LIBS $i"
7065    done
7066
7067
7068	    { echo "$as_me:$LINENO: result: using TKIMG_STUB_LIB_SPEC ${TKIMG_STUB_LIB_SPEC}" >&5
7069echo "${ECHO_T}using TKIMG_STUB_LIB_SPEC ${TKIMG_STUB_LIB_SPEC}" >&6; }
7070	fi
7071    else
7072	{ echo "$as_me:$LINENO: result: file not found" >&5
7073echo "${ECHO_T}file not found" >&6; }
7074    fi
7075
7076else
7077
7078    { echo "$as_me:$LINENO: checking For tkimg_STUB library for LIBS" >&5
7079echo $ECHO_N "checking For tkimg_STUB library for LIBS... $ECHO_C" >&6; }
7080    # This simplifies the use of stub libraries by automatically adding
7081    # the stub lib to your path.  Normally this would add to SHLIB_LD_LIBS,
7082    # but this is called before CONFIG_CFLAGS.  More importantly, this adds
7083    # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD.
7084    if test "x${tkimg_STUB_LIB_SPEC}" != "x" ; then
7085	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
7086
7087    vars="\"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
7088    for i in $vars; do
7089	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
7090	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
7091	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
7092	fi
7093	PKG_LIBS="$PKG_LIBS $i"
7094    done
7095
7096
7097	    { echo "$as_me:$LINENO: result: using tkimg_STUB_LIB_PATH ${tkimg_STUB_LIB_PATH}" >&5
7098echo "${ECHO_T}using tkimg_STUB_LIB_PATH ${tkimg_STUB_LIB_PATH}" >&6; }
7099	else
7100
7101    vars="${tkimg_STUB_LIB_SPEC}"
7102    for i in $vars; do
7103	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
7104	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
7105	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
7106	fi
7107	PKG_LIBS="$PKG_LIBS $i"
7108    done
7109
7110
7111	    { echo "$as_me:$LINENO: result: using tkimg_STUB_LIB_SPEC ${tkimg_STUB_LIB_SPEC}" >&5
7112echo "${ECHO_T}using tkimg_STUB_LIB_SPEC ${tkimg_STUB_LIB_SPEC}" >&6; }
7113	fi
7114    else
7115	{ echo "$as_me:$LINENO: result: file not found" >&5
7116echo "${ECHO_T}file not found" >&6; }
7117    fi
7118
7119fi
7120
7121
7122fi
7123
7124
7125
7126
7127#--------------------------------------------------------------------
7128# Compute an absolute path to the src directory of module 'tkimg' so
7129# that we are able to find its headers even if they are not installed.
7130#--------------------------------------------------------------------
7131
7132case $tkimg_SRC_DIR in
7133/*)	tkimg_SRC_PATH=$tkimg_SRC_DIR
7134	;;
7135*)	# SRC_DIR relative, splice with BUILD_PATH
7136	tkimg_SRC_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`/$tkimg_SRC_DIR"
7137esac
7138
7139tkimg_BUILD_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`"
7140
7141if test "${TEA_PLATFORM}" = "windows" ; then
7142    tkimg_SRC_PATH="`$CYGPATH $tkimg_SRC_PATH`"
7143    tkimg_BUILD_PATH="`$CYGPATH $tkimg_BUILD_PATH`"
7144fi
7145
7146
7147
7148
7149
7150#-----------------------------------------------------------------------
7151# Specify the C source files to compile in TEA_ADD_SOURCES,
7152# public headers that need to be installed in TEA_ADD_HEADERS,
7153# stub library C source files to compile in TEA_ADD_STUB_SOURCES,
7154# and runtime Tcl library files in TEA_ADD_TCL_SOURCES.
7155# This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS
7156# and PKG_TCL_SOURCES.
7157#-----------------------------------------------------------------------
7158
7159
7160    vars="window.c"
7161    for i in $vars; do
7162	case $i in
7163	    \$*)
7164		# allow $-var names
7165		PKG_SOURCES="$PKG_SOURCES $i"
7166		PKG_OBJECTS="$PKG_OBJECTS $i"
7167		;;
7168	    *)
7169		# check for existence - allows for generic/win/unix VPATH
7170		# To add more dirs here (like 'src'), you have to update VPATH
7171		# in Makefile.in as well
7172		if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
7173		    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
7174		    -a ! -f "${srcdir}/macosx/$i" \
7175		    ; then
7176		    { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
7177echo "$as_me: error: could not find source file '$i'" >&2;}
7178   { (exit 1); exit 1; }; }
7179		fi
7180		PKG_SOURCES="$PKG_SOURCES $i"
7181		# this assumes it is in a VPATH dir
7182		i=`basename $i`
7183		# handle user calling this before or after TEA_SETUP_COMPILER
7184		if test x"${OBJEXT}" != x ; then
7185		    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
7186		else
7187		    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
7188		fi
7189		PKG_OBJECTS="$PKG_OBJECTS $j"
7190		;;
7191	esac
7192    done
7193
7194
7195
7196
7197    vars=""
7198    for i in $vars; do
7199	# check for existence, be strict because it is installed
7200	if test ! -f "${srcdir}/$i" ; then
7201	    { { echo "$as_me:$LINENO: error: could not find header file '${srcdir}/$i'" >&5
7202echo "$as_me: error: could not find header file '${srcdir}/$i'" >&2;}
7203   { (exit 1); exit 1; }; }
7204	fi
7205	PKG_HEADERS="$PKG_HEADERS $i"
7206    done
7207
7208
7209
7210    vars="-I\"`\${CYGPATH} \${tkimg_SRC_PATH}`\""
7211    for i in $vars; do
7212	PKG_INCLUDES="$PKG_INCLUDES $i"
7213    done
7214
7215
7216
7217    vars="-I."
7218    for i in $vars; do
7219	PKG_INCLUDES="$PKG_INCLUDES $i"
7220    done
7221
7222
7223
7224    vars=""
7225    for i in $vars; do
7226	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
7227	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
7228	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
7229	fi
7230	PKG_LIBS="$PKG_LIBS $i"
7231    done
7232
7233
7234
7235    PKG_CFLAGS="$PKG_CFLAGS "
7236
7237
7238
7239    PKG_CFLAGS="$PKG_CFLAGS -DTKIMG_VERSION=\\\"\${tkimg_VERSION}\\\""
7240
7241
7242
7243    vars=""
7244    for i in $vars; do
7245	# check for existence - allows for generic/win/unix VPATH
7246	if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
7247	    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
7248	    -a ! -f "${srcdir}/macosx/$i" \
7249	    ; then
7250	    { { echo "$as_me:$LINENO: error: could not find stub source file '$i'" >&5
7251echo "$as_me: error: could not find stub source file '$i'" >&2;}
7252   { (exit 1); exit 1; }; }
7253	fi
7254	PKG_STUB_SOURCES="$PKG_STUB_SOURCES $i"
7255	# this assumes it is in a VPATH dir
7256	i=`basename $i`
7257	# handle user calling this before or after TEA_SETUP_COMPILER
7258	if test x"${OBJEXT}" != x ; then
7259	    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
7260	else
7261	    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
7262	fi
7263	PKG_STUB_OBJECTS="$PKG_STUB_OBJECTS $j"
7264    done
7265
7266
7267
7268
7269    vars=""
7270    for i in $vars; do
7271	# check for existence, be strict because it is installed
7272	if test ! -f "${srcdir}/$i" ; then
7273	    { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
7274echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
7275   { (exit 1); exit 1; }; }
7276	fi
7277	PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
7278    done
7279
7280
7281
7282PUP="`echo ${PACKAGE_NAME}| tr 'a-z' 'A-Z'`"
7283
7284sed < "`${CYGPATH} ${srcdir}/../init.c`" > "init.c"	\
7285	-e	"s/@CPACKAGE@/${CPACKAGE}/"		\
7286	-e	"s/%PACKAGE%/${PACKAGE_NAME}/"		\
7287	-e	"s/%PACKAGE_UP%/${PUP}/"		\
7288	-e	"s/%PHIMGTYPE%/${PHIMGTYPE}/"
7289
7290# init.c is an included source file, not a source by itself
7291# FUTURE: Do this through AC_OUTPUT!!
7292
7293#--------------------------------------------------------------------
7294# __CHANGE__
7295# Choose which headers you need.  Extension authors should try very
7296# hard to only rely on the Tcl public header files.  Internal headers
7297# contain private data structures and are subject to change without
7298# notice.
7299# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
7300#--------------------------------------------------------------------
7301
7302# This module is special. On windows it requires access to the
7303# internal headers of Tk and thus tcl to implement its functionality
7304# (TkWinReleaseDrawableDC).
7305
7306if test "${TEA_PLATFORM}" = "windows" ; then
7307
7308    { echo "$as_me:$LINENO: checking for Tcl public headers" >&5
7309echo $ECHO_N "checking for Tcl public headers... $ECHO_C" >&6; }
7310
7311
7312# Check whether --with-tclinclude was given.
7313if test "${with_tclinclude+set}" = set; then
7314  withval=$with_tclinclude; with_tclinclude=${withval}
7315fi
7316
7317
7318    if test "${ac_cv_c_tclh+set}" = set; then
7319  echo $ECHO_N "(cached) $ECHO_C" >&6
7320else
7321
7322	# Use the value from --with-tclinclude, if it was given
7323
7324	if test x"${with_tclinclude}" != x ; then
7325	    if test -f "${with_tclinclude}/tcl.h" ; then
7326		ac_cv_c_tclh=${with_tclinclude}
7327	    else
7328		{ { echo "$as_me:$LINENO: error: ${with_tclinclude} directory does not contain tcl.h" >&5
7329echo "$as_me: error: ${with_tclinclude} directory does not contain tcl.h" >&2;}
7330   { (exit 1); exit 1; }; }
7331	    fi
7332	else
7333	    list=""
7334	    if test "`uname -s`" = "Darwin"; then
7335		# If Tcl was built as a framework, attempt to use
7336		# the framework's Headers directory
7337		case ${TCL_DEFS} in
7338		    *TCL_FRAMEWORK*)
7339			list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
7340			;;
7341		esac
7342	    fi
7343
7344	    # Look in the source dir only if Tcl is not installed,
7345	    # and in that situation, look there before installed locations.
7346	    if test -f "${TCL_BIN_DIR}/Makefile" ; then
7347		list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
7348	    fi
7349
7350	    # Check order: pkg --prefix location, Tcl's --prefix location,
7351	    # relative to directory of tclConfig.sh.
7352
7353	    eval "temp_includedir=${includedir}"
7354	    list="$list \
7355		`ls -d ${temp_includedir}        2>/dev/null` \
7356		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
7357		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
7358	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
7359		list="$list /usr/local/include /usr/include"
7360		if test x"${TCL_INCLUDE_SPEC}" != x ; then
7361		    d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
7362		    list="$list `ls -d ${d} 2>/dev/null`"
7363		fi
7364	    fi
7365	    for i in $list ; do
7366		if test -f "$i/tcl.h" ; then
7367		    ac_cv_c_tclh=$i
7368		    break
7369		fi
7370	    done
7371	fi
7372
7373fi
7374
7375
7376    # Print a message based on how we determined the include path
7377
7378    if test x"${ac_cv_c_tclh}" = x ; then
7379	{ { echo "$as_me:$LINENO: error: tcl.h not found.  Please specify its location with --with-tclinclude" >&5
7380echo "$as_me: error: tcl.h not found.  Please specify its location with --with-tclinclude" >&2;}
7381   { (exit 1); exit 1; }; }
7382    else
7383	{ echo "$as_me:$LINENO: result: ${ac_cv_c_tclh}" >&5
7384echo "${ECHO_T}${ac_cv_c_tclh}" >&6; }
7385    fi
7386
7387    # Convert to a native path and substitute into the output files.
7388
7389    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
7390
7391    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
7392
7393
7394
7395
7396    # Allow for --with-tclinclude to take effect and define ${ac_cv_c_tclh}
7397
7398    { echo "$as_me:$LINENO: checking for Tcl private include files" >&5
7399echo $ECHO_N "checking for Tcl private include files... $ECHO_C" >&6; }
7400
7401    TCL_SRC_DIR_NATIVE=`${CYGPATH} ${TCL_SRC_DIR}`
7402    TCL_TOP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}\"
7403
7404    # Check to see if tcl<Plat>Port.h isn't already with the public headers
7405    # Don't look for tclInt.h because that resides with tcl.h in the core
7406    # sources, but the <plat>Port headers are in a different directory
7407    if test "${TEA_PLATFORM}" = "windows" -a \
7408	-f "${ac_cv_c_tclh}/tclWinPort.h"; then
7409	result="private headers found with public headers"
7410    elif test "${TEA_PLATFORM}" = "unix" -a \
7411	-f "${ac_cv_c_tclh}/tclUnixPort.h"; then
7412	result="private headers found with public headers"
7413    else
7414	TCL_GENERIC_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/generic\"
7415	if test "${TEA_PLATFORM}" = "windows"; then
7416	    TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/win\"
7417	else
7418	    TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/unix\"
7419	fi
7420	# Overwrite the previous TCL_INCLUDES as this should capture both
7421	# public and private headers in the same set.
7422	# We want to ensure these are substituted so as not to require
7423	# any *_NATIVE vars be defined in the Makefile
7424	TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
7425	if test "`uname -s`" = "Darwin"; then
7426            # If Tcl was built as a framework, attempt to use
7427            # the framework's Headers and PrivateHeaders directories
7428            case ${TCL_DEFS} in
7429	    	*TCL_FRAMEWORK*)
7430		    if test -d "${TCL_BIN_DIR}/Headers" -a \
7431			    -d "${TCL_BIN_DIR}/PrivateHeaders"; then
7432			TCL_INCLUDES="-I\"${TCL_BIN_DIR}/Headers\" -I\"${TCL_BIN_DIR}/PrivateHeaders\" ${TCL_INCLUDES}"
7433		    else
7434			TCL_INCLUDES="${TCL_INCLUDES} ${TCL_INCLUDE_SPEC} `echo "${TCL_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"
7435		    fi
7436	            ;;
7437	    esac
7438	    result="Using ${TCL_INCLUDES}"
7439	else
7440	    if test ! -f "${TCL_SRC_DIR}/generic/tclInt.h" ; then
7441		{ { echo "$as_me:$LINENO: error: Cannot find private header tclInt.h in ${TCL_SRC_DIR}" >&5
7442echo "$as_me: error: Cannot find private header tclInt.h in ${TCL_SRC_DIR}" >&2;}
7443   { (exit 1); exit 1; }; }
7444	    fi
7445	    result="Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}"
7446	fi
7447    fi
7448
7449
7450
7451
7452    { echo "$as_me:$LINENO: result: ${result}" >&5
7453echo "${ECHO_T}${result}" >&6; }
7454
7455
7456    { echo "$as_me:$LINENO: checking for Tk public headers" >&5
7457echo $ECHO_N "checking for Tk public headers... $ECHO_C" >&6; }
7458
7459
7460# Check whether --with-tkinclude was given.
7461if test "${with_tkinclude+set}" = set; then
7462  withval=$with_tkinclude; with_tkinclude=${withval}
7463fi
7464
7465
7466    if test "${ac_cv_c_tkh+set}" = set; then
7467  echo $ECHO_N "(cached) $ECHO_C" >&6
7468else
7469
7470	# Use the value from --with-tkinclude, if it was given
7471
7472	if test x"${with_tkinclude}" != x ; then
7473	    if test -f "${with_tkinclude}/tk.h" ; then
7474		ac_cv_c_tkh=${with_tkinclude}
7475	    else
7476		{ { echo "$as_me:$LINENO: error: ${with_tkinclude} directory does not contain tk.h" >&5
7477echo "$as_me: error: ${with_tkinclude} directory does not contain tk.h" >&2;}
7478   { (exit 1); exit 1; }; }
7479	    fi
7480	else
7481	    list=""
7482	    if test "`uname -s`" = "Darwin"; then
7483		# If Tk was built as a framework, attempt to use
7484		# the framework's Headers directory.
7485		case ${TK_DEFS} in
7486		    *TK_FRAMEWORK*)
7487			list="`ls -d ${TK_BIN_DIR}/Headers 2>/dev/null`"
7488			;;
7489		esac
7490	    fi
7491
7492	    # Look in the source dir only if Tk is not installed,
7493	    # and in that situation, look there before installed locations.
7494	    if test -f "${TK_BIN_DIR}/Makefile" ; then
7495		list="$list `ls -d ${TK_SRC_DIR}/generic 2>/dev/null`"
7496	    fi
7497
7498	    # Check order: pkg --prefix location, Tk's --prefix location,
7499	    # relative to directory of tkConfig.sh, Tcl's --prefix location,
7500	    # relative to directory of tclConfig.sh.
7501
7502	    eval "temp_includedir=${includedir}"
7503	    list="$list \
7504		`ls -d ${temp_includedir}        2>/dev/null` \
7505		`ls -d ${TK_PREFIX}/include      2>/dev/null` \
7506		`ls -d ${TK_BIN_DIR}/../include  2>/dev/null` \
7507		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
7508		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
7509	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
7510		list="$list /usr/local/include /usr/include"
7511		if test x"${TK_INCLUDE_SPEC}" != x ; then
7512		    d=`echo "${TK_INCLUDE_SPEC}" | sed -e 's/^-I//'`
7513		    list="$list `ls -d ${d} 2>/dev/null`"
7514		fi
7515	    fi
7516	    for i in $list ; do
7517		if test -f "$i/tk.h" ; then
7518		    ac_cv_c_tkh=$i
7519		    break
7520		fi
7521	    done
7522	fi
7523
7524fi
7525
7526
7527    # Print a message based on how we determined the include path
7528
7529    if test x"${ac_cv_c_tkh}" = x ; then
7530	{ { echo "$as_me:$LINENO: error: tk.h not found.  Please specify its location with --with-tkinclude" >&5
7531echo "$as_me: error: tk.h not found.  Please specify its location with --with-tkinclude" >&2;}
7532   { (exit 1); exit 1; }; }
7533    else
7534	{ echo "$as_me:$LINENO: result: ${ac_cv_c_tkh}" >&5
7535echo "${ECHO_T}${ac_cv_c_tkh}" >&6; }
7536    fi
7537
7538    # Convert to a native path and substitute into the output files.
7539
7540    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}`
7541
7542    TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
7543
7544
7545
7546    if test "${TEA_WINDOWINGSYSTEM}" != "x11"; then
7547	# On Windows and Aqua, we need the X compat headers
7548	{ echo "$as_me:$LINENO: checking for X11 header files" >&5
7549echo $ECHO_N "checking for X11 header files... $ECHO_C" >&6; }
7550	if test ! -r "${INCLUDE_DIR_NATIVE}/X11/Xlib.h"; then
7551	    INCLUDE_DIR_NATIVE="`${CYGPATH} ${TK_SRC_DIR}/xlib`"
7552	    TK_XINCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
7553
7554	fi
7555	{ echo "$as_me:$LINENO: result: ${INCLUDE_DIR_NATIVE}" >&5
7556echo "${ECHO_T}${INCLUDE_DIR_NATIVE}" >&6; }
7557    fi
7558
7559
7560    # Allow for --with-tkinclude to take effect and define ${ac_cv_c_tkh}
7561
7562    { echo "$as_me:$LINENO: checking for Tk private include files" >&5
7563echo $ECHO_N "checking for Tk private include files... $ECHO_C" >&6; }
7564
7565    TK_SRC_DIR_NATIVE=`${CYGPATH} ${TK_SRC_DIR}`
7566    TK_TOP_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}\"
7567
7568    # Check to see if tk<Plat>Port.h isn't already with the public headers
7569    # Don't look for tkInt.h because that resides with tk.h in the core
7570    # sources, but the <plat>Port headers are in a different directory
7571    if test "${TEA_PLATFORM}" = "windows" -a \
7572	-f "${ac_cv_c_tkh}/tkWinPort.h"; then
7573	result="private headers found with public headers"
7574    elif test "${TEA_PLATFORM}" = "unix" -a \
7575	-f "${ac_cv_c_tkh}/tkUnixPort.h"; then
7576	result="private headers found with public headers"
7577    else
7578	TK_GENERIC_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/generic\"
7579	TK_XLIB_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/xlib\"
7580	if test "${TEA_PLATFORM}" = "windows"; then
7581	    TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/win\"
7582	else
7583	    TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/unix\"
7584	fi
7585	# Overwrite the previous TK_INCLUDES as this should capture both
7586	# public and private headers in the same set.
7587	# We want to ensure these are substituted so as not to require
7588	# any *_NATIVE vars be defined in the Makefile
7589	TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}"
7590	# Detect and add ttk subdir
7591	if test -d "${TK_SRC_DIR}/generic/ttk"; then
7592	   TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/generic/ttk\""
7593	fi
7594	if test "${TEA_WINDOWINGSYSTEM}" != "x11"; then
7595	   TK_INCLUDES="${TK_INCLUDES} -I${TK_XLIB_DIR_NATIVE}"
7596	fi
7597	if test "${TEA_WINDOWINGSYSTEM}" = "aqua"; then
7598	   TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/macosx\""
7599	fi
7600	if test "`uname -s`" = "Darwin"; then
7601	    # If Tk was built as a framework, attempt to use
7602	    # the framework's Headers and PrivateHeaders directories
7603	    case ${TK_DEFS} in
7604		*TK_FRAMEWORK*)
7605			if test -d "${TK_BIN_DIR}/Headers" -a \
7606				-d "${TK_BIN_DIR}/PrivateHeaders"; then
7607			    TK_INCLUDES="-I\"${TK_BIN_DIR}/Headers\" -I\"${TK_BIN_DIR}/PrivateHeaders\" ${TK_INCLUDES}"
7608			else
7609			    TK_INCLUDES="${TK_INCLUDES} ${TK_INCLUDE_SPEC} `echo "${TK_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"
7610			fi
7611			;;
7612	    esac
7613	    result="Using ${TK_INCLUDES}"
7614	else
7615	    if test ! -f "${TK_SRC_DIR}/generic/tkInt.h" ; then
7616	       { { echo "$as_me:$LINENO: error: Cannot find private header tkInt.h in ${TK_SRC_DIR}" >&5
7617echo "$as_me: error: Cannot find private header tkInt.h in ${TK_SRC_DIR}" >&2;}
7618   { (exit 1); exit 1; }; }
7619	    fi
7620	    result="Using srcdir found in tkConfig.sh: ${TK_SRC_DIR}"
7621	fi
7622    fi
7623
7624
7625
7626
7627
7628    { echo "$as_me:$LINENO: result: ${result}" >&5
7629echo "${ECHO_T}${result}" >&6; }
7630
7631else
7632
7633    { echo "$as_me:$LINENO: checking for Tcl public headers" >&5
7634echo $ECHO_N "checking for Tcl public headers... $ECHO_C" >&6; }
7635
7636
7637# Check whether --with-tclinclude was given.
7638if test "${with_tclinclude+set}" = set; then
7639  withval=$with_tclinclude; with_tclinclude=${withval}
7640fi
7641
7642
7643    if test "${ac_cv_c_tclh+set}" = set; then
7644  echo $ECHO_N "(cached) $ECHO_C" >&6
7645else
7646
7647	# Use the value from --with-tclinclude, if it was given
7648
7649	if test x"${with_tclinclude}" != x ; then
7650	    if test -f "${with_tclinclude}/tcl.h" ; then
7651		ac_cv_c_tclh=${with_tclinclude}
7652	    else
7653		{ { echo "$as_me:$LINENO: error: ${with_tclinclude} directory does not contain tcl.h" >&5
7654echo "$as_me: error: ${with_tclinclude} directory does not contain tcl.h" >&2;}
7655   { (exit 1); exit 1; }; }
7656	    fi
7657	else
7658	    list=""
7659	    if test "`uname -s`" = "Darwin"; then
7660		# If Tcl was built as a framework, attempt to use
7661		# the framework's Headers directory
7662		case ${TCL_DEFS} in
7663		    *TCL_FRAMEWORK*)
7664			list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
7665			;;
7666		esac
7667	    fi
7668
7669	    # Look in the source dir only if Tcl is not installed,
7670	    # and in that situation, look there before installed locations.
7671	    if test -f "${TCL_BIN_DIR}/Makefile" ; then
7672		list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
7673	    fi
7674
7675	    # Check order: pkg --prefix location, Tcl's --prefix location,
7676	    # relative to directory of tclConfig.sh.
7677
7678	    eval "temp_includedir=${includedir}"
7679	    list="$list \
7680		`ls -d ${temp_includedir}        2>/dev/null` \
7681		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
7682		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
7683	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
7684		list="$list /usr/local/include /usr/include"
7685		if test x"${TCL_INCLUDE_SPEC}" != x ; then
7686		    d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
7687		    list="$list `ls -d ${d} 2>/dev/null`"
7688		fi
7689	    fi
7690	    for i in $list ; do
7691		if test -f "$i/tcl.h" ; then
7692		    ac_cv_c_tclh=$i
7693		    break
7694		fi
7695	    done
7696	fi
7697
7698fi
7699
7700
7701    # Print a message based on how we determined the include path
7702
7703    if test x"${ac_cv_c_tclh}" = x ; then
7704	{ { echo "$as_me:$LINENO: error: tcl.h not found.  Please specify its location with --with-tclinclude" >&5
7705echo "$as_me: error: tcl.h not found.  Please specify its location with --with-tclinclude" >&2;}
7706   { (exit 1); exit 1; }; }
7707    else
7708	{ echo "$as_me:$LINENO: result: ${ac_cv_c_tclh}" >&5
7709echo "${ECHO_T}${ac_cv_c_tclh}" >&6; }
7710    fi
7711
7712    # Convert to a native path and substitute into the output files.
7713
7714    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
7715
7716    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
7717
7718
7719
7720
7721    { echo "$as_me:$LINENO: checking for Tk public headers" >&5
7722echo $ECHO_N "checking for Tk public headers... $ECHO_C" >&6; }
7723
7724
7725# Check whether --with-tkinclude was given.
7726if test "${with_tkinclude+set}" = set; then
7727  withval=$with_tkinclude; with_tkinclude=${withval}
7728fi
7729
7730
7731    if test "${ac_cv_c_tkh+set}" = set; then
7732  echo $ECHO_N "(cached) $ECHO_C" >&6
7733else
7734
7735	# Use the value from --with-tkinclude, if it was given
7736
7737	if test x"${with_tkinclude}" != x ; then
7738	    if test -f "${with_tkinclude}/tk.h" ; then
7739		ac_cv_c_tkh=${with_tkinclude}
7740	    else
7741		{ { echo "$as_me:$LINENO: error: ${with_tkinclude} directory does not contain tk.h" >&5
7742echo "$as_me: error: ${with_tkinclude} directory does not contain tk.h" >&2;}
7743   { (exit 1); exit 1; }; }
7744	    fi
7745	else
7746	    list=""
7747	    if test "`uname -s`" = "Darwin"; then
7748		# If Tk was built as a framework, attempt to use
7749		# the framework's Headers directory.
7750		case ${TK_DEFS} in
7751		    *TK_FRAMEWORK*)
7752			list="`ls -d ${TK_BIN_DIR}/Headers 2>/dev/null`"
7753			;;
7754		esac
7755	    fi
7756
7757	    # Look in the source dir only if Tk is not installed,
7758	    # and in that situation, look there before installed locations.
7759	    if test -f "${TK_BIN_DIR}/Makefile" ; then
7760		list="$list `ls -d ${TK_SRC_DIR}/generic 2>/dev/null`"
7761	    fi
7762
7763	    # Check order: pkg --prefix location, Tk's --prefix location,
7764	    # relative to directory of tkConfig.sh, Tcl's --prefix location,
7765	    # relative to directory of tclConfig.sh.
7766
7767	    eval "temp_includedir=${includedir}"
7768	    list="$list \
7769		`ls -d ${temp_includedir}        2>/dev/null` \
7770		`ls -d ${TK_PREFIX}/include      2>/dev/null` \
7771		`ls -d ${TK_BIN_DIR}/../include  2>/dev/null` \
7772		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
7773		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
7774	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
7775		list="$list /usr/local/include /usr/include"
7776		if test x"${TK_INCLUDE_SPEC}" != x ; then
7777		    d=`echo "${TK_INCLUDE_SPEC}" | sed -e 's/^-I//'`
7778		    list="$list `ls -d ${d} 2>/dev/null`"
7779		fi
7780	    fi
7781	    for i in $list ; do
7782		if test -f "$i/tk.h" ; then
7783		    ac_cv_c_tkh=$i
7784		    break
7785		fi
7786	    done
7787	fi
7788
7789fi
7790
7791
7792    # Print a message based on how we determined the include path
7793
7794    if test x"${ac_cv_c_tkh}" = x ; then
7795	{ { echo "$as_me:$LINENO: error: tk.h not found.  Please specify its location with --with-tkinclude" >&5
7796echo "$as_me: error: tk.h not found.  Please specify its location with --with-tkinclude" >&2;}
7797   { (exit 1); exit 1; }; }
7798    else
7799	{ echo "$as_me:$LINENO: result: ${ac_cv_c_tkh}" >&5
7800echo "${ECHO_T}${ac_cv_c_tkh}" >&6; }
7801    fi
7802
7803    # Convert to a native path and substitute into the output files.
7804
7805    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}`
7806
7807    TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
7808
7809
7810
7811    if test "${TEA_WINDOWINGSYSTEM}" != "x11"; then
7812	# On Windows and Aqua, we need the X compat headers
7813	{ echo "$as_me:$LINENO: checking for X11 header files" >&5
7814echo $ECHO_N "checking for X11 header files... $ECHO_C" >&6; }
7815	if test ! -r "${INCLUDE_DIR_NATIVE}/X11/Xlib.h"; then
7816	    INCLUDE_DIR_NATIVE="`${CYGPATH} ${TK_SRC_DIR}/xlib`"
7817	    TK_XINCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
7818
7819	fi
7820	{ echo "$as_me:$LINENO: result: ${INCLUDE_DIR_NATIVE}" >&5
7821echo "${ECHO_T}${INCLUDE_DIR_NATIVE}" >&6; }
7822    fi
7823
7824fi
7825
7826#--------------------------------------------------------------------
7827# A few miscellaneous platform-specific items:
7828#
7829# Windows creates a few extra files that need to be cleaned up.
7830# We can add more files to clean if our extension creates any extra
7831# files in the future.
7832#
7833# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
7834# These will be appended to the current set of compiler flags for
7835# your system.
7836#--------------------------------------------------------------------
7837
7838if test "${TEA_PLATFORM}" = "windows" ; then
7839    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch init.c"
7840else
7841    CLEANFILES="init.c"
7842fi
7843
7844
7845#--------------------------------------------------------------------
7846# Check whether --enable-threads or --disable-threads was given.
7847# So far only Tcl responds to this one.
7848#--------------------------------------------------------------------
7849
7850
7851    # Check whether --enable-threads was given.
7852if test "${enable_threads+set}" = set; then
7853  enableval=$enable_threads; tcl_ok=$enableval
7854else
7855  tcl_ok=yes
7856fi
7857
7858
7859    if test "${enable_threads+set}" = set; then
7860	enableval="$enable_threads"
7861	tcl_ok=$enableval
7862    else
7863	tcl_ok=yes
7864    fi
7865
7866    if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
7867	TCL_THREADS=1
7868
7869	if test "${TEA_PLATFORM}" != "windows" ; then
7870	    # We are always OK on Windows, so check what this platform wants:
7871
7872	    # USE_THREAD_ALLOC tells us to try the special thread-based
7873	    # allocator that significantly reduces lock contention
7874
7875cat >>confdefs.h <<\_ACEOF
7876#define USE_THREAD_ALLOC 1
7877_ACEOF
7878
7879
7880cat >>confdefs.h <<\_ACEOF
7881#define _REENTRANT 1
7882_ACEOF
7883
7884	    if test "`uname -s`" = "SunOS" ; then
7885
7886cat >>confdefs.h <<\_ACEOF
7887#define _POSIX_PTHREAD_SEMANTICS 1
7888_ACEOF
7889
7890	    fi
7891
7892cat >>confdefs.h <<\_ACEOF
7893#define _THREAD_SAFE 1
7894_ACEOF
7895
7896	    { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5
7897echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6; }
7898if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then
7899  echo $ECHO_N "(cached) $ECHO_C" >&6
7900else
7901  ac_check_lib_save_LIBS=$LIBS
7902LIBS="-lpthread  $LIBS"
7903cat >conftest.$ac_ext <<_ACEOF
7904/* confdefs.h.  */
7905_ACEOF
7906cat confdefs.h >>conftest.$ac_ext
7907cat >>conftest.$ac_ext <<_ACEOF
7908/* end confdefs.h.  */
7909
7910/* Override any GCC internal prototype to avoid an error.
7911   Use char because int might match the return type of a GCC
7912   builtin and then its argument prototype would still apply.  */
7913#ifdef __cplusplus
7914extern "C"
7915#endif
7916char pthread_mutex_init ();
7917int
7918main ()
7919{
7920return pthread_mutex_init ();
7921  ;
7922  return 0;
7923}
7924_ACEOF
7925rm -f conftest.$ac_objext conftest$ac_exeext
7926if { (ac_try="$ac_link"
7927case "(($ac_try" in
7928  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7929  *) ac_try_echo=$ac_try;;
7930esac
7931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7932  (eval "$ac_link") 2>conftest.er1
7933  ac_status=$?
7934  grep -v '^ *+' conftest.er1 >conftest.err
7935  rm -f conftest.er1
7936  cat conftest.err >&5
7937  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7938  (exit $ac_status); } && {
7939	 test -z "$ac_c_werror_flag" ||
7940	 test ! -s conftest.err
7941       } && test -s conftest$ac_exeext &&
7942       $as_test_x conftest$ac_exeext; then
7943  ac_cv_lib_pthread_pthread_mutex_init=yes
7944else
7945  echo "$as_me: failed program was:" >&5
7946sed 's/^/| /' conftest.$ac_ext >&5
7947
7948	ac_cv_lib_pthread_pthread_mutex_init=no
7949fi
7950
7951rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7952      conftest$ac_exeext conftest.$ac_ext
7953LIBS=$ac_check_lib_save_LIBS
7954fi
7955{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5
7956echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6; }
7957if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then
7958  tcl_ok=yes
7959else
7960  tcl_ok=no
7961fi
7962
7963	    if test "$tcl_ok" = "no"; then
7964		# Check a little harder for __pthread_mutex_init in the same
7965		# library, as some systems hide it there until pthread.h is
7966		# defined.  We could alternatively do an AC_TRY_COMPILE with
7967		# pthread.h, but that will work with libpthread really doesn't
7968		# exist, like AIX 4.2.  [Bug: 4359]
7969		{ echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5
7970echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6; }
7971if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then
7972  echo $ECHO_N "(cached) $ECHO_C" >&6
7973else
7974  ac_check_lib_save_LIBS=$LIBS
7975LIBS="-lpthread  $LIBS"
7976cat >conftest.$ac_ext <<_ACEOF
7977/* confdefs.h.  */
7978_ACEOF
7979cat confdefs.h >>conftest.$ac_ext
7980cat >>conftest.$ac_ext <<_ACEOF
7981/* end confdefs.h.  */
7982
7983/* Override any GCC internal prototype to avoid an error.
7984   Use char because int might match the return type of a GCC
7985   builtin and then its argument prototype would still apply.  */
7986#ifdef __cplusplus
7987extern "C"
7988#endif
7989char __pthread_mutex_init ();
7990int
7991main ()
7992{
7993return __pthread_mutex_init ();
7994  ;
7995  return 0;
7996}
7997_ACEOF
7998rm -f conftest.$ac_objext conftest$ac_exeext
7999if { (ac_try="$ac_link"
8000case "(($ac_try" in
8001  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8002  *) ac_try_echo=$ac_try;;
8003esac
8004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8005  (eval "$ac_link") 2>conftest.er1
8006  ac_status=$?
8007  grep -v '^ *+' conftest.er1 >conftest.err
8008  rm -f conftest.er1
8009  cat conftest.err >&5
8010  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8011  (exit $ac_status); } && {
8012	 test -z "$ac_c_werror_flag" ||
8013	 test ! -s conftest.err
8014       } && test -s conftest$ac_exeext &&
8015       $as_test_x conftest$ac_exeext; then
8016  ac_cv_lib_pthread___pthread_mutex_init=yes
8017else
8018  echo "$as_me: failed program was:" >&5
8019sed 's/^/| /' conftest.$ac_ext >&5
8020
8021	ac_cv_lib_pthread___pthread_mutex_init=no
8022fi
8023
8024rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8025      conftest$ac_exeext conftest.$ac_ext
8026LIBS=$ac_check_lib_save_LIBS
8027fi
8028{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5
8029echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6; }
8030if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then
8031  tcl_ok=yes
8032else
8033  tcl_ok=no
8034fi
8035
8036	    fi
8037
8038	    if test "$tcl_ok" = "yes"; then
8039		# The space is needed
8040		THREADS_LIBS=" -lpthread"
8041	    else
8042		{ echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5
8043echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6; }
8044if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then
8045  echo $ECHO_N "(cached) $ECHO_C" >&6
8046else
8047  ac_check_lib_save_LIBS=$LIBS
8048LIBS="-lpthreads  $LIBS"
8049cat >conftest.$ac_ext <<_ACEOF
8050/* confdefs.h.  */
8051_ACEOF
8052cat confdefs.h >>conftest.$ac_ext
8053cat >>conftest.$ac_ext <<_ACEOF
8054/* end confdefs.h.  */
8055
8056/* Override any GCC internal prototype to avoid an error.
8057   Use char because int might match the return type of a GCC
8058   builtin and then its argument prototype would still apply.  */
8059#ifdef __cplusplus
8060extern "C"
8061#endif
8062char pthread_mutex_init ();
8063int
8064main ()
8065{
8066return pthread_mutex_init ();
8067  ;
8068  return 0;
8069}
8070_ACEOF
8071rm -f conftest.$ac_objext conftest$ac_exeext
8072if { (ac_try="$ac_link"
8073case "(($ac_try" in
8074  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8075  *) ac_try_echo=$ac_try;;
8076esac
8077eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8078  (eval "$ac_link") 2>conftest.er1
8079  ac_status=$?
8080  grep -v '^ *+' conftest.er1 >conftest.err
8081  rm -f conftest.er1
8082  cat conftest.err >&5
8083  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8084  (exit $ac_status); } && {
8085	 test -z "$ac_c_werror_flag" ||
8086	 test ! -s conftest.err
8087       } && test -s conftest$ac_exeext &&
8088       $as_test_x conftest$ac_exeext; then
8089  ac_cv_lib_pthreads_pthread_mutex_init=yes
8090else
8091  echo "$as_me: failed program was:" >&5
8092sed 's/^/| /' conftest.$ac_ext >&5
8093
8094	ac_cv_lib_pthreads_pthread_mutex_init=no
8095fi
8096
8097rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8098      conftest$ac_exeext conftest.$ac_ext
8099LIBS=$ac_check_lib_save_LIBS
8100fi
8101{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5
8102echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6; }
8103if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then
8104  tcl_ok=yes
8105else
8106  tcl_ok=no
8107fi
8108
8109		if test "$tcl_ok" = "yes"; then
8110		    # The space is needed
8111		    THREADS_LIBS=" -lpthreads"
8112		else
8113		    { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5
8114echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6; }
8115if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then
8116  echo $ECHO_N "(cached) $ECHO_C" >&6
8117else
8118  ac_check_lib_save_LIBS=$LIBS
8119LIBS="-lc  $LIBS"
8120cat >conftest.$ac_ext <<_ACEOF
8121/* confdefs.h.  */
8122_ACEOF
8123cat confdefs.h >>conftest.$ac_ext
8124cat >>conftest.$ac_ext <<_ACEOF
8125/* end confdefs.h.  */
8126
8127/* Override any GCC internal prototype to avoid an error.
8128   Use char because int might match the return type of a GCC
8129   builtin and then its argument prototype would still apply.  */
8130#ifdef __cplusplus
8131extern "C"
8132#endif
8133char pthread_mutex_init ();
8134int
8135main ()
8136{
8137return pthread_mutex_init ();
8138  ;
8139  return 0;
8140}
8141_ACEOF
8142rm -f conftest.$ac_objext conftest$ac_exeext
8143if { (ac_try="$ac_link"
8144case "(($ac_try" in
8145  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8146  *) ac_try_echo=$ac_try;;
8147esac
8148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8149  (eval "$ac_link") 2>conftest.er1
8150  ac_status=$?
8151  grep -v '^ *+' conftest.er1 >conftest.err
8152  rm -f conftest.er1
8153  cat conftest.err >&5
8154  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8155  (exit $ac_status); } && {
8156	 test -z "$ac_c_werror_flag" ||
8157	 test ! -s conftest.err
8158       } && test -s conftest$ac_exeext &&
8159       $as_test_x conftest$ac_exeext; then
8160  ac_cv_lib_c_pthread_mutex_init=yes
8161else
8162  echo "$as_me: failed program was:" >&5
8163sed 's/^/| /' conftest.$ac_ext >&5
8164
8165	ac_cv_lib_c_pthread_mutex_init=no
8166fi
8167
8168rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8169      conftest$ac_exeext conftest.$ac_ext
8170LIBS=$ac_check_lib_save_LIBS
8171fi
8172{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5
8173echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6; }
8174if test $ac_cv_lib_c_pthread_mutex_init = yes; then
8175  tcl_ok=yes
8176else
8177  tcl_ok=no
8178fi
8179
8180		    if test "$tcl_ok" = "no"; then
8181			{ echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5
8182echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6; }
8183if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then
8184  echo $ECHO_N "(cached) $ECHO_C" >&6
8185else
8186  ac_check_lib_save_LIBS=$LIBS
8187LIBS="-lc_r  $LIBS"
8188cat >conftest.$ac_ext <<_ACEOF
8189/* confdefs.h.  */
8190_ACEOF
8191cat confdefs.h >>conftest.$ac_ext
8192cat >>conftest.$ac_ext <<_ACEOF
8193/* end confdefs.h.  */
8194
8195/* Override any GCC internal prototype to avoid an error.
8196   Use char because int might match the return type of a GCC
8197   builtin and then its argument prototype would still apply.  */
8198#ifdef __cplusplus
8199extern "C"
8200#endif
8201char pthread_mutex_init ();
8202int
8203main ()
8204{
8205return pthread_mutex_init ();
8206  ;
8207  return 0;
8208}
8209_ACEOF
8210rm -f conftest.$ac_objext conftest$ac_exeext
8211if { (ac_try="$ac_link"
8212case "(($ac_try" in
8213  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8214  *) ac_try_echo=$ac_try;;
8215esac
8216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8217  (eval "$ac_link") 2>conftest.er1
8218  ac_status=$?
8219  grep -v '^ *+' conftest.er1 >conftest.err
8220  rm -f conftest.er1
8221  cat conftest.err >&5
8222  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8223  (exit $ac_status); } && {
8224	 test -z "$ac_c_werror_flag" ||
8225	 test ! -s conftest.err
8226       } && test -s conftest$ac_exeext &&
8227       $as_test_x conftest$ac_exeext; then
8228  ac_cv_lib_c_r_pthread_mutex_init=yes
8229else
8230  echo "$as_me: failed program was:" >&5
8231sed 's/^/| /' conftest.$ac_ext >&5
8232
8233	ac_cv_lib_c_r_pthread_mutex_init=no
8234fi
8235
8236rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8237      conftest$ac_exeext conftest.$ac_ext
8238LIBS=$ac_check_lib_save_LIBS
8239fi
8240{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5
8241echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6; }
8242if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then
8243  tcl_ok=yes
8244else
8245  tcl_ok=no
8246fi
8247
8248			if test "$tcl_ok" = "yes"; then
8249			    # The space is needed
8250			    THREADS_LIBS=" -pthread"
8251			else
8252			    TCL_THREADS=0
8253			    { echo "$as_me:$LINENO: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&5
8254echo "$as_me: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&2;}
8255			fi
8256		    fi
8257		fi
8258	    fi
8259	fi
8260    else
8261	TCL_THREADS=0
8262    fi
8263    # Do checking message here to not mess up interleaved configure output
8264    { echo "$as_me:$LINENO: checking for building with threads" >&5
8265echo $ECHO_N "checking for building with threads... $ECHO_C" >&6; }
8266    if test "${TCL_THREADS}" = 1; then
8267
8268cat >>confdefs.h <<\_ACEOF
8269#define TCL_THREADS 1
8270_ACEOF
8271
8272	{ echo "$as_me:$LINENO: result: yes (default)" >&5
8273echo "${ECHO_T}yes (default)" >&6; }
8274    else
8275	{ echo "$as_me:$LINENO: result: no" >&5
8276echo "${ECHO_T}no" >&6; }
8277    fi
8278    # TCL_THREADS sanity checking.  See if our request for building with
8279    # threads is the same as the way Tcl was built.  If not, warn the user.
8280    case ${TCL_DEFS} in
8281	*THREADS=1*)
8282	    if test "${TCL_THREADS}" = "0"; then
8283		{ echo "$as_me:$LINENO: WARNING:
8284    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
8285    that IS thread-enabled.  It is recommended to use --enable-threads." >&5
8286echo "$as_me: WARNING:
8287    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
8288    that IS thread-enabled.  It is recommended to use --enable-threads." >&2;}
8289	    fi
8290	    ;;
8291	*)
8292	    if test "${TCL_THREADS}" = "1"; then
8293		{ echo "$as_me:$LINENO: WARNING:
8294    --enable-threads requested, but building against a Tcl that is NOT
8295    thread-enabled.  This is an OK configuration that will also run in
8296    a thread-enabled core." >&5
8297echo "$as_me: WARNING:
8298    --enable-threads requested, but building against a Tcl that is NOT
8299    thread-enabled.  This is an OK configuration that will also run in
8300    a thread-enabled core." >&2;}
8301	    fi
8302	    ;;
8303    esac
8304
8305
8306
8307#--------------------------------------------------------------------
8308# The statement below defines a collection of symbols related to
8309# building as a shared library instead of a static library.
8310#--------------------------------------------------------------------
8311
8312
8313    { echo "$as_me:$LINENO: checking how to build libraries" >&5
8314echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6; }
8315    # Check whether --enable-shared was given.
8316if test "${enable_shared+set}" = set; then
8317  enableval=$enable_shared; tcl_ok=$enableval
8318else
8319  tcl_ok=yes
8320fi
8321
8322
8323    if test "${enable_shared+set}" = set; then
8324	enableval="$enable_shared"
8325	tcl_ok=$enableval
8326    else
8327	tcl_ok=yes
8328    fi
8329
8330    if test "$tcl_ok" = "yes" ; then
8331	{ echo "$as_me:$LINENO: result: shared" >&5
8332echo "${ECHO_T}shared" >&6; }
8333	SHARED_BUILD=1
8334    else
8335	{ echo "$as_me:$LINENO: result: static" >&5
8336echo "${ECHO_T}static" >&6; }
8337	SHARED_BUILD=0
8338
8339cat >>confdefs.h <<\_ACEOF
8340#define STATIC_BUILD 1
8341_ACEOF
8342
8343    fi
8344
8345
8346
8347#--------------------------------------------------------------------
8348# This macro figures out what flags to use with the compiler/linker
8349# when building shared/static debug/optimized objects.  This information
8350# can be taken from the tclConfig.sh file, but this figures it all out.
8351#--------------------------------------------------------------------
8352
8353
8354
8355
8356    # Step 0.a: Enable 64 bit support?
8357
8358    { echo "$as_me:$LINENO: checking if 64bit support is requested" >&5
8359echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6; }
8360    # Check whether --enable-64bit was given.
8361if test "${enable_64bit+set}" = set; then
8362  enableval=$enable_64bit; do64bit=$enableval
8363else
8364  do64bit=no
8365fi
8366
8367    { echo "$as_me:$LINENO: result: $do64bit" >&5
8368echo "${ECHO_T}$do64bit" >&6; }
8369
8370    # Step 0.b: Enable Solaris 64 bit VIS support?
8371
8372    { echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5
8373echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6; }
8374    # Check whether --enable-64bit-vis was given.
8375if test "${enable_64bit_vis+set}" = set; then
8376  enableval=$enable_64bit_vis; do64bitVIS=$enableval
8377else
8378  do64bitVIS=no
8379fi
8380
8381    { echo "$as_me:$LINENO: result: $do64bitVIS" >&5
8382echo "${ECHO_T}$do64bitVIS" >&6; }
8383    # Force 64bit on with VIS
8384    if test "$do64bitVIS" = "yes"; then
8385  do64bit=yes
8386fi
8387
8388
8389    # Step 0.c: Check if visibility support is available. Do this here so
8390    # that platform specific alternatives can be used below if this fails.
8391
8392    { echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5
8393echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6; }
8394if test "${tcl_cv_cc_visibility_hidden+set}" = set; then
8395  echo $ECHO_N "(cached) $ECHO_C" >&6
8396else
8397
8398	hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
8399	cat >conftest.$ac_ext <<_ACEOF
8400/* confdefs.h.  */
8401_ACEOF
8402cat confdefs.h >>conftest.$ac_ext
8403cat >>conftest.$ac_ext <<_ACEOF
8404/* end confdefs.h.  */
8405
8406	    extern __attribute__((__visibility__("hidden"))) void f(void);
8407	    void f(void) {}
8408int
8409main ()
8410{
8411f();
8412  ;
8413  return 0;
8414}
8415_ACEOF
8416rm -f conftest.$ac_objext conftest$ac_exeext
8417if { (ac_try="$ac_link"
8418case "(($ac_try" in
8419  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8420  *) ac_try_echo=$ac_try;;
8421esac
8422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8423  (eval "$ac_link") 2>conftest.er1
8424  ac_status=$?
8425  grep -v '^ *+' conftest.er1 >conftest.err
8426  rm -f conftest.er1
8427  cat conftest.err >&5
8428  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8429  (exit $ac_status); } && {
8430	 test -z "$ac_c_werror_flag" ||
8431	 test ! -s conftest.err
8432       } && test -s conftest$ac_exeext &&
8433       $as_test_x conftest$ac_exeext; then
8434  tcl_cv_cc_visibility_hidden=yes
8435else
8436  echo "$as_me: failed program was:" >&5
8437sed 's/^/| /' conftest.$ac_ext >&5
8438
8439	tcl_cv_cc_visibility_hidden=no
8440fi
8441
8442rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8443      conftest$ac_exeext conftest.$ac_ext
8444	CFLAGS=$hold_cflags
8445fi
8446{ echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5
8447echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6; }
8448    if test $tcl_cv_cc_visibility_hidden = yes; then
8449
8450
8451cat >>confdefs.h <<\_ACEOF
8452#define MODULE_SCOPE extern __attribute__((__visibility__("hidden")))
8453_ACEOF
8454
8455
8456fi
8457
8458
8459    # Step 0.d: Disable -rpath support?
8460
8461    { echo "$as_me:$LINENO: checking if rpath support is requested" >&5
8462echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6; }
8463    # Check whether --enable-rpath was given.
8464if test "${enable_rpath+set}" = set; then
8465  enableval=$enable_rpath; doRpath=$enableval
8466else
8467  doRpath=yes
8468fi
8469
8470    { echo "$as_me:$LINENO: result: $doRpath" >&5
8471echo "${ECHO_T}$doRpath" >&6; }
8472
8473    # TEA specific: Cross-compiling options for Windows/CE builds?
8474
8475    if test "${TEA_PLATFORM}" = windows; then
8476
8477	{ echo "$as_me:$LINENO: checking if Windows/CE build is requested" >&5
8478echo $ECHO_N "checking if Windows/CE build is requested... $ECHO_C" >&6; }
8479	# Check whether --enable-wince was given.
8480if test "${enable_wince+set}" = set; then
8481  enableval=$enable_wince; doWince=$enableval
8482else
8483  doWince=no
8484fi
8485
8486	{ echo "$as_me:$LINENO: result: $doWince" >&5
8487echo "${ECHO_T}$doWince" >&6; }
8488
8489fi
8490
8491
8492    # Set the variable "system" to hold the name and version number
8493    # for the system.
8494
8495
8496    { echo "$as_me:$LINENO: checking system version" >&5
8497echo $ECHO_N "checking system version... $ECHO_C" >&6; }
8498if test "${tcl_cv_sys_version+set}" = set; then
8499  echo $ECHO_N "(cached) $ECHO_C" >&6
8500else
8501
8502	# TEA specific:
8503	if test "${TEA_PLATFORM}" = "windows" ; then
8504	    tcl_cv_sys_version=windows
8505	else
8506	    tcl_cv_sys_version=`uname -s`-`uname -r`
8507	    if test "$?" -ne 0 ; then
8508		{ echo "$as_me:$LINENO: WARNING: can't find uname command" >&5
8509echo "$as_me: WARNING: can't find uname command" >&2;}
8510		tcl_cv_sys_version=unknown
8511	    else
8512		if test "`uname -s`" = "AIX" ; then
8513		    tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
8514		fi
8515	    fi
8516	fi
8517
8518fi
8519{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5
8520echo "${ECHO_T}$tcl_cv_sys_version" >&6; }
8521    system=$tcl_cv_sys_version
8522
8523
8524    # Require ranlib early so we can override it in special cases below.
8525
8526
8527
8528    # Set configuration options based on system name and version.
8529    # This is similar to Tcl's unix/tcl.m4 except that we've added a
8530    # "windows" case and removed some core-only vars.
8531
8532    do64bit_ok=no
8533    # default to '{$LIBS}' and set to "" on per-platform necessary basis
8534    SHLIB_LD_LIBS='${LIBS}'
8535    # When ld needs options to work in 64-bit mode, put them in
8536    # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
8537    # is disabled by the user. [Bug 1016796]
8538    LDFLAGS_ARCH=""
8539    UNSHARED_LIB_SUFFIX=""
8540    # TEA specific: use PACKAGE_VERSION instead of VERSION
8541    TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
8542    ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
8543    TCL_LIB_VERSIONS_OK=ok
8544    CFLAGS_DEBUG=-g
8545    CFLAGS_OPTIMIZE=-O
8546    if test "$GCC" = yes; then
8547
8548	# TEA specific:
8549	CFLAGS_OPTIMIZE=-O2
8550	CFLAGS_WARNING="-Wall"
8551
8552else
8553  CFLAGS_WARNING=""
8554fi
8555
8556    # Extract the first word of "ar", so it can be a program name with args.
8557set dummy ar; ac_word=$2
8558{ echo "$as_me:$LINENO: checking for $ac_word" >&5
8559echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
8560if test "${ac_cv_prog_AR+set}" = set; then
8561  echo $ECHO_N "(cached) $ECHO_C" >&6
8562else
8563  if test -n "$AR"; then
8564  ac_cv_prog_AR="$AR" # Let the user override the test.
8565else
8566as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8567for as_dir in $PATH
8568do
8569  IFS=$as_save_IFS
8570  test -z "$as_dir" && as_dir=.
8571  for ac_exec_ext in '' $ac_executable_extensions; do
8572  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8573    ac_cv_prog_AR="ar"
8574    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8575    break 2
8576  fi
8577done
8578done
8579IFS=$as_save_IFS
8580
8581fi
8582fi
8583AR=$ac_cv_prog_AR
8584if test -n "$AR"; then
8585  { echo "$as_me:$LINENO: result: $AR" >&5
8586echo "${ECHO_T}$AR" >&6; }
8587else
8588  { echo "$as_me:$LINENO: result: no" >&5
8589echo "${ECHO_T}no" >&6; }
8590fi
8591
8592
8593    STLIB_LD='${AR} cr'
8594    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
8595    if test "x$SHLIB_VERSION" = x; then
8596  SHLIB_VERSION="1.0"
8597fi
8598
8599    case $system in
8600	# TEA specific:
8601	windows)
8602	    # This is a 2-stage check to make sure we have the 64-bit SDK
8603	    # We have to know where the SDK is installed.
8604	    # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
8605	    # MACHINE is IX86 for LINK, but this is used by the manifest,
8606	    # which requires x86|amd64|ia64.
8607	    MACHINE="X86"
8608	    if test "$do64bit" != "no" ; then
8609		if test "x${MSSDK}x" = "xx" ; then
8610		    MSSDK="C:/Progra~1/Microsoft Platform SDK"
8611		fi
8612		MSSDK=`echo "$MSSDK" | sed -e  's!\\\!/!g'`
8613		PATH64=""
8614		case "$do64bit" in
8615		    amd64|x64|yes)
8616			MACHINE="AMD64" ; # default to AMD64 64-bit build
8617			PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
8618			;;
8619		    ia64)
8620			MACHINE="IA64"
8621			PATH64="${MSSDK}/Bin/Win64"
8622			;;
8623		esac
8624		if test ! -d "${PATH64}" ; then
8625		    { echo "$as_me:$LINENO: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&5
8626echo "$as_me: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&2;}
8627		    { echo "$as_me:$LINENO: WARNING: Ensure latest Platform SDK is installed" >&5
8628echo "$as_me: WARNING: Ensure latest Platform SDK is installed" >&2;}
8629		    do64bit="no"
8630		else
8631		    { echo "$as_me:$LINENO: result:    Using 64-bit $MACHINE mode" >&5
8632echo "${ECHO_T}   Using 64-bit $MACHINE mode" >&6; }
8633		    do64bit_ok="yes"
8634		fi
8635	    fi
8636
8637	    if test "$doWince" != "no" ; then
8638		if test "$do64bit" != "no" ; then
8639		    { { echo "$as_me:$LINENO: error: Windows/CE and 64-bit builds incompatible" >&5
8640echo "$as_me: error: Windows/CE and 64-bit builds incompatible" >&2;}
8641   { (exit 1); exit 1; }; }
8642		fi
8643		if test "$GCC" = "yes" ; then
8644		    { { echo "$as_me:$LINENO: error: Windows/CE and GCC builds incompatible" >&5
8645echo "$as_me: error: Windows/CE and GCC builds incompatible" >&2;}
8646   { (exit 1); exit 1; }; }
8647		fi
8648
8649    # First, look for one uninstalled.
8650    # the alternative search directory is invoked by --with-celib
8651
8652    if test x"${no_celib}" = x ; then
8653	# we reset no_celib in case something fails here
8654	no_celib=true
8655
8656# Check whether --with-celib was given.
8657if test "${with_celib+set}" = set; then
8658  withval=$with_celib; with_celibconfig=${withval}
8659fi
8660
8661	{ echo "$as_me:$LINENO: checking for Windows/CE celib directory" >&5
8662echo $ECHO_N "checking for Windows/CE celib directory... $ECHO_C" >&6; }
8663	if test "${ac_cv_c_celibconfig+set}" = set; then
8664  echo $ECHO_N "(cached) $ECHO_C" >&6
8665else
8666
8667	    # First check to see if --with-celibconfig was specified.
8668	    if test x"${with_celibconfig}" != x ; then
8669		if test -d "${with_celibconfig}/inc" ; then
8670		    ac_cv_c_celibconfig=`(cd ${with_celibconfig}; pwd)`
8671		else
8672		    { { echo "$as_me:$LINENO: error: ${with_celibconfig} directory doesn't contain inc directory" >&5
8673echo "$as_me: error: ${with_celibconfig} directory doesn't contain inc directory" >&2;}
8674   { (exit 1); exit 1; }; }
8675		fi
8676	    fi
8677
8678	    # then check for a celib library
8679	    if test x"${ac_cv_c_celibconfig}" = x ; then
8680		for i in \
8681			../celib-palm-3.0 \
8682			../celib \
8683			../../celib-palm-3.0 \
8684			../../celib \
8685			`ls -dr ../celib-*3.[0-9]* 2>/dev/null` \
8686			${srcdir}/../celib-palm-3.0 \
8687			${srcdir}/../celib \
8688			`ls -dr ${srcdir}/../celib-*3.[0-9]* 2>/dev/null` \
8689			; do
8690		    if test -d "$i/inc" ; then
8691			ac_cv_c_celibconfig=`(cd $i; pwd)`
8692			break
8693		    fi
8694		done
8695	    fi
8696
8697fi
8698
8699	if test x"${ac_cv_c_celibconfig}" = x ; then
8700	    { { echo "$as_me:$LINENO: error: Cannot find celib support library directory" >&5
8701echo "$as_me: error: Cannot find celib support library directory" >&2;}
8702   { (exit 1); exit 1; }; }
8703	else
8704	    no_celib=
8705	    CELIB_DIR=${ac_cv_c_celibconfig}
8706	    CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
8707	    { echo "$as_me:$LINENO: result: found $CELIB_DIR" >&5
8708echo "${ECHO_T}found $CELIB_DIR" >&6; }
8709	fi
8710    fi
8711
8712		# Set defaults for common evc4/PPC2003 setup
8713		# Currently Tcl requires 300+, possibly 420+ for sockets
8714		CEVERSION=420; 		# could be 211 300 301 400 420 ...
8715		TARGETCPU=ARMV4;	# could be ARMV4 ARM MIPS SH3 X86 ...
8716		ARCH=ARM;		# could be ARM MIPS X86EM ...
8717		PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002"
8718		if test "$doWince" != "yes"; then
8719		    # If !yes then the user specified something
8720		    # Reset ARCH to allow user to skip specifying it
8721		    ARCH=
8722		    eval `echo $doWince | awk -F, '{ \
8723	    if (length($1)) { printf "CEVERSION=\"%s\"\n", $1; \
8724	    if ($1 < 400)   { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \
8725	    if (length($2)) { printf "TARGETCPU=\"%s\"\n", toupper($2) }; \
8726	    if (length($3)) { printf "ARCH=\"%s\"\n", toupper($3) }; \
8727	    if (length($4)) { printf "PLATFORM=\"%s\"\n", $4 }; \
8728		    }'`
8729		    if test "x${ARCH}" = "x" ; then
8730			ARCH=$TARGETCPU;
8731		    fi
8732		fi
8733		OSVERSION=WCE$CEVERSION;
8734	    	if test "x${WCEROOT}" = "x" ; then
8735			WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0"
8736		    if test ! -d "${WCEROOT}" ; then
8737			WCEROOT="C:/Program Files/Microsoft eMbedded Tools"
8738		    fi
8739		fi
8740		if test "x${SDKROOT}" = "x" ; then
8741		    SDKROOT="C:/Program Files/Windows CE Tools"
8742		    if test ! -d "${SDKROOT}" ; then
8743			SDKROOT="C:/Windows CE Tools"
8744		    fi
8745		fi
8746		WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'`
8747		SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
8748		if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \
8749		    -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then
8750		    { { echo "$as_me:$LINENO: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&5
8751echo "$as_me: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&2;}
8752   { (exit 1); exit 1; }; }
8753		    doWince="no"
8754		else
8755		    # We could PATH_NOSPACE these, but that's not important,
8756		    # as long as we quote them when used.
8757		    CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include"
8758		    if test -d "${CEINCLUDE}/${TARGETCPU}" ; then
8759			CEINCLUDE="${CEINCLUDE}/${TARGETCPU}"
8760		    fi
8761		    CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}"
8762    		fi
8763	    fi
8764
8765	    if test "$GCC" != "yes" ; then
8766	        if test "${SHARED_BUILD}" = "0" ; then
8767		    runtime=-MT
8768	        else
8769		    runtime=-MD
8770	        fi
8771
8772                if test "$do64bit" != "no" ; then
8773		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
8774		    CC="\"${PATH64}/cl.exe\""
8775		    CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
8776		    RC="\"${MSSDK}/bin/rc.exe\""
8777		    lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
8778		    LINKBIN="\"${PATH64}/link.exe\""
8779		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
8780		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
8781		    # Avoid 'unresolved external symbol __security_cookie'
8782		    # errors, c.f. http://support.microsoft.com/?id=894573
8783
8784    vars="bufferoverflowU.lib"
8785    for i in $vars; do
8786	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
8787	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
8788	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
8789	fi
8790	PKG_LIBS="$PKG_LIBS $i"
8791    done
8792
8793
8794		elif test "$doWince" != "no" ; then
8795		    CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin"
8796		    if test "${TARGETCPU}" = "X86"; then
8797			CC="\"${CEBINROOT}/cl.exe\""
8798		    else
8799			CC="\"${CEBINROOT}/cl${ARCH}.exe\""
8800		    fi
8801		    CFLAGS="$CFLAGS -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\""
8802		    RC="\"${WCEROOT}/Common/EVC/bin/rc.exe\""
8803		    arch=`echo ${ARCH} | awk '{print tolower($0)}'`
8804		    defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _WINDOWS"
8805		    if test "${SHARED_BUILD}" = "1" ; then
8806			# Static CE builds require static celib as well
8807		    	defs="${defs} _DLL"
8808		    fi
8809		    for i in $defs ; do
8810
8811cat >>confdefs.h <<_ACEOF
8812#define $i 1
8813_ACEOF
8814
8815		    done
8816
8817cat >>confdefs.h <<_ACEOF
8818#define _WIN32_WCE $CEVERSION
8819_ACEOF
8820
8821
8822cat >>confdefs.h <<_ACEOF
8823#define UNDER_CE $CEVERSION
8824_ACEOF
8825
8826		    CFLAGS_DEBUG="-nologo -Zi -Od"
8827		    CFLAGS_OPTIMIZE="-nologo -Ox"
8828		    lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'`
8829		    lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
8830		    LINKBIN="\"${CEBINROOT}/link.exe\""
8831
8832		else
8833		    RC="rc"
8834		    lflags="-nologo"
8835    		    LINKBIN="link"
8836		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
8837		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
8838		fi
8839	    fi
8840
8841	    if test "$GCC" = "yes"; then
8842		# mingw gcc mode
8843		RC="windres"
8844		CFLAGS_DEBUG="-g"
8845		CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
8846		SHLIB_LD="$CC -shared"
8847		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
8848		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
8849		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
8850	    else
8851		SHLIB_LD="${LINKBIN} -dll ${lflags}"
8852		# link -lib only works when -lib is the first arg
8853		STLIB_LD="${LINKBIN} -lib ${lflags}"
8854		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib'
8855		PATHTYPE=-w
8856		# For information on what debugtype is most useful, see:
8857		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
8858		# and also
8859		# http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx
8860		# This essentially turns it all on.
8861		LDFLAGS_DEBUG="-debug -debugtype:cv"
8862		LDFLAGS_OPTIMIZE="-release"
8863		if test "$doWince" != "no" ; then
8864		    LDFLAGS_CONSOLE="-link ${lflags}"
8865		    LDFLAGS_WINDOW=${LDFLAGS_CONSOLE}
8866		else
8867		    LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
8868		    LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
8869		fi
8870	    fi
8871
8872	    SHLIB_SUFFIX=".dll"
8873	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
8874
8875	    TCL_LIB_VERSIONS_OK=nodots
8876    	    ;;
8877	AIX-*)
8878	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"; then
8879
8880		# AIX requires the _r compiler when gcc isn't being used
8881		case "${CC}" in
8882		    *_r|*_r\ *)
8883			# ok ...
8884			;;
8885		    *)
8886			# Make sure only first arg gets _r
8887		    	CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'`
8888			;;
8889		esac
8890		{ echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5
8891echo "${ECHO_T}Using $CC for compiling with threads" >&6; }
8892
8893fi
8894
8895	    LIBS="$LIBS -lc"
8896	    SHLIB_CFLAGS=""
8897	    SHLIB_SUFFIX=".so"
8898
8899	    LD_LIBRARY_PATH_VAR="LIBPATH"
8900
8901	    # Check to enable 64-bit flags for compiler/linker
8902	    if test "$do64bit" = yes; then
8903
8904		if test "$GCC" = yes; then
8905
8906		    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
8907echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
8908
8909else
8910
8911		    do64bit_ok=yes
8912		    CFLAGS="$CFLAGS -q64"
8913		    LDFLAGS_ARCH="-q64"
8914		    RANLIB="${RANLIB} -X64"
8915		    AR="${AR} -X64"
8916		    SHLIB_LD_FLAGS="-b64"
8917
8918fi
8919
8920
8921fi
8922
8923
8924	    if test "`uname -m`" = ia64; then
8925
8926		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
8927		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
8928		if test "$GCC" = yes; then
8929
8930		    CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
8931
8932else
8933
8934		    CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
8935
8936fi
8937
8938		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
8939
8940else
8941
8942		if test "$GCC" = yes; then
8943
8944		    SHLIB_LD='${CC} -shared -Wl,-bexpall'
8945
8946else
8947
8948		    SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bexpall -H512 -T512 -bnoentry"
8949		    LDFLAGS="$LDFLAGS -brtl"
8950
8951fi
8952
8953		SHLIB_LD="${SHLIB_LD} ${SHLIB_LD_FLAGS}"
8954		CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
8955		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8956
8957fi
8958
8959	    ;;
8960	BeOS*)
8961	    SHLIB_CFLAGS="-fPIC"
8962	    SHLIB_LD='${CC} -nostart'
8963	    SHLIB_SUFFIX=".so"
8964
8965	    #-----------------------------------------------------------
8966	    # Check for inet_ntoa in -lbind, for BeOS (which also needs
8967	    # -lsocket, even if the network functions are in -lnet which
8968	    # is always linked to, for compatibility.
8969	    #-----------------------------------------------------------
8970	    { echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5
8971echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6; }
8972if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then
8973  echo $ECHO_N "(cached) $ECHO_C" >&6
8974else
8975  ac_check_lib_save_LIBS=$LIBS
8976LIBS="-lbind  $LIBS"
8977cat >conftest.$ac_ext <<_ACEOF
8978/* confdefs.h.  */
8979_ACEOF
8980cat confdefs.h >>conftest.$ac_ext
8981cat >>conftest.$ac_ext <<_ACEOF
8982/* end confdefs.h.  */
8983
8984/* Override any GCC internal prototype to avoid an error.
8985   Use char because int might match the return type of a GCC
8986   builtin and then its argument prototype would still apply.  */
8987#ifdef __cplusplus
8988extern "C"
8989#endif
8990char inet_ntoa ();
8991int
8992main ()
8993{
8994return inet_ntoa ();
8995  ;
8996  return 0;
8997}
8998_ACEOF
8999rm -f conftest.$ac_objext conftest$ac_exeext
9000if { (ac_try="$ac_link"
9001case "(($ac_try" in
9002  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9003  *) ac_try_echo=$ac_try;;
9004esac
9005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9006  (eval "$ac_link") 2>conftest.er1
9007  ac_status=$?
9008  grep -v '^ *+' conftest.er1 >conftest.err
9009  rm -f conftest.er1
9010  cat conftest.err >&5
9011  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9012  (exit $ac_status); } && {
9013	 test -z "$ac_c_werror_flag" ||
9014	 test ! -s conftest.err
9015       } && test -s conftest$ac_exeext &&
9016       $as_test_x conftest$ac_exeext; then
9017  ac_cv_lib_bind_inet_ntoa=yes
9018else
9019  echo "$as_me: failed program was:" >&5
9020sed 's/^/| /' conftest.$ac_ext >&5
9021
9022	ac_cv_lib_bind_inet_ntoa=no
9023fi
9024
9025rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9026      conftest$ac_exeext conftest.$ac_ext
9027LIBS=$ac_check_lib_save_LIBS
9028fi
9029{ echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5
9030echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6; }
9031if test $ac_cv_lib_bind_inet_ntoa = yes; then
9032  LIBS="$LIBS -lbind -lsocket"
9033fi
9034
9035	    ;;
9036	BSD/OS-4.*)
9037	    SHLIB_CFLAGS="-export-dynamic -fPIC"
9038	    SHLIB_LD='${CC} -shared'
9039	    SHLIB_SUFFIX=".so"
9040	    LDFLAGS="$LDFLAGS -export-dynamic"
9041	    CC_SEARCH_FLAGS=""
9042	    LD_SEARCH_FLAGS=""
9043	    ;;
9044	CYGWIN_*)
9045	    SHLIB_CFLAGS=""
9046	    SHLIB_LD='${CC} -shared'
9047	    SHLIB_SUFFIX=".dll"
9048	    EXE_SUFFIX=".exe"
9049	    CC_SEARCH_FLAGS=""
9050	    LD_SEARCH_FLAGS=""
9051	    ;;
9052	Haiku*)
9053	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
9054	    SHLIB_CFLAGS="-fPIC"
9055	    SHLIB_SUFFIX=".so"
9056	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
9057	    { echo "$as_me:$LINENO: checking for inet_ntoa in -lnetwork" >&5
9058echo $ECHO_N "checking for inet_ntoa in -lnetwork... $ECHO_C" >&6; }
9059if test "${ac_cv_lib_network_inet_ntoa+set}" = set; then
9060  echo $ECHO_N "(cached) $ECHO_C" >&6
9061else
9062  ac_check_lib_save_LIBS=$LIBS
9063LIBS="-lnetwork  $LIBS"
9064cat >conftest.$ac_ext <<_ACEOF
9065/* confdefs.h.  */
9066_ACEOF
9067cat confdefs.h >>conftest.$ac_ext
9068cat >>conftest.$ac_ext <<_ACEOF
9069/* end confdefs.h.  */
9070
9071/* Override any GCC internal prototype to avoid an error.
9072   Use char because int might match the return type of a GCC
9073   builtin and then its argument prototype would still apply.  */
9074#ifdef __cplusplus
9075extern "C"
9076#endif
9077char inet_ntoa ();
9078int
9079main ()
9080{
9081return inet_ntoa ();
9082  ;
9083  return 0;
9084}
9085_ACEOF
9086rm -f conftest.$ac_objext conftest$ac_exeext
9087if { (ac_try="$ac_link"
9088case "(($ac_try" in
9089  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9090  *) ac_try_echo=$ac_try;;
9091esac
9092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9093  (eval "$ac_link") 2>conftest.er1
9094  ac_status=$?
9095  grep -v '^ *+' conftest.er1 >conftest.err
9096  rm -f conftest.er1
9097  cat conftest.err >&5
9098  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9099  (exit $ac_status); } && {
9100	 test -z "$ac_c_werror_flag" ||
9101	 test ! -s conftest.err
9102       } && test -s conftest$ac_exeext &&
9103       $as_test_x conftest$ac_exeext; then
9104  ac_cv_lib_network_inet_ntoa=yes
9105else
9106  echo "$as_me: failed program was:" >&5
9107sed 's/^/| /' conftest.$ac_ext >&5
9108
9109	ac_cv_lib_network_inet_ntoa=no
9110fi
9111
9112rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9113      conftest$ac_exeext conftest.$ac_ext
9114LIBS=$ac_check_lib_save_LIBS
9115fi
9116{ echo "$as_me:$LINENO: result: $ac_cv_lib_network_inet_ntoa" >&5
9117echo "${ECHO_T}$ac_cv_lib_network_inet_ntoa" >&6; }
9118if test $ac_cv_lib_network_inet_ntoa = yes; then
9119  LIBS="$LIBS -lnetwork"
9120fi
9121
9122	    ;;
9123	HP-UX-*.11.*)
9124	    # Use updated header definitions where possible
9125
9126cat >>confdefs.h <<\_ACEOF
9127#define _XOPEN_SOURCE_EXTENDED 1
9128_ACEOF
9129
9130	    # TEA specific: Needed by Tcl, but not most extensions
9131	    #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
9132	    #LIBS="$LIBS -lxnet"               # Use the XOPEN network library
9133
9134	    if test "`uname -m`" = ia64; then
9135
9136		SHLIB_SUFFIX=".so"
9137		# Use newer C++ library for C++ extensions
9138		#if test "$GCC" != "yes" ; then
9139		#   CPPFLAGS="-AA"
9140		#fi
9141
9142else
9143
9144		SHLIB_SUFFIX=".sl"
9145
9146fi
9147
9148	    { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9149echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
9150if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9151  echo $ECHO_N "(cached) $ECHO_C" >&6
9152else
9153  ac_check_lib_save_LIBS=$LIBS
9154LIBS="-ldld  $LIBS"
9155cat >conftest.$ac_ext <<_ACEOF
9156/* confdefs.h.  */
9157_ACEOF
9158cat confdefs.h >>conftest.$ac_ext
9159cat >>conftest.$ac_ext <<_ACEOF
9160/* end confdefs.h.  */
9161
9162/* Override any GCC internal prototype to avoid an error.
9163   Use char because int might match the return type of a GCC
9164   builtin and then its argument prototype would still apply.  */
9165#ifdef __cplusplus
9166extern "C"
9167#endif
9168char shl_load ();
9169int
9170main ()
9171{
9172return shl_load ();
9173  ;
9174  return 0;
9175}
9176_ACEOF
9177rm -f conftest.$ac_objext conftest$ac_exeext
9178if { (ac_try="$ac_link"
9179case "(($ac_try" in
9180  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9181  *) ac_try_echo=$ac_try;;
9182esac
9183eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9184  (eval "$ac_link") 2>conftest.er1
9185  ac_status=$?
9186  grep -v '^ *+' conftest.er1 >conftest.err
9187  rm -f conftest.er1
9188  cat conftest.err >&5
9189  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9190  (exit $ac_status); } && {
9191	 test -z "$ac_c_werror_flag" ||
9192	 test ! -s conftest.err
9193       } && test -s conftest$ac_exeext &&
9194       $as_test_x conftest$ac_exeext; then
9195  ac_cv_lib_dld_shl_load=yes
9196else
9197  echo "$as_me: failed program was:" >&5
9198sed 's/^/| /' conftest.$ac_ext >&5
9199
9200	ac_cv_lib_dld_shl_load=no
9201fi
9202
9203rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9204      conftest$ac_exeext conftest.$ac_ext
9205LIBS=$ac_check_lib_save_LIBS
9206fi
9207{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9208echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
9209if test $ac_cv_lib_dld_shl_load = yes; then
9210  tcl_ok=yes
9211else
9212  tcl_ok=no
9213fi
9214
9215	    if test "$tcl_ok" = yes; then
9216
9217		LDFLAGS="$LDFLAGS -E"
9218		CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
9219		LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
9220		LD_LIBRARY_PATH_VAR="SHLIB_PATH"
9221
9222fi
9223
9224	    if test "$GCC" = yes; then
9225
9226		SHLIB_LD='${CC} -shared'
9227		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9228
9229else
9230
9231		CFLAGS="$CFLAGS -z"
9232		# Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
9233		#CFLAGS="$CFLAGS +DAportable"
9234		SHLIB_CFLAGS="+z"
9235		SHLIB_LD="ld -b"
9236
9237fi
9238
9239
9240	    # Check to enable 64-bit flags for compiler/linker
9241	    if test "$do64bit" = "yes"; then
9242
9243		if test "$GCC" = yes; then
9244
9245		    case `${CC} -dumpmachine` in
9246			hppa64*)
9247			    # 64-bit gcc in use.  Fix flags for GNU ld.
9248			    do64bit_ok=yes
9249			    SHLIB_LD='${CC} -shared'
9250			    if test $doRpath = yes; then
9251
9252				CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9253fi
9254
9255			    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9256			    ;;
9257			*)
9258			    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
9259echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
9260			    ;;
9261		    esac
9262
9263else
9264
9265		    do64bit_ok=yes
9266		    CFLAGS="$CFLAGS +DD64"
9267		    LDFLAGS_ARCH="+DD64"
9268
9269fi
9270
9271
9272fi
9273 ;;
9274	IRIX-6.*)
9275	    SHLIB_CFLAGS=""
9276	    SHLIB_LD="ld -n32 -shared -rdata_shared"
9277	    SHLIB_SUFFIX=".so"
9278	    if test $doRpath = yes; then
9279
9280		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9281		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
9282fi
9283
9284	    if test "$GCC" = yes; then
9285
9286		CFLAGS="$CFLAGS -mabi=n32"
9287		LDFLAGS="$LDFLAGS -mabi=n32"
9288
9289else
9290
9291		case $system in
9292		    IRIX-6.3)
9293			# Use to build 6.2 compatible binaries on 6.3.
9294			CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
9295			;;
9296		    *)
9297			CFLAGS="$CFLAGS -n32"
9298			;;
9299		esac
9300		LDFLAGS="$LDFLAGS -n32"
9301
9302fi
9303
9304	    ;;
9305	IRIX64-6.*)
9306	    SHLIB_CFLAGS=""
9307	    SHLIB_LD="ld -n32 -shared -rdata_shared"
9308	    SHLIB_SUFFIX=".so"
9309	    if test $doRpath = yes; then
9310
9311		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9312		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
9313fi
9314
9315
9316	    # Check to enable 64-bit flags for compiler/linker
9317
9318	    if test "$do64bit" = yes; then
9319
9320	        if test "$GCC" = yes; then
9321
9322	            { echo "$as_me:$LINENO: WARNING: 64bit mode not supported by gcc" >&5
9323echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;}
9324
9325else
9326
9327	            do64bit_ok=yes
9328	            SHLIB_LD="ld -64 -shared -rdata_shared"
9329	            CFLAGS="$CFLAGS -64"
9330	            LDFLAGS_ARCH="-64"
9331
9332fi
9333
9334
9335fi
9336
9337	    ;;
9338	Linux*)
9339	    SHLIB_CFLAGS="-fPIC"
9340	    SHLIB_SUFFIX=".so"
9341
9342	    # TEA specific:
9343	    CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
9344
9345	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
9346	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}'
9347	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
9348	    if test $doRpath = yes; then
9349
9350		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9351fi
9352
9353	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9354	    if test "`uname -m`" = "alpha"; then
9355  CFLAGS="$CFLAGS -mieee"
9356fi
9357
9358	    if test $do64bit = yes; then
9359
9360		{ echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5
9361echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6; }
9362if test "${tcl_cv_cc_m64+set}" = set; then
9363  echo $ECHO_N "(cached) $ECHO_C" >&6
9364else
9365
9366		    hold_cflags=$CFLAGS
9367		    CFLAGS="$CFLAGS -m64"
9368		    cat >conftest.$ac_ext <<_ACEOF
9369/* confdefs.h.  */
9370_ACEOF
9371cat confdefs.h >>conftest.$ac_ext
9372cat >>conftest.$ac_ext <<_ACEOF
9373/* end confdefs.h.  */
9374
9375int
9376main ()
9377{
9378
9379  ;
9380  return 0;
9381}
9382_ACEOF
9383rm -f conftest.$ac_objext conftest$ac_exeext
9384if { (ac_try="$ac_link"
9385case "(($ac_try" in
9386  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9387  *) ac_try_echo=$ac_try;;
9388esac
9389eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9390  (eval "$ac_link") 2>conftest.er1
9391  ac_status=$?
9392  grep -v '^ *+' conftest.er1 >conftest.err
9393  rm -f conftest.er1
9394  cat conftest.err >&5
9395  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9396  (exit $ac_status); } && {
9397	 test -z "$ac_c_werror_flag" ||
9398	 test ! -s conftest.err
9399       } && test -s conftest$ac_exeext &&
9400       $as_test_x conftest$ac_exeext; then
9401  tcl_cv_cc_m64=yes
9402else
9403  echo "$as_me: failed program was:" >&5
9404sed 's/^/| /' conftest.$ac_ext >&5
9405
9406	tcl_cv_cc_m64=no
9407fi
9408
9409rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9410      conftest$ac_exeext conftest.$ac_ext
9411		    CFLAGS=$hold_cflags
9412fi
9413{ echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5
9414echo "${ECHO_T}$tcl_cv_cc_m64" >&6; }
9415		if test $tcl_cv_cc_m64 = yes; then
9416
9417		    CFLAGS="$CFLAGS -m64"
9418		    do64bit_ok=yes
9419
9420fi
9421
9422
9423fi
9424
9425
9426	    # The combo of gcc + glibc has a bug related to inlining of
9427	    # functions like strtod(). The -fno-builtin flag should address
9428	    # this problem but it does not work. The -fno-inline flag is kind
9429	    # of overkill but it works. Disable inlining only when one of the
9430	    # files in compat/*.c is being linked in.
9431
9432	    if test x"${USE_COMPAT}" != x; then
9433  CFLAGS="$CFLAGS -fno-inline"
9434fi
9435
9436
9437	    ;;
9438	GNU*)
9439	    SHLIB_CFLAGS="-fPIC"
9440	    SHLIB_SUFFIX=".so"
9441
9442	    SHLIB_LD='${CC} -shared'
9443	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
9444	    CC_SEARCH_FLAGS=""
9445	    LD_SEARCH_FLAGS=""
9446	    if test "`uname -m`" = "alpha"; then
9447  CFLAGS="$CFLAGS -mieee"
9448fi
9449
9450	    ;;
9451	Lynx*)
9452	    SHLIB_CFLAGS="-fPIC"
9453	    SHLIB_SUFFIX=".so"
9454	    CFLAGS_OPTIMIZE=-02
9455	    SHLIB_LD='${CC} -shared'
9456	    LD_FLAGS="-Wl,--export-dynamic"
9457	    if test $doRpath = yes; then
9458
9459		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9460		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9461fi
9462
9463	    ;;
9464	OpenBSD-*)
9465	    SHLIB_CFLAGS="-fPIC"
9466	    SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
9467	    SHLIB_SUFFIX=".so"
9468	    if test $doRpath = yes; then
9469
9470		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9471fi
9472
9473	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9474	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
9475	    { echo "$as_me:$LINENO: checking for ELF" >&5
9476echo $ECHO_N "checking for ELF... $ECHO_C" >&6; }
9477if test "${tcl_cv_ld_elf+set}" = set; then
9478  echo $ECHO_N "(cached) $ECHO_C" >&6
9479else
9480
9481		cat >conftest.$ac_ext <<_ACEOF
9482/* confdefs.h.  */
9483_ACEOF
9484cat confdefs.h >>conftest.$ac_ext
9485cat >>conftest.$ac_ext <<_ACEOF
9486/* end confdefs.h.  */
9487
9488#ifdef __ELF__
9489	yes
9490#endif
9491
9492_ACEOF
9493if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9494  $EGREP "yes" >/dev/null 2>&1; then
9495  tcl_cv_ld_elf=yes
9496else
9497  tcl_cv_ld_elf=no
9498fi
9499rm -f -r conftest*
9500
9501fi
9502{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5
9503echo "${ECHO_T}$tcl_cv_ld_elf" >&6; }
9504	    if test $tcl_cv_ld_elf = yes; then
9505
9506		LDFLAGS=-Wl,-export-dynamic
9507
9508else
9509  LDFLAGS=""
9510fi
9511
9512	    if test "${TCL_THREADS}" = "1"; then
9513
9514		# OpenBSD builds and links with -pthread, never -lpthread.
9515		LIBS=`echo $LIBS | sed s/-lpthread//`
9516		CFLAGS="$CFLAGS -pthread"
9517		SHLIB_CFLAGS="$SHLIB_CFLAGS -pthread"
9518
9519fi
9520
9521	    # OpenBSD doesn't do version numbers with dots.
9522	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
9523	    TCL_LIB_VERSIONS_OK=nodots
9524	    ;;
9525	NetBSD-*|FreeBSD-[3-4].*)
9526	    # FreeBSD 3.* and greater have ELF.
9527	    # NetBSD 2.* has ELF and can use 'cc -shared' to build shared libs
9528	    SHLIB_CFLAGS="-fPIC"
9529	    SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
9530	    SHLIB_SUFFIX=".so"
9531	    LDFLAGS="$LDFLAGS -export-dynamic"
9532	    if test $doRpath = yes; then
9533
9534		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9535fi
9536
9537	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9538	    if test "${TCL_THREADS}" = "1"; then
9539
9540		# The -pthread needs to go in the CFLAGS, not LIBS
9541		LIBS=`echo $LIBS | sed s/-pthread//`
9542		CFLAGS="$CFLAGS -pthread"
9543	    	LDFLAGS="$LDFLAGS -pthread"
9544
9545fi
9546
9547	    case $system in
9548	    FreeBSD-3.*)
9549	    	# FreeBSD-3 doesn't handle version numbers with dots.
9550	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
9551	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
9552	    	TCL_LIB_VERSIONS_OK=nodots
9553		;;
9554	    esac
9555	    ;;
9556	FreeBSD-*)
9557	    # This configuration from FreeBSD Ports.
9558	    SHLIB_CFLAGS="-fPIC"
9559	    SHLIB_LD="${CC} -shared"
9560	    TCL_SHLIB_LD_EXTRAS="-soname \$@"
9561	    SHLIB_SUFFIX=".so"
9562	    LDFLAGS=""
9563	    if test $doRpath = yes; then
9564
9565		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9566		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
9567fi
9568
9569	    if test "${TCL_THREADS}" = "1"; then
9570
9571		# The -pthread needs to go in the LDFLAGS, not LIBS
9572		LIBS=`echo $LIBS | sed s/-pthread//`
9573		CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
9574		LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
9575fi
9576
9577	    # Version numbers are dot-stripped by system policy.
9578	    TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .`
9579	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
9580	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
9581	    TCL_LIB_VERSIONS_OK=nodots
9582	    ;;
9583	Darwin-*)
9584	    CFLAGS_OPTIMIZE="-Os"
9585	    SHLIB_CFLAGS="-fno-common"
9586	    # To avoid discrepancies between what headers configure sees during
9587	    # preprocessing tests and compiling tests, move any -isysroot and
9588	    # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
9589	    CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
9590		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
9591		if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`"
9592	    CFLAGS="`echo " ${CFLAGS}" | \
9593		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
9594		if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`"
9595	    if test $do64bit = yes; then
9596
9597		case `arch` in
9598		    ppc)
9599			{ echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5
9600echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6; }
9601if test "${tcl_cv_cc_arch_ppc64+set}" = set; then
9602  echo $ECHO_N "(cached) $ECHO_C" >&6
9603else
9604
9605			    hold_cflags=$CFLAGS
9606			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
9607			    cat >conftest.$ac_ext <<_ACEOF
9608/* confdefs.h.  */
9609_ACEOF
9610cat confdefs.h >>conftest.$ac_ext
9611cat >>conftest.$ac_ext <<_ACEOF
9612/* end confdefs.h.  */
9613
9614int
9615main ()
9616{
9617
9618  ;
9619  return 0;
9620}
9621_ACEOF
9622rm -f conftest.$ac_objext conftest$ac_exeext
9623if { (ac_try="$ac_link"
9624case "(($ac_try" in
9625  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9626  *) ac_try_echo=$ac_try;;
9627esac
9628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9629  (eval "$ac_link") 2>conftest.er1
9630  ac_status=$?
9631  grep -v '^ *+' conftest.er1 >conftest.err
9632  rm -f conftest.er1
9633  cat conftest.err >&5
9634  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9635  (exit $ac_status); } && {
9636	 test -z "$ac_c_werror_flag" ||
9637	 test ! -s conftest.err
9638       } && test -s conftest$ac_exeext &&
9639       $as_test_x conftest$ac_exeext; then
9640  tcl_cv_cc_arch_ppc64=yes
9641else
9642  echo "$as_me: failed program was:" >&5
9643sed 's/^/| /' conftest.$ac_ext >&5
9644
9645	tcl_cv_cc_arch_ppc64=no
9646fi
9647
9648rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9649      conftest$ac_exeext conftest.$ac_ext
9650			    CFLAGS=$hold_cflags
9651fi
9652{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5
9653echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6; }
9654			if test $tcl_cv_cc_arch_ppc64 = yes; then
9655
9656			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
9657			    do64bit_ok=yes
9658
9659fi
9660;;
9661		    i386)
9662			{ echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5
9663echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6; }
9664if test "${tcl_cv_cc_arch_x86_64+set}" = set; then
9665  echo $ECHO_N "(cached) $ECHO_C" >&6
9666else
9667
9668			    hold_cflags=$CFLAGS
9669			    CFLAGS="$CFLAGS -arch x86_64"
9670			    cat >conftest.$ac_ext <<_ACEOF
9671/* confdefs.h.  */
9672_ACEOF
9673cat confdefs.h >>conftest.$ac_ext
9674cat >>conftest.$ac_ext <<_ACEOF
9675/* end confdefs.h.  */
9676
9677int
9678main ()
9679{
9680
9681  ;
9682  return 0;
9683}
9684_ACEOF
9685rm -f conftest.$ac_objext conftest$ac_exeext
9686if { (ac_try="$ac_link"
9687case "(($ac_try" in
9688  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9689  *) ac_try_echo=$ac_try;;
9690esac
9691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9692  (eval "$ac_link") 2>conftest.er1
9693  ac_status=$?
9694  grep -v '^ *+' conftest.er1 >conftest.err
9695  rm -f conftest.er1
9696  cat conftest.err >&5
9697  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9698  (exit $ac_status); } && {
9699	 test -z "$ac_c_werror_flag" ||
9700	 test ! -s conftest.err
9701       } && test -s conftest$ac_exeext &&
9702       $as_test_x conftest$ac_exeext; then
9703  tcl_cv_cc_arch_x86_64=yes
9704else
9705  echo "$as_me: failed program was:" >&5
9706sed 's/^/| /' conftest.$ac_ext >&5
9707
9708	tcl_cv_cc_arch_x86_64=no
9709fi
9710
9711rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9712      conftest$ac_exeext conftest.$ac_ext
9713			    CFLAGS=$hold_cflags
9714fi
9715{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5
9716echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6; }
9717			if test $tcl_cv_cc_arch_x86_64 = yes; then
9718
9719			    CFLAGS="$CFLAGS -arch x86_64"
9720			    do64bit_ok=yes
9721
9722fi
9723;;
9724		    *)
9725			{ echo "$as_me:$LINENO: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5
9726echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};;
9727		esac
9728
9729else
9730
9731		# Check for combined 32-bit and 64-bit fat build
9732		if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
9733		    && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '; then
9734
9735		    fat_32_64=yes
9736fi
9737
9738
9739fi
9740
9741	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
9742	    SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
9743	    { echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5
9744echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6; }
9745if test "${tcl_cv_ld_single_module+set}" = set; then
9746  echo $ECHO_N "(cached) $ECHO_C" >&6
9747else
9748
9749		hold_ldflags=$LDFLAGS
9750		LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
9751		cat >conftest.$ac_ext <<_ACEOF
9752/* confdefs.h.  */
9753_ACEOF
9754cat confdefs.h >>conftest.$ac_ext
9755cat >>conftest.$ac_ext <<_ACEOF
9756/* end confdefs.h.  */
9757
9758int
9759main ()
9760{
9761int i;
9762  ;
9763  return 0;
9764}
9765_ACEOF
9766rm -f conftest.$ac_objext conftest$ac_exeext
9767if { (ac_try="$ac_link"
9768case "(($ac_try" in
9769  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9770  *) ac_try_echo=$ac_try;;
9771esac
9772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9773  (eval "$ac_link") 2>conftest.er1
9774  ac_status=$?
9775  grep -v '^ *+' conftest.er1 >conftest.err
9776  rm -f conftest.er1
9777  cat conftest.err >&5
9778  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9779  (exit $ac_status); } && {
9780	 test -z "$ac_c_werror_flag" ||
9781	 test ! -s conftest.err
9782       } && test -s conftest$ac_exeext &&
9783       $as_test_x conftest$ac_exeext; then
9784  tcl_cv_ld_single_module=yes
9785else
9786  echo "$as_me: failed program was:" >&5
9787sed 's/^/| /' conftest.$ac_ext >&5
9788
9789	tcl_cv_ld_single_module=no
9790fi
9791
9792rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9793      conftest$ac_exeext conftest.$ac_ext
9794		LDFLAGS=$hold_ldflags
9795fi
9796{ echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5
9797echo "${ECHO_T}$tcl_cv_ld_single_module" >&6; }
9798	    if test $tcl_cv_ld_single_module = yes; then
9799
9800		SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
9801
9802fi
9803
9804	    # TEA specific: link shlib with current and compatiblity version flags
9805	    vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([0-9]\{1,5\}\)\(\(\.[0-9]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d`
9806	    SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}"
9807	    SHLIB_SUFFIX=".dylib"
9808	    # Don't use -prebind when building for Mac OS X 10.4 or later only:
9809	    if test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \
9810		"`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4; then
9811
9812		LDFLAGS="$LDFLAGS -prebind"
9813fi
9814
9815	    LDFLAGS="$LDFLAGS -headerpad_max_install_names"
9816	    { echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5
9817echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6; }
9818if test "${tcl_cv_ld_search_paths_first+set}" = set; then
9819  echo $ECHO_N "(cached) $ECHO_C" >&6
9820else
9821
9822		hold_ldflags=$LDFLAGS
9823		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
9824		cat >conftest.$ac_ext <<_ACEOF
9825/* confdefs.h.  */
9826_ACEOF
9827cat confdefs.h >>conftest.$ac_ext
9828cat >>conftest.$ac_ext <<_ACEOF
9829/* end confdefs.h.  */
9830
9831int
9832main ()
9833{
9834int i;
9835  ;
9836  return 0;
9837}
9838_ACEOF
9839rm -f conftest.$ac_objext conftest$ac_exeext
9840if { (ac_try="$ac_link"
9841case "(($ac_try" in
9842  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9843  *) ac_try_echo=$ac_try;;
9844esac
9845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9846  (eval "$ac_link") 2>conftest.er1
9847  ac_status=$?
9848  grep -v '^ *+' conftest.er1 >conftest.err
9849  rm -f conftest.er1
9850  cat conftest.err >&5
9851  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9852  (exit $ac_status); } && {
9853	 test -z "$ac_c_werror_flag" ||
9854	 test ! -s conftest.err
9855       } && test -s conftest$ac_exeext &&
9856       $as_test_x conftest$ac_exeext; then
9857  tcl_cv_ld_search_paths_first=yes
9858else
9859  echo "$as_me: failed program was:" >&5
9860sed 's/^/| /' conftest.$ac_ext >&5
9861
9862	tcl_cv_ld_search_paths_first=no
9863fi
9864
9865rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9866      conftest$ac_exeext conftest.$ac_ext
9867		LDFLAGS=$hold_ldflags
9868fi
9869{ echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5
9870echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6; }
9871	    if test $tcl_cv_ld_search_paths_first = yes; then
9872
9873		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
9874
9875fi
9876
9877	    if test "$tcl_cv_cc_visibility_hidden" != yes; then
9878
9879
9880cat >>confdefs.h <<\_ACEOF
9881#define MODULE_SCOPE __private_extern__
9882_ACEOF
9883
9884		tcl_cv_cc_visibility_hidden=yes
9885
9886fi
9887
9888	    CC_SEARCH_FLAGS=""
9889	    LD_SEARCH_FLAGS=""
9890	    LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
9891	    # TEA specific: for combined 32 & 64 bit fat builds of Tk
9892	    # extensions, verify that 64-bit build is possible.
9893	    if test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"; then
9894
9895		if test "${TEA_WINDOWINGSYSTEM}" = x11; then
9896
9897		    { echo "$as_me:$LINENO: checking for 64-bit X11" >&5
9898echo $ECHO_N "checking for 64-bit X11... $ECHO_C" >&6; }
9899if test "${tcl_cv_lib_x11_64+set}" = set; then
9900  echo $ECHO_N "(cached) $ECHO_C" >&6
9901else
9902
9903			for v in CFLAGS CPPFLAGS LDFLAGS; do
9904			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
9905			done
9906			CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
9907			LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
9908			cat >conftest.$ac_ext <<_ACEOF
9909/* confdefs.h.  */
9910_ACEOF
9911cat confdefs.h >>conftest.$ac_ext
9912cat >>conftest.$ac_ext <<_ACEOF
9913/* end confdefs.h.  */
9914#include <X11/Xlib.h>
9915int
9916main ()
9917{
9918XrmInitialize();
9919  ;
9920  return 0;
9921}
9922_ACEOF
9923rm -f conftest.$ac_objext conftest$ac_exeext
9924if { (ac_try="$ac_link"
9925case "(($ac_try" in
9926  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9927  *) ac_try_echo=$ac_try;;
9928esac
9929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9930  (eval "$ac_link") 2>conftest.er1
9931  ac_status=$?
9932  grep -v '^ *+' conftest.er1 >conftest.err
9933  rm -f conftest.er1
9934  cat conftest.err >&5
9935  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9936  (exit $ac_status); } && {
9937	 test -z "$ac_c_werror_flag" ||
9938	 test ! -s conftest.err
9939       } && test -s conftest$ac_exeext &&
9940       $as_test_x conftest$ac_exeext; then
9941  tcl_cv_lib_x11_64=yes
9942else
9943  echo "$as_me: failed program was:" >&5
9944sed 's/^/| /' conftest.$ac_ext >&5
9945
9946	tcl_cv_lib_x11_64=no
9947fi
9948
9949rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9950      conftest$ac_exeext conftest.$ac_ext
9951			for v in CFLAGS CPPFLAGS LDFLAGS; do
9952			    eval $v'="$hold_'$v'"'
9953			done
9954fi
9955{ echo "$as_me:$LINENO: result: $tcl_cv_lib_x11_64" >&5
9956echo "${ECHO_T}$tcl_cv_lib_x11_64" >&6; }
9957
9958fi
9959
9960		if test "${TEA_WINDOWINGSYSTEM}" = aqua; then
9961
9962		    { echo "$as_me:$LINENO: checking for 64-bit Tk" >&5
9963echo $ECHO_N "checking for 64-bit Tk... $ECHO_C" >&6; }
9964if test "${tcl_cv_lib_tk_64+set}" = set; then
9965  echo $ECHO_N "(cached) $ECHO_C" >&6
9966else
9967
9968			for v in CFLAGS CPPFLAGS LDFLAGS; do
9969			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
9970			done
9971			CPPFLAGS="$CPPFLAGS -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 `eval "echo ${TCL_INCLUDES} ${TK_INCLUDES}"`"
9972			LDFLAGS="$LDFLAGS ${TCL_STUB_LIB_SPEC} ${TK_STUB_LIB_SPEC}"
9973			cat >conftest.$ac_ext <<_ACEOF
9974/* confdefs.h.  */
9975_ACEOF
9976cat confdefs.h >>conftest.$ac_ext
9977cat >>conftest.$ac_ext <<_ACEOF
9978/* end confdefs.h.  */
9979#include <tk.h>
9980int
9981main ()
9982{
9983Tk_InitStubs(NULL, "", 0);
9984  ;
9985  return 0;
9986}
9987_ACEOF
9988rm -f conftest.$ac_objext conftest$ac_exeext
9989if { (ac_try="$ac_link"
9990case "(($ac_try" in
9991  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9992  *) ac_try_echo=$ac_try;;
9993esac
9994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9995  (eval "$ac_link") 2>conftest.er1
9996  ac_status=$?
9997  grep -v '^ *+' conftest.er1 >conftest.err
9998  rm -f conftest.er1
9999  cat conftest.err >&5
10000  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10001  (exit $ac_status); } && {
10002	 test -z "$ac_c_werror_flag" ||
10003	 test ! -s conftest.err
10004       } && test -s conftest$ac_exeext &&
10005       $as_test_x conftest$ac_exeext; then
10006  tcl_cv_lib_tk_64=yes
10007else
10008  echo "$as_me: failed program was:" >&5
10009sed 's/^/| /' conftest.$ac_ext >&5
10010
10011	tcl_cv_lib_tk_64=no
10012fi
10013
10014rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10015      conftest$ac_exeext conftest.$ac_ext
10016			for v in CFLAGS CPPFLAGS LDFLAGS; do
10017			    eval $v'="$hold_'$v'"'
10018			done
10019fi
10020{ echo "$as_me:$LINENO: result: $tcl_cv_lib_tk_64" >&5
10021echo "${ECHO_T}$tcl_cv_lib_tk_64" >&6; }
10022
10023fi
10024
10025		# remove 64-bit arch flags from CFLAGS et al. if configuration
10026		# does not support 64-bit.
10027		if test "$tcl_cv_lib_tk_64" = no -o "$tcl_cv_lib_x11_64" = no; then
10028
10029		    { echo "$as_me:$LINENO: Removing 64-bit architectures from compiler & linker flags" >&5
10030echo "$as_me: Removing 64-bit architectures from compiler & linker flags" >&6;}
10031		    for v in CFLAGS CPPFLAGS LDFLAGS; do
10032			eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
10033		    done
10034fi
10035
10036
10037fi
10038
10039	    ;;
10040	OS/390-*)
10041	    CFLAGS_OPTIMIZE=""		# Optimizer is buggy
10042
10043cat >>confdefs.h <<\_ACEOF
10044#define _OE_SOCKETS 1
10045_ACEOF
10046
10047	    ;;
10048	OSF1-V*)
10049	    # Digital OSF/1
10050	    SHLIB_CFLAGS=""
10051	    if test "$SHARED_BUILD" = 1; then
10052
10053	        SHLIB_LD='ld -shared -expect_unresolved "*"'
10054
10055else
10056
10057	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
10058
10059fi
10060
10061	    SHLIB_SUFFIX=".so"
10062	    if test $doRpath = yes; then
10063
10064		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
10065		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
10066fi
10067
10068	    if test "$GCC" = yes; then
10069  CFLAGS="$CFLAGS -mieee"
10070else
10071
10072		CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
10073fi
10074
10075	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
10076	    if test "${TCL_THREADS}" = 1; then
10077
10078		CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
10079		CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
10080		LIBS=`echo $LIBS | sed s/-lpthreads//`
10081		if test "$GCC" = yes; then
10082
10083		    LIBS="$LIBS -lpthread -lmach -lexc"
10084
10085else
10086
10087		    CFLAGS="$CFLAGS -pthread"
10088		    LDFLAGS="$LDFLAGS -pthread"
10089
10090fi
10091
10092
10093fi
10094
10095	    ;;
10096	QNX-6*)
10097	    # QNX RTP
10098	    # This may work for all QNX, but it was only reported for v6.
10099	    SHLIB_CFLAGS="-fPIC"
10100	    SHLIB_LD="ld -Bshareable -x"
10101	    SHLIB_LD_LIBS=""
10102	    SHLIB_SUFFIX=".so"
10103	    CC_SEARCH_FLAGS=""
10104	    LD_SEARCH_FLAGS=""
10105	    ;;
10106	SCO_SV-3.2*)
10107	    if test "$GCC" = yes; then
10108
10109		SHLIB_CFLAGS="-fPIC -melf"
10110		LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
10111
10112else
10113
10114	       SHLIB_CFLAGS="-Kpic -belf"
10115	       LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
10116
10117fi
10118
10119	    SHLIB_LD="ld -G"
10120	    SHLIB_LD_LIBS=""
10121	    SHLIB_SUFFIX=".so"
10122	    CC_SEARCH_FLAGS=""
10123	    LD_SEARCH_FLAGS=""
10124	    ;;
10125	SunOS-5.[0-6])
10126	    # Careful to not let 5.10+ fall into this case
10127
10128	    # Note: If _REENTRANT isn't defined, then Solaris
10129	    # won't define thread-safe library routines.
10130
10131
10132cat >>confdefs.h <<\_ACEOF
10133#define _REENTRANT 1
10134_ACEOF
10135
10136
10137cat >>confdefs.h <<\_ACEOF
10138#define _POSIX_PTHREAD_SEMANTICS 1
10139_ACEOF
10140
10141
10142	    SHLIB_CFLAGS="-KPIC"
10143	    SHLIB_SUFFIX=".so"
10144	    if test "$GCC" = yes; then
10145
10146		SHLIB_LD='${CC} -shared'
10147		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
10148		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
10149
10150else
10151
10152		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
10153		CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
10154		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
10155
10156fi
10157
10158	    ;;
10159	SunOS-5*)
10160	    # Note: If _REENTRANT isn't defined, then Solaris
10161	    # won't define thread-safe library routines.
10162
10163
10164cat >>confdefs.h <<\_ACEOF
10165#define _REENTRANT 1
10166_ACEOF
10167
10168
10169cat >>confdefs.h <<\_ACEOF
10170#define _POSIX_PTHREAD_SEMANTICS 1
10171_ACEOF
10172
10173
10174	    SHLIB_CFLAGS="-KPIC"
10175
10176	    # Check to enable 64-bit flags for compiler/linker
10177	    if test "$do64bit" = yes; then
10178
10179		arch=`isainfo`
10180		if test "$arch" = "sparcv9 sparc"; then
10181
10182		    if test "$GCC" = yes; then
10183
10184			if test "`${CC} -dumpversion | awk -F. '{print $1}'`" -lt 3; then
10185
10186			    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5
10187echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;}
10188
10189else
10190
10191			    do64bit_ok=yes
10192			    CFLAGS="$CFLAGS -m64 -mcpu=v9"
10193			    LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
10194			    SHLIB_CFLAGS="-fPIC"
10195
10196fi
10197
10198
10199else
10200
10201			do64bit_ok=yes
10202			if test "$do64bitVIS" = yes; then
10203
10204			    CFLAGS="$CFLAGS -xarch=v9a"
10205			    LDFLAGS_ARCH="-xarch=v9a"
10206
10207else
10208
10209			    CFLAGS="$CFLAGS -xarch=v9"
10210			    LDFLAGS_ARCH="-xarch=v9"
10211
10212fi
10213
10214			# Solaris 64 uses this as well
10215			#LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
10216
10217fi
10218
10219
10220else
10221  if test "$arch" = "amd64 i386"; then
10222
10223		    if test "$GCC" = yes; then
10224
10225			case $system in
10226			    SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
10227				do64bit_ok=yes
10228				CFLAGS="$CFLAGS -m64"
10229				LDFLAGS="$LDFLAGS -m64";;
10230			    *)
10231				{ echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
10232echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;};;
10233			esac
10234
10235else
10236
10237			do64bit_ok=yes
10238			case $system in
10239			    SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
10240				CFLAGS="$CFLAGS -m64"
10241				LDFLAGS="$LDFLAGS -m64";;
10242			    *)
10243				CFLAGS="$CFLAGS -xarch=amd64"
10244				LDFLAGS="$LDFLAGS -xarch=amd64";;
10245			esac
10246
10247fi
10248
10249
10250else
10251  { echo "$as_me:$LINENO: WARNING: 64bit mode not supported for $arch" >&5
10252echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;}
10253fi
10254
10255fi
10256
10257
10258fi
10259
10260
10261	    SHLIB_SUFFIX=".so"
10262	    if test "$GCC" = yes; then
10263
10264		SHLIB_LD='${CC} -shared'
10265		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
10266		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
10267		if test "$do64bit_ok" = yes; then
10268
10269		    if test "$arch" = "sparcv9 sparc"; then
10270
10271			# We need to specify -static-libgcc or we need to
10272			# add the path to the sparv9 libgcc.
10273			# JH: static-libgcc is necessary for core Tcl, but may
10274			# not be necessary for extensions.
10275			SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
10276			# for finding sparcv9 libgcc, get the regular libgcc
10277			# path, remove so name and append 'sparcv9'
10278			#v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
10279			#CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
10280
10281else
10282  if test "$arch" = "amd64 i386"; then
10283
10284			# JH: static-libgcc is necessary for core Tcl, but may
10285			# not be necessary for extensions.
10286			SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
10287
10288fi
10289
10290fi
10291
10292
10293fi
10294
10295
10296else
10297
10298		case $system in
10299		    SunOS-5.[1-9][0-9]*)
10300			# TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
10301			SHLIB_LD='${CC} -G -z text ${LDFLAGS_DEFAULT}';;
10302		    *)
10303			SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
10304		esac
10305		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
10306		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
10307
10308fi
10309
10310	    ;;
10311    esac
10312
10313    if test "$do64bit" = yes -a "$do64bit_ok" = no; then
10314
10315	{ echo "$as_me:$LINENO: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5
10316echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;}
10317
10318fi
10319
10320
10321
10322
10323    # Add in the arch flags late to ensure it wasn't removed.
10324    # Not necessary in TEA, but this is aligned with core
10325    LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
10326
10327    # If we're running gcc, then change the C flags for compiling shared
10328    # libraries to the right flags for gcc, instead of those for the
10329    # standard manufacturer compiler.
10330
10331    if test "$GCC" = yes; then
10332
10333	case $system in
10334	    AIX-*) ;;
10335	    BSD/OS*) ;;
10336	    CYGWIN_*) ;;
10337	    IRIX*) ;;
10338	    NetBSD-*|FreeBSD-*|OpenBSD-*) ;;
10339	    Darwin-*) ;;
10340	    SCO_SV-3.2*) ;;
10341	    windows) ;;
10342	    *) SHLIB_CFLAGS="-fPIC" ;;
10343	esac
10344fi
10345
10346
10347    if test "$tcl_cv_cc_visibility_hidden" != yes; then
10348
10349
10350cat >>confdefs.h <<\_ACEOF
10351#define MODULE_SCOPE extern
10352_ACEOF
10353
10354
10355cat >>confdefs.h <<\_ACEOF
10356#define NO_VIZ
10357_ACEOF
10358
10359
10360fi
10361
10362
10363    if test "$SHARED_LIB_SUFFIX" = ""; then
10364
10365	# TEA specific: use PACKAGE_VERSION instead of VERSION
10366	SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'
10367fi
10368
10369    if test "$UNSHARED_LIB_SUFFIX" = ""; then
10370
10371	# TEA specific: use PACKAGE_VERSION instead of VERSION
10372	UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
10373fi
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388    # These must be called after we do the basic CFLAGS checks and
10389    # verify any possible 64-bit or similar switches are necessary
10390
10391    { echo "$as_me:$LINENO: checking for required early compiler flags" >&5
10392echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6; }
10393    tcl_flags=""
10394
10395    if test "${tcl_cv_flag__isoc99_source+set}" = set; then
10396  echo $ECHO_N "(cached) $ECHO_C" >&6
10397else
10398  cat >conftest.$ac_ext <<_ACEOF
10399/* confdefs.h.  */
10400_ACEOF
10401cat confdefs.h >>conftest.$ac_ext
10402cat >>conftest.$ac_ext <<_ACEOF
10403/* end confdefs.h.  */
10404#include <stdlib.h>
10405int
10406main ()
10407{
10408char *p = (char *)strtoll; char *q = (char *)strtoull;
10409  ;
10410  return 0;
10411}
10412_ACEOF
10413rm -f conftest.$ac_objext
10414if { (ac_try="$ac_compile"
10415case "(($ac_try" in
10416  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10417  *) ac_try_echo=$ac_try;;
10418esac
10419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10420  (eval "$ac_compile") 2>conftest.er1
10421  ac_status=$?
10422  grep -v '^ *+' conftest.er1 >conftest.err
10423  rm -f conftest.er1
10424  cat conftest.err >&5
10425  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10426  (exit $ac_status); } && {
10427	 test -z "$ac_c_werror_flag" ||
10428	 test ! -s conftest.err
10429       } && test -s conftest.$ac_objext; then
10430  tcl_cv_flag__isoc99_source=no
10431else
10432  echo "$as_me: failed program was:" >&5
10433sed 's/^/| /' conftest.$ac_ext >&5
10434
10435	cat >conftest.$ac_ext <<_ACEOF
10436/* confdefs.h.  */
10437_ACEOF
10438cat confdefs.h >>conftest.$ac_ext
10439cat >>conftest.$ac_ext <<_ACEOF
10440/* end confdefs.h.  */
10441#define _ISOC99_SOURCE 1
10442#include <stdlib.h>
10443int
10444main ()
10445{
10446char *p = (char *)strtoll; char *q = (char *)strtoull;
10447  ;
10448  return 0;
10449}
10450_ACEOF
10451rm -f conftest.$ac_objext
10452if { (ac_try="$ac_compile"
10453case "(($ac_try" in
10454  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10455  *) ac_try_echo=$ac_try;;
10456esac
10457eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10458  (eval "$ac_compile") 2>conftest.er1
10459  ac_status=$?
10460  grep -v '^ *+' conftest.er1 >conftest.err
10461  rm -f conftest.er1
10462  cat conftest.err >&5
10463  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10464  (exit $ac_status); } && {
10465	 test -z "$ac_c_werror_flag" ||
10466	 test ! -s conftest.err
10467       } && test -s conftest.$ac_objext; then
10468  tcl_cv_flag__isoc99_source=yes
10469else
10470  echo "$as_me: failed program was:" >&5
10471sed 's/^/| /' conftest.$ac_ext >&5
10472
10473	tcl_cv_flag__isoc99_source=no
10474fi
10475
10476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10477fi
10478
10479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10480fi
10481
10482    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
10483
10484cat >>confdefs.h <<\_ACEOF
10485#define _ISOC99_SOURCE 1
10486_ACEOF
10487
10488	tcl_flags="$tcl_flags _ISOC99_SOURCE"
10489    fi
10490
10491
10492    if test "${tcl_cv_flag__largefile64_source+set}" = set; then
10493  echo $ECHO_N "(cached) $ECHO_C" >&6
10494else
10495  cat >conftest.$ac_ext <<_ACEOF
10496/* confdefs.h.  */
10497_ACEOF
10498cat confdefs.h >>conftest.$ac_ext
10499cat >>conftest.$ac_ext <<_ACEOF
10500/* end confdefs.h.  */
10501#include <sys/stat.h>
10502int
10503main ()
10504{
10505struct stat64 buf; int i = stat64("/", &buf);
10506  ;
10507  return 0;
10508}
10509_ACEOF
10510rm -f conftest.$ac_objext
10511if { (ac_try="$ac_compile"
10512case "(($ac_try" in
10513  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10514  *) ac_try_echo=$ac_try;;
10515esac
10516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10517  (eval "$ac_compile") 2>conftest.er1
10518  ac_status=$?
10519  grep -v '^ *+' conftest.er1 >conftest.err
10520  rm -f conftest.er1
10521  cat conftest.err >&5
10522  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10523  (exit $ac_status); } && {
10524	 test -z "$ac_c_werror_flag" ||
10525	 test ! -s conftest.err
10526       } && test -s conftest.$ac_objext; then
10527  tcl_cv_flag__largefile64_source=no
10528else
10529  echo "$as_me: failed program was:" >&5
10530sed 's/^/| /' conftest.$ac_ext >&5
10531
10532	cat >conftest.$ac_ext <<_ACEOF
10533/* confdefs.h.  */
10534_ACEOF
10535cat confdefs.h >>conftest.$ac_ext
10536cat >>conftest.$ac_ext <<_ACEOF
10537/* end confdefs.h.  */
10538#define _LARGEFILE64_SOURCE 1
10539#include <sys/stat.h>
10540int
10541main ()
10542{
10543struct stat64 buf; int i = stat64("/", &buf);
10544  ;
10545  return 0;
10546}
10547_ACEOF
10548rm -f conftest.$ac_objext
10549if { (ac_try="$ac_compile"
10550case "(($ac_try" in
10551  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10552  *) ac_try_echo=$ac_try;;
10553esac
10554eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10555  (eval "$ac_compile") 2>conftest.er1
10556  ac_status=$?
10557  grep -v '^ *+' conftest.er1 >conftest.err
10558  rm -f conftest.er1
10559  cat conftest.err >&5
10560  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10561  (exit $ac_status); } && {
10562	 test -z "$ac_c_werror_flag" ||
10563	 test ! -s conftest.err
10564       } && test -s conftest.$ac_objext; then
10565  tcl_cv_flag__largefile64_source=yes
10566else
10567  echo "$as_me: failed program was:" >&5
10568sed 's/^/| /' conftest.$ac_ext >&5
10569
10570	tcl_cv_flag__largefile64_source=no
10571fi
10572
10573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10574fi
10575
10576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10577fi
10578
10579    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
10580
10581cat >>confdefs.h <<\_ACEOF
10582#define _LARGEFILE64_SOURCE 1
10583_ACEOF
10584
10585	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
10586    fi
10587
10588
10589    if test "${tcl_cv_flag__largefile_source64+set}" = set; then
10590  echo $ECHO_N "(cached) $ECHO_C" >&6
10591else
10592  cat >conftest.$ac_ext <<_ACEOF
10593/* confdefs.h.  */
10594_ACEOF
10595cat confdefs.h >>conftest.$ac_ext
10596cat >>conftest.$ac_ext <<_ACEOF
10597/* end confdefs.h.  */
10598#include <sys/stat.h>
10599int
10600main ()
10601{
10602char *p = (char *)open64;
10603  ;
10604  return 0;
10605}
10606_ACEOF
10607rm -f conftest.$ac_objext
10608if { (ac_try="$ac_compile"
10609case "(($ac_try" in
10610  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10611  *) ac_try_echo=$ac_try;;
10612esac
10613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10614  (eval "$ac_compile") 2>conftest.er1
10615  ac_status=$?
10616  grep -v '^ *+' conftest.er1 >conftest.err
10617  rm -f conftest.er1
10618  cat conftest.err >&5
10619  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10620  (exit $ac_status); } && {
10621	 test -z "$ac_c_werror_flag" ||
10622	 test ! -s conftest.err
10623       } && test -s conftest.$ac_objext; then
10624  tcl_cv_flag__largefile_source64=no
10625else
10626  echo "$as_me: failed program was:" >&5
10627sed 's/^/| /' conftest.$ac_ext >&5
10628
10629	cat >conftest.$ac_ext <<_ACEOF
10630/* confdefs.h.  */
10631_ACEOF
10632cat confdefs.h >>conftest.$ac_ext
10633cat >>conftest.$ac_ext <<_ACEOF
10634/* end confdefs.h.  */
10635#define _LARGEFILE_SOURCE64 1
10636#include <sys/stat.h>
10637int
10638main ()
10639{
10640char *p = (char *)open64;
10641  ;
10642  return 0;
10643}
10644_ACEOF
10645rm -f conftest.$ac_objext
10646if { (ac_try="$ac_compile"
10647case "(($ac_try" in
10648  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10649  *) ac_try_echo=$ac_try;;
10650esac
10651eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10652  (eval "$ac_compile") 2>conftest.er1
10653  ac_status=$?
10654  grep -v '^ *+' conftest.er1 >conftest.err
10655  rm -f conftest.er1
10656  cat conftest.err >&5
10657  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10658  (exit $ac_status); } && {
10659	 test -z "$ac_c_werror_flag" ||
10660	 test ! -s conftest.err
10661       } && test -s conftest.$ac_objext; then
10662  tcl_cv_flag__largefile_source64=yes
10663else
10664  echo "$as_me: failed program was:" >&5
10665sed 's/^/| /' conftest.$ac_ext >&5
10666
10667	tcl_cv_flag__largefile_source64=no
10668fi
10669
10670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10671fi
10672
10673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10674fi
10675
10676    if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then
10677
10678cat >>confdefs.h <<\_ACEOF
10679#define _LARGEFILE_SOURCE64 1
10680_ACEOF
10681
10682	tcl_flags="$tcl_flags _LARGEFILE_SOURCE64"
10683    fi
10684
10685    if test "x${tcl_flags}" = "x" ; then
10686	{ echo "$as_me:$LINENO: result: none" >&5
10687echo "${ECHO_T}none" >&6; }
10688    else
10689	{ echo "$as_me:$LINENO: result: ${tcl_flags}" >&5
10690echo "${ECHO_T}${tcl_flags}" >&6; }
10691    fi
10692
10693
10694    { echo "$as_me:$LINENO: checking for 64-bit integer type" >&5
10695echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6; }
10696    if test "${tcl_cv_type_64bit+set}" = set; then
10697  echo $ECHO_N "(cached) $ECHO_C" >&6
10698else
10699
10700	tcl_cv_type_64bit=none
10701	# See if the compiler knows natively about __int64
10702	cat >conftest.$ac_ext <<_ACEOF
10703/* confdefs.h.  */
10704_ACEOF
10705cat confdefs.h >>conftest.$ac_ext
10706cat >>conftest.$ac_ext <<_ACEOF
10707/* end confdefs.h.  */
10708
10709int
10710main ()
10711{
10712__int64 value = (__int64) 0;
10713  ;
10714  return 0;
10715}
10716_ACEOF
10717rm -f conftest.$ac_objext
10718if { (ac_try="$ac_compile"
10719case "(($ac_try" in
10720  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10721  *) ac_try_echo=$ac_try;;
10722esac
10723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10724  (eval "$ac_compile") 2>conftest.er1
10725  ac_status=$?
10726  grep -v '^ *+' conftest.er1 >conftest.err
10727  rm -f conftest.er1
10728  cat conftest.err >&5
10729  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10730  (exit $ac_status); } && {
10731	 test -z "$ac_c_werror_flag" ||
10732	 test ! -s conftest.err
10733       } && test -s conftest.$ac_objext; then
10734  tcl_type_64bit=__int64
10735else
10736  echo "$as_me: failed program was:" >&5
10737sed 's/^/| /' conftest.$ac_ext >&5
10738
10739	tcl_type_64bit="long long"
10740fi
10741
10742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10743	# See if we should use long anyway  Note that we substitute in the
10744	# type that is our current guess for a 64-bit type inside this check
10745	# program, so it should be modified only carefully...
10746        cat >conftest.$ac_ext <<_ACEOF
10747/* confdefs.h.  */
10748_ACEOF
10749cat confdefs.h >>conftest.$ac_ext
10750cat >>conftest.$ac_ext <<_ACEOF
10751/* end confdefs.h.  */
10752
10753int
10754main ()
10755{
10756switch (0) {
10757            case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
10758        }
10759  ;
10760  return 0;
10761}
10762_ACEOF
10763rm -f conftest.$ac_objext
10764if { (ac_try="$ac_compile"
10765case "(($ac_try" in
10766  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10767  *) ac_try_echo=$ac_try;;
10768esac
10769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10770  (eval "$ac_compile") 2>conftest.er1
10771  ac_status=$?
10772  grep -v '^ *+' conftest.er1 >conftest.err
10773  rm -f conftest.er1
10774  cat conftest.err >&5
10775  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10776  (exit $ac_status); } && {
10777	 test -z "$ac_c_werror_flag" ||
10778	 test ! -s conftest.err
10779       } && test -s conftest.$ac_objext; then
10780  tcl_cv_type_64bit=${tcl_type_64bit}
10781else
10782  echo "$as_me: failed program was:" >&5
10783sed 's/^/| /' conftest.$ac_ext >&5
10784
10785
10786fi
10787
10788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10789fi
10790
10791    if test "${tcl_cv_type_64bit}" = none ; then
10792
10793cat >>confdefs.h <<\_ACEOF
10794#define TCL_WIDE_INT_IS_LONG 1
10795_ACEOF
10796
10797	{ echo "$as_me:$LINENO: result: using long" >&5
10798echo "${ECHO_T}using long" >&6; }
10799    elif test "${tcl_cv_type_64bit}" = "__int64" \
10800		-a "${TEA_PLATFORM}" = "windows" ; then
10801	# TEA specific: We actually want to use the default tcl.h checks in
10802	# this case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER*
10803	{ echo "$as_me:$LINENO: result: using Tcl header defaults" >&5
10804echo "${ECHO_T}using Tcl header defaults" >&6; }
10805    else
10806
10807cat >>confdefs.h <<_ACEOF
10808#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
10809_ACEOF
10810
10811	{ echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5
10812echo "${ECHO_T}${tcl_cv_type_64bit}" >&6; }
10813
10814	# Now check for auxiliary declarations
10815	{ echo "$as_me:$LINENO: checking for struct dirent64" >&5
10816echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6; }
10817if test "${tcl_cv_struct_dirent64+set}" = set; then
10818  echo $ECHO_N "(cached) $ECHO_C" >&6
10819else
10820
10821	    cat >conftest.$ac_ext <<_ACEOF
10822/* confdefs.h.  */
10823_ACEOF
10824cat confdefs.h >>conftest.$ac_ext
10825cat >>conftest.$ac_ext <<_ACEOF
10826/* end confdefs.h.  */
10827#include <sys/types.h>
10828#include <sys/dirent.h>
10829int
10830main ()
10831{
10832struct dirent64 p;
10833  ;
10834  return 0;
10835}
10836_ACEOF
10837rm -f conftest.$ac_objext
10838if { (ac_try="$ac_compile"
10839case "(($ac_try" in
10840  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10841  *) ac_try_echo=$ac_try;;
10842esac
10843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10844  (eval "$ac_compile") 2>conftest.er1
10845  ac_status=$?
10846  grep -v '^ *+' conftest.er1 >conftest.err
10847  rm -f conftest.er1
10848  cat conftest.err >&5
10849  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10850  (exit $ac_status); } && {
10851	 test -z "$ac_c_werror_flag" ||
10852	 test ! -s conftest.err
10853       } && test -s conftest.$ac_objext; then
10854  tcl_cv_struct_dirent64=yes
10855else
10856  echo "$as_me: failed program was:" >&5
10857sed 's/^/| /' conftest.$ac_ext >&5
10858
10859	tcl_cv_struct_dirent64=no
10860fi
10861
10862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10863fi
10864{ echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5
10865echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6; }
10866	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
10867
10868cat >>confdefs.h <<\_ACEOF
10869#define HAVE_STRUCT_DIRENT64 1
10870_ACEOF
10871
10872	fi
10873
10874	{ echo "$as_me:$LINENO: checking for struct stat64" >&5
10875echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6; }
10876if test "${tcl_cv_struct_stat64+set}" = set; then
10877  echo $ECHO_N "(cached) $ECHO_C" >&6
10878else
10879
10880	    cat >conftest.$ac_ext <<_ACEOF
10881/* confdefs.h.  */
10882_ACEOF
10883cat confdefs.h >>conftest.$ac_ext
10884cat >>conftest.$ac_ext <<_ACEOF
10885/* end confdefs.h.  */
10886#include <sys/stat.h>
10887int
10888main ()
10889{
10890struct stat64 p;
10891
10892  ;
10893  return 0;
10894}
10895_ACEOF
10896rm -f conftest.$ac_objext
10897if { (ac_try="$ac_compile"
10898case "(($ac_try" in
10899  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10900  *) ac_try_echo=$ac_try;;
10901esac
10902eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10903  (eval "$ac_compile") 2>conftest.er1
10904  ac_status=$?
10905  grep -v '^ *+' conftest.er1 >conftest.err
10906  rm -f conftest.er1
10907  cat conftest.err >&5
10908  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10909  (exit $ac_status); } && {
10910	 test -z "$ac_c_werror_flag" ||
10911	 test ! -s conftest.err
10912       } && test -s conftest.$ac_objext; then
10913  tcl_cv_struct_stat64=yes
10914else
10915  echo "$as_me: failed program was:" >&5
10916sed 's/^/| /' conftest.$ac_ext >&5
10917
10918	tcl_cv_struct_stat64=no
10919fi
10920
10921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10922fi
10923{ echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5
10924echo "${ECHO_T}$tcl_cv_struct_stat64" >&6; }
10925	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
10926
10927cat >>confdefs.h <<\_ACEOF
10928#define HAVE_STRUCT_STAT64 1
10929_ACEOF
10930
10931	fi
10932
10933
10934
10935for ac_func in open64 lseek64
10936do
10937as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10938{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10939echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10940if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
10941  echo $ECHO_N "(cached) $ECHO_C" >&6
10942else
10943  cat >conftest.$ac_ext <<_ACEOF
10944/* confdefs.h.  */
10945_ACEOF
10946cat confdefs.h >>conftest.$ac_ext
10947cat >>conftest.$ac_ext <<_ACEOF
10948/* end confdefs.h.  */
10949/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10950   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10951#define $ac_func innocuous_$ac_func
10952
10953/* System header to define __stub macros and hopefully few prototypes,
10954    which can conflict with char $ac_func (); below.
10955    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10956    <limits.h> exists even on freestanding compilers.  */
10957
10958#ifdef __STDC__
10959# include <limits.h>
10960#else
10961# include <assert.h>
10962#endif
10963
10964#undef $ac_func
10965
10966/* Override any GCC internal prototype to avoid an error.
10967   Use char because int might match the return type of a GCC
10968   builtin and then its argument prototype would still apply.  */
10969#ifdef __cplusplus
10970extern "C"
10971#endif
10972char $ac_func ();
10973/* The GNU C library defines this for functions which it implements
10974    to always fail with ENOSYS.  Some functions are actually named
10975    something starting with __ and the normal name is an alias.  */
10976#if defined __stub_$ac_func || defined __stub___$ac_func
10977choke me
10978#endif
10979
10980int
10981main ()
10982{
10983return $ac_func ();
10984  ;
10985  return 0;
10986}
10987_ACEOF
10988rm -f conftest.$ac_objext conftest$ac_exeext
10989if { (ac_try="$ac_link"
10990case "(($ac_try" in
10991  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10992  *) ac_try_echo=$ac_try;;
10993esac
10994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10995  (eval "$ac_link") 2>conftest.er1
10996  ac_status=$?
10997  grep -v '^ *+' conftest.er1 >conftest.err
10998  rm -f conftest.er1
10999  cat conftest.err >&5
11000  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11001  (exit $ac_status); } && {
11002	 test -z "$ac_c_werror_flag" ||
11003	 test ! -s conftest.err
11004       } && test -s conftest$ac_exeext &&
11005       $as_test_x conftest$ac_exeext; then
11006  eval "$as_ac_var=yes"
11007else
11008  echo "$as_me: failed program was:" >&5
11009sed 's/^/| /' conftest.$ac_ext >&5
11010
11011	eval "$as_ac_var=no"
11012fi
11013
11014rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11015      conftest$ac_exeext conftest.$ac_ext
11016fi
11017ac_res=`eval echo '${'$as_ac_var'}'`
11018	       { echo "$as_me:$LINENO: result: $ac_res" >&5
11019echo "${ECHO_T}$ac_res" >&6; }
11020if test `eval echo '${'$as_ac_var'}'` = yes; then
11021  cat >>confdefs.h <<_ACEOF
11022#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11023_ACEOF
11024
11025fi
11026done
11027
11028	{ echo "$as_me:$LINENO: checking for off64_t" >&5
11029echo $ECHO_N "checking for off64_t... $ECHO_C" >&6; }
11030	if test "${tcl_cv_type_off64_t+set}" = set; then
11031  echo $ECHO_N "(cached) $ECHO_C" >&6
11032else
11033
11034	    cat >conftest.$ac_ext <<_ACEOF
11035/* confdefs.h.  */
11036_ACEOF
11037cat confdefs.h >>conftest.$ac_ext
11038cat >>conftest.$ac_ext <<_ACEOF
11039/* end confdefs.h.  */
11040#include <sys/types.h>
11041int
11042main ()
11043{
11044off64_t offset;
11045
11046  ;
11047  return 0;
11048}
11049_ACEOF
11050rm -f conftest.$ac_objext
11051if { (ac_try="$ac_compile"
11052case "(($ac_try" in
11053  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11054  *) ac_try_echo=$ac_try;;
11055esac
11056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11057  (eval "$ac_compile") 2>conftest.er1
11058  ac_status=$?
11059  grep -v '^ *+' conftest.er1 >conftest.err
11060  rm -f conftest.er1
11061  cat conftest.err >&5
11062  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11063  (exit $ac_status); } && {
11064	 test -z "$ac_c_werror_flag" ||
11065	 test ! -s conftest.err
11066       } && test -s conftest.$ac_objext; then
11067  tcl_cv_type_off64_t=yes
11068else
11069  echo "$as_me: failed program was:" >&5
11070sed 's/^/| /' conftest.$ac_ext >&5
11071
11072	tcl_cv_type_off64_t=no
11073fi
11074
11075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11076fi
11077
11078			if test "x${tcl_cv_type_off64_t}" = "xyes" && \
11079	        test "x${ac_cv_func_lseek64}" = "xyes" && \
11080	        test "x${ac_cv_func_open64}" = "xyes" ; then
11081
11082cat >>confdefs.h <<\_ACEOF
11083#define HAVE_TYPE_OFF64_T 1
11084_ACEOF
11085
11086	    { echo "$as_me:$LINENO: result: yes" >&5
11087echo "${ECHO_T}yes" >&6; }
11088	else
11089	    { echo "$as_me:$LINENO: result: no" >&5
11090echo "${ECHO_T}no" >&6; }
11091	fi
11092    fi
11093
11094
11095
11096#--------------------------------------------------------------------
11097# Set the default compiler switches based on the --enable-symbols option.
11098#--------------------------------------------------------------------
11099
11100
11101
11102    { echo "$as_me:$LINENO: checking for build with symbols" >&5
11103echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6; }
11104    # Check whether --enable-symbols was given.
11105if test "${enable_symbols+set}" = set; then
11106  enableval=$enable_symbols; tcl_ok=$enableval
11107else
11108  tcl_ok=no
11109fi
11110
11111    DBGX=""
11112    if test "$tcl_ok" = "no"; then
11113	CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}"
11114	LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
11115	{ echo "$as_me:$LINENO: result: no" >&5
11116echo "${ECHO_T}no" >&6; }
11117    else
11118	CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
11119	LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
11120	if test "$tcl_ok" = "yes"; then
11121	    { echo "$as_me:$LINENO: result: yes (standard debugging)" >&5
11122echo "${ECHO_T}yes (standard debugging)" >&6; }
11123	fi
11124    fi
11125    # TEA specific:
11126    if test "${TEA_PLATFORM}" != "windows" ; then
11127	LDFLAGS_DEFAULT="${LDFLAGS}"
11128    fi
11129
11130
11131
11132
11133    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
11134
11135cat >>confdefs.h <<\_ACEOF
11136#define TCL_MEM_DEBUG 1
11137_ACEOF
11138
11139    fi
11140
11141    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
11142	if test "$tcl_ok" = "all"; then
11143	    { echo "$as_me:$LINENO: result: enabled symbols mem debugging" >&5
11144echo "${ECHO_T}enabled symbols mem debugging" >&6; }
11145	else
11146	    { echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5
11147echo "${ECHO_T}enabled $tcl_ok debugging" >&6; }
11148	fi
11149    fi
11150
11151
11152#--------------------------------------------------------------------
11153# For Unix/Tk builds, make sure that the X libraries/headers are found.
11154# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS.
11155#--------------------------------------------------------------------
11156
11157
11158    if test "${TEA_WINDOWINGSYSTEM}" = "x11" ; then
11159
11160    { echo "$as_me:$LINENO: checking for X" >&5
11161echo $ECHO_N "checking for X... $ECHO_C" >&6; }
11162
11163
11164# Check whether --with-x was given.
11165if test "${with_x+set}" = set; then
11166  withval=$with_x;
11167fi
11168
11169# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
11170if test "x$with_x" = xno; then
11171  # The user explicitly disabled X.
11172  have_x=disabled
11173else
11174  case $x_includes,$x_libraries in #(
11175    *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
11176echo "$as_me: error: Cannot use X directory names containing '" >&2;}
11177   { (exit 1); exit 1; }; };; #(
11178    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
11179  echo $ECHO_N "(cached) $ECHO_C" >&6
11180else
11181  # One or both of the vars are not set, and there is no cached value.
11182ac_x_includes=no ac_x_libraries=no
11183rm -f -r conftest.dir
11184if mkdir conftest.dir; then
11185  cd conftest.dir
11186  cat >Imakefile <<'_ACEOF'
11187incroot:
11188	@echo incroot='${INCROOT}'
11189usrlibdir:
11190	@echo usrlibdir='${USRLIBDIR}'
11191libdir:
11192	@echo libdir='${LIBDIR}'
11193_ACEOF
11194  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
11195    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
11196    for ac_var in incroot usrlibdir libdir; do
11197      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
11198    done
11199    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
11200    for ac_extension in a so sl dylib la dll; do
11201      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
11202	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
11203	ac_im_usrlibdir=$ac_im_libdir; break
11204      fi
11205    done
11206    # Screen out bogus values from the imake configuration.  They are
11207    # bogus both because they are the default anyway, and because
11208    # using them would break gcc on systems where it needs fixed includes.
11209    case $ac_im_incroot in
11210	/usr/include) ac_x_includes= ;;
11211	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
11212    esac
11213    case $ac_im_usrlibdir in
11214	/usr/lib | /lib) ;;
11215	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
11216    esac
11217  fi
11218  cd ..
11219  rm -f -r conftest.dir
11220fi
11221
11222# Standard set of common directories for X headers.
11223# Check X11 before X11Rn because it is often a symlink to the current release.
11224ac_x_header_dirs='
11225/usr/X11/include
11226/usr/X11R6/include
11227/usr/X11R5/include
11228/usr/X11R4/include
11229
11230/usr/include/X11
11231/usr/include/X11R6
11232/usr/include/X11R5
11233/usr/include/X11R4
11234
11235/usr/local/X11/include
11236/usr/local/X11R6/include
11237/usr/local/X11R5/include
11238/usr/local/X11R4/include
11239
11240/usr/local/include/X11
11241/usr/local/include/X11R6
11242/usr/local/include/X11R5
11243/usr/local/include/X11R4
11244
11245/usr/X386/include
11246/usr/x386/include
11247/usr/XFree86/include/X11
11248
11249/usr/include
11250/usr/local/include
11251/usr/unsupported/include
11252/usr/athena/include
11253/usr/local/x11r5/include
11254/usr/lpp/Xamples/include
11255
11256/usr/openwin/include
11257/usr/openwin/share/include'
11258
11259if test "$ac_x_includes" = no; then
11260  # Guess where to find include files, by looking for Xlib.h.
11261  # First, try using that file with no special directory specified.
11262  cat >conftest.$ac_ext <<_ACEOF
11263/* confdefs.h.  */
11264_ACEOF
11265cat confdefs.h >>conftest.$ac_ext
11266cat >>conftest.$ac_ext <<_ACEOF
11267/* end confdefs.h.  */
11268#include <X11/Xlib.h>
11269_ACEOF
11270if { (ac_try="$ac_cpp conftest.$ac_ext"
11271case "(($ac_try" in
11272  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11273  *) ac_try_echo=$ac_try;;
11274esac
11275eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11276  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11277  ac_status=$?
11278  grep -v '^ *+' conftest.er1 >conftest.err
11279  rm -f conftest.er1
11280  cat conftest.err >&5
11281  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11282  (exit $ac_status); } >/dev/null && {
11283	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11284	 test ! -s conftest.err
11285       }; then
11286  # We can compile using X headers with no special include directory.
11287ac_x_includes=
11288else
11289  echo "$as_me: failed program was:" >&5
11290sed 's/^/| /' conftest.$ac_ext >&5
11291
11292  for ac_dir in $ac_x_header_dirs; do
11293  if test -r "$ac_dir/X11/Xlib.h"; then
11294    ac_x_includes=$ac_dir
11295    break
11296  fi
11297done
11298fi
11299
11300rm -f conftest.err conftest.$ac_ext
11301fi # $ac_x_includes = no
11302
11303if test "$ac_x_libraries" = no; then
11304  # Check for the libraries.
11305  # See if we find them without any special options.
11306  # Don't add to $LIBS permanently.
11307  ac_save_LIBS=$LIBS
11308  LIBS="-lX11 $LIBS"
11309  cat >conftest.$ac_ext <<_ACEOF
11310/* confdefs.h.  */
11311_ACEOF
11312cat confdefs.h >>conftest.$ac_ext
11313cat >>conftest.$ac_ext <<_ACEOF
11314/* end confdefs.h.  */
11315#include <X11/Xlib.h>
11316int
11317main ()
11318{
11319XrmInitialize ()
11320  ;
11321  return 0;
11322}
11323_ACEOF
11324rm -f conftest.$ac_objext conftest$ac_exeext
11325if { (ac_try="$ac_link"
11326case "(($ac_try" in
11327  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11328  *) ac_try_echo=$ac_try;;
11329esac
11330eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11331  (eval "$ac_link") 2>conftest.er1
11332  ac_status=$?
11333  grep -v '^ *+' conftest.er1 >conftest.err
11334  rm -f conftest.er1
11335  cat conftest.err >&5
11336  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11337  (exit $ac_status); } && {
11338	 test -z "$ac_c_werror_flag" ||
11339	 test ! -s conftest.err
11340       } && test -s conftest$ac_exeext &&
11341       $as_test_x conftest$ac_exeext; then
11342  LIBS=$ac_save_LIBS
11343# We can link X programs with no special library path.
11344ac_x_libraries=
11345else
11346  echo "$as_me: failed program was:" >&5
11347sed 's/^/| /' conftest.$ac_ext >&5
11348
11349	LIBS=$ac_save_LIBS
11350for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
11351do
11352  # Don't even attempt the hair of trying to link an X program!
11353  for ac_extension in a so sl dylib la dll; do
11354    if test -r "$ac_dir/libX11.$ac_extension"; then
11355      ac_x_libraries=$ac_dir
11356      break 2
11357    fi
11358  done
11359done
11360fi
11361
11362rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11363      conftest$ac_exeext conftest.$ac_ext
11364fi # $ac_x_libraries = no
11365
11366case $ac_x_includes,$ac_x_libraries in #(
11367  no,* | *,no | *\'*)
11368    # Didn't find X, or a directory has "'" in its name.
11369    ac_cv_have_x="have_x=no";; #(
11370  *)
11371    # Record where we found X for the cache.
11372    ac_cv_have_x="have_x=yes\
11373	ac_x_includes='$ac_x_includes'\
11374	ac_x_libraries='$ac_x_libraries'"
11375esac
11376fi
11377;; #(
11378    *) have_x=yes;;
11379  esac
11380  eval "$ac_cv_have_x"
11381fi # $with_x != no
11382
11383if test "$have_x" != yes; then
11384  { echo "$as_me:$LINENO: result: $have_x" >&5
11385echo "${ECHO_T}$have_x" >&6; }
11386  no_x=yes
11387else
11388  # If each of the values was on the command line, it overrides each guess.
11389  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
11390  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
11391  # Update the cache value to reflect the command line values.
11392  ac_cv_have_x="have_x=yes\
11393	ac_x_includes='$x_includes'\
11394	ac_x_libraries='$x_libraries'"
11395  { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
11396echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; }
11397fi
11398
11399    not_really_there=""
11400    if test "$no_x" = ""; then
11401	if test "$x_includes" = ""; then
11402	    cat >conftest.$ac_ext <<_ACEOF
11403/* confdefs.h.  */
11404_ACEOF
11405cat confdefs.h >>conftest.$ac_ext
11406cat >>conftest.$ac_ext <<_ACEOF
11407/* end confdefs.h.  */
11408#include <X11/XIntrinsic.h>
11409_ACEOF
11410if { (ac_try="$ac_cpp conftest.$ac_ext"
11411case "(($ac_try" in
11412  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11413  *) ac_try_echo=$ac_try;;
11414esac
11415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11416  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11417  ac_status=$?
11418  grep -v '^ *+' conftest.er1 >conftest.err
11419  rm -f conftest.er1
11420  cat conftest.err >&5
11421  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11422  (exit $ac_status); } >/dev/null && {
11423	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11424	 test ! -s conftest.err
11425       }; then
11426  :
11427else
11428  echo "$as_me: failed program was:" >&5
11429sed 's/^/| /' conftest.$ac_ext >&5
11430
11431  not_really_there="yes"
11432fi
11433
11434rm -f conftest.err conftest.$ac_ext
11435	else
11436	    if test ! -r $x_includes/X11/Intrinsic.h; then
11437		not_really_there="yes"
11438	    fi
11439	fi
11440    fi
11441    if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
11442	{ echo "$as_me:$LINENO: checking for X11 header files" >&5
11443echo $ECHO_N "checking for X11 header files... $ECHO_C" >&6; }
11444	found_xincludes="no"
11445	cat >conftest.$ac_ext <<_ACEOF
11446/* confdefs.h.  */
11447_ACEOF
11448cat confdefs.h >>conftest.$ac_ext
11449cat >>conftest.$ac_ext <<_ACEOF
11450/* end confdefs.h.  */
11451#include <X11/Intrinsic.h>
11452_ACEOF
11453if { (ac_try="$ac_cpp conftest.$ac_ext"
11454case "(($ac_try" in
11455  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11456  *) ac_try_echo=$ac_try;;
11457esac
11458eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11459  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11460  ac_status=$?
11461  grep -v '^ *+' conftest.er1 >conftest.err
11462  rm -f conftest.er1
11463  cat conftest.err >&5
11464  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11465  (exit $ac_status); } >/dev/null && {
11466	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11467	 test ! -s conftest.err
11468       }; then
11469  found_xincludes="yes"
11470else
11471  echo "$as_me: failed program was:" >&5
11472sed 's/^/| /' conftest.$ac_ext >&5
11473
11474  found_xincludes="no"
11475fi
11476
11477rm -f conftest.err conftest.$ac_ext
11478	if test "$found_xincludes" = "no"; then
11479	    dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include"
11480	    for i in $dirs ; do
11481		if test -r $i/X11/Intrinsic.h; then
11482		    { echo "$as_me:$LINENO: result: $i" >&5
11483echo "${ECHO_T}$i" >&6; }
11484		    XINCLUDES=" -I$i"
11485		    found_xincludes="yes"
11486		    break
11487		fi
11488	    done
11489	fi
11490    else
11491	if test "$x_includes" != ""; then
11492	    XINCLUDES="-I$x_includes"
11493	    found_xincludes="yes"
11494	fi
11495    fi
11496    if test "$found_xincludes" = "no"; then
11497	{ echo "$as_me:$LINENO: result: couldn't find any!" >&5
11498echo "${ECHO_T}couldn't find any!" >&6; }
11499    fi
11500
11501    if test "$no_x" = yes; then
11502	{ echo "$as_me:$LINENO: checking for X11 libraries" >&5
11503echo $ECHO_N "checking for X11 libraries... $ECHO_C" >&6; }
11504	XLIBSW=nope
11505	dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
11506	for i in $dirs ; do
11507	    if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl -o -r $i/libX11.dylib; then
11508		{ echo "$as_me:$LINENO: result: $i" >&5
11509echo "${ECHO_T}$i" >&6; }
11510		XLIBSW="-L$i -lX11"
11511		x_libraries="$i"
11512		break
11513	    fi
11514	done
11515    else
11516	if test "$x_libraries" = ""; then
11517	    XLIBSW=-lX11
11518	else
11519	    XLIBSW="-L$x_libraries -lX11"
11520	fi
11521    fi
11522    if test "$XLIBSW" = nope ; then
11523	{ echo "$as_me:$LINENO: checking for XCreateWindow in -lXwindow" >&5
11524echo $ECHO_N "checking for XCreateWindow in -lXwindow... $ECHO_C" >&6; }
11525if test "${ac_cv_lib_Xwindow_XCreateWindow+set}" = set; then
11526  echo $ECHO_N "(cached) $ECHO_C" >&6
11527else
11528  ac_check_lib_save_LIBS=$LIBS
11529LIBS="-lXwindow  $LIBS"
11530cat >conftest.$ac_ext <<_ACEOF
11531/* confdefs.h.  */
11532_ACEOF
11533cat confdefs.h >>conftest.$ac_ext
11534cat >>conftest.$ac_ext <<_ACEOF
11535/* end confdefs.h.  */
11536
11537/* Override any GCC internal prototype to avoid an error.
11538   Use char because int might match the return type of a GCC
11539   builtin and then its argument prototype would still apply.  */
11540#ifdef __cplusplus
11541extern "C"
11542#endif
11543char XCreateWindow ();
11544int
11545main ()
11546{
11547return XCreateWindow ();
11548  ;
11549  return 0;
11550}
11551_ACEOF
11552rm -f conftest.$ac_objext conftest$ac_exeext
11553if { (ac_try="$ac_link"
11554case "(($ac_try" in
11555  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11556  *) ac_try_echo=$ac_try;;
11557esac
11558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11559  (eval "$ac_link") 2>conftest.er1
11560  ac_status=$?
11561  grep -v '^ *+' conftest.er1 >conftest.err
11562  rm -f conftest.er1
11563  cat conftest.err >&5
11564  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11565  (exit $ac_status); } && {
11566	 test -z "$ac_c_werror_flag" ||
11567	 test ! -s conftest.err
11568       } && test -s conftest$ac_exeext &&
11569       $as_test_x conftest$ac_exeext; then
11570  ac_cv_lib_Xwindow_XCreateWindow=yes
11571else
11572  echo "$as_me: failed program was:" >&5
11573sed 's/^/| /' conftest.$ac_ext >&5
11574
11575	ac_cv_lib_Xwindow_XCreateWindow=no
11576fi
11577
11578rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11579      conftest$ac_exeext conftest.$ac_ext
11580LIBS=$ac_check_lib_save_LIBS
11581fi
11582{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xwindow_XCreateWindow" >&5
11583echo "${ECHO_T}$ac_cv_lib_Xwindow_XCreateWindow" >&6; }
11584if test $ac_cv_lib_Xwindow_XCreateWindow = yes; then
11585  XLIBSW=-lXwindow
11586fi
11587
11588    fi
11589    if test "$XLIBSW" = nope ; then
11590	{ echo "$as_me:$LINENO: result: could not find any!  Using -lX11." >&5
11591echo "${ECHO_T}could not find any!  Using -lX11." >&6; }
11592	XLIBSW=-lX11
11593    fi
11594    # TEA specific:
11595    if test x"${XLIBSW}" != x ; then
11596	PKG_LIBS="${PKG_LIBS} ${XLIBSW}"
11597    fi
11598
11599    fi
11600
11601
11602#--------------------------------------------------------------------
11603# Everyone should be linking against the Tcl stub library.  If you
11604# can't for some reason, remove this definition.  If you aren't using
11605# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
11606# link against the non-stubbed Tcl library.
11607#--------------------------------------------------------------------
11608
11609cat >>confdefs.h <<\_ACEOF
11610#define USE_TCL_STUBS 1
11611_ACEOF
11612
11613cat >>confdefs.h <<\_ACEOF
11614#define USE_TK_STUBS 1
11615_ACEOF
11616
11617
11618#--------------------------------------------------------------------
11619# This macro generates a line to use when building a library.  It
11620# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
11621# and TEA_LOAD_TCLCONFIG macros above.
11622#--------------------------------------------------------------------
11623
11624
11625    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
11626	MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(PKG_OBJECTS)"
11627	MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\$@ \$(PKG_OBJECTS)"
11628	cat >conftest.$ac_ext <<_ACEOF
11629/* confdefs.h.  */
11630_ACEOF
11631cat confdefs.h >>conftest.$ac_ext
11632cat >>conftest.$ac_ext <<_ACEOF
11633/* end confdefs.h.  */
11634
11635#if defined(_MSC_VER) && _MSC_VER >= 1400
11636print("manifest needed")
11637#endif
11638
11639_ACEOF
11640if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11641  $EGREP "manifest needed" >/dev/null 2>&1; then
11642
11643	# Could do a CHECK_PROG for mt, but should always be with MSVC8+
11644	VC_MANIFEST_EMBED_DLL="mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;2"
11645	VC_MANIFEST_EMBED_EXE="mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;1"
11646	MAKE_SHARED_LIB="${MAKE_SHARED_LIB} ; ${VC_MANIFEST_EMBED_DLL}"
11647
11648    CLEANFILES="$CLEANFILES *.manifest"
11649
11650
11651fi
11652rm -f -r conftest*
11653
11654	MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(PKG_STUB_OBJECTS)"
11655    else
11656	MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(PKG_OBJECTS)"
11657	MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
11658	MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(PKG_STUB_OBJECTS)"
11659    fi
11660
11661    if test "${SHARED_BUILD}" = "1" ; then
11662	MAKE_LIB="${MAKE_SHARED_LIB} "
11663    else
11664	MAKE_LIB="${MAKE_STATIC_LIB} "
11665    fi
11666
11667    #--------------------------------------------------------------------
11668    # Shared libraries and static libraries have different names.
11669    # Use the double eval to make sure any variables in the suffix is
11670    # substituted. (@@@ Might not be necessary anymore)
11671    #--------------------------------------------------------------------
11672
11673    if test "${TEA_PLATFORM}" = "windows" ; then
11674	if test "${SHARED_BUILD}" = "1" ; then
11675	    # We force the unresolved linking of symbols that are really in
11676	    # the private libraries of Tcl and Tk.
11677	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
11678	    if test x"${TK_BIN_DIR}" != x ; then
11679		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
11680	    fi
11681	    eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
11682	else
11683	    eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
11684	fi
11685	# Some packages build their own stubs libraries
11686	eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
11687	if test "$GCC" = "yes"; then
11688	    PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
11689	fi
11690	# These aren't needed on Windows (either MSVC or gcc)
11691	RANLIB=:
11692	RANLIB_STUB=:
11693    else
11694	RANLIB_STUB="${RANLIB}"
11695	if test "${SHARED_BUILD}" = "1" ; then
11696	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
11697	    if test x"${TK_BIN_DIR}" != x ; then
11698		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
11699	    fi
11700	    eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
11701	    RANLIB=:
11702	else
11703	    eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
11704	fi
11705	# Some packages build their own stubs libraries
11706	eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
11707    fi
11708
11709    # These are escaped so that only CFLAGS is picked up at configure time.
11710    # The other values will be substituted at make time.
11711    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
11712    if test "${SHARED_BUILD}" = "1" ; then
11713	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
11714    fi
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725#--------------------------------------------------------------------
11726# __CHANGE__
11727# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
11728#--------------------------------------------------------------------
11729
11730if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
11731
11732    vars="\"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
11733    for i in $vars; do
11734	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
11735	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
11736	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
11737	fi
11738	PKG_LIBS="$PKG_LIBS $i"
11739    done
11740
11741
11742
11743    vars="gdi32.lib"
11744    for i in $vars; do
11745	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
11746	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
11747	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
11748	fi
11749	PKG_LIBS="$PKG_LIBS $i"
11750    done
11751
11752
11753else
11754
11755    vars="${tkimg_STUB_LIB_SPEC}"
11756    for i in $vars; do
11757	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
11758	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
11759	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
11760	fi
11761	PKG_LIBS="$PKG_LIBS $i"
11762    done
11763
11764
11765fi
11766
11767#--------------------------------------------------------------------
11768# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
11769# file during the install process.  Don't run the TCLSH_PROG through
11770# ${CYGPATH} because it's being used directly by make.
11771# Require that we use a tclsh shell version 8.2 or later since earlier
11772# versions have bugs in the pkg_mkIndex routine.
11773# Add WISH as well if this is a Tk extension.
11774#--------------------------------------------------------------------
11775
11776
11777    { echo "$as_me:$LINENO: checking for tclsh" >&5
11778echo $ECHO_N "checking for tclsh... $ECHO_C" >&6; }
11779    if test -f "${TCL_BIN_DIR}/Makefile" ; then
11780        # tclConfig.sh is in Tcl build directory
11781        if test "${TEA_PLATFORM}" = "windows"; then
11782            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
11783        else
11784            TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
11785        fi
11786    else
11787        # tclConfig.sh is in install location
11788        if test "${TEA_PLATFORM}" = "windows"; then
11789            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
11790        else
11791            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}"
11792        fi
11793        list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
11794              `ls -d ${TCL_BIN_DIR}/..     2>/dev/null` \
11795              `ls -d ${TCL_PREFIX}/bin     2>/dev/null`"
11796        for i in $list ; do
11797            if test -f "$i/${TCLSH_PROG}" ; then
11798                REAL_TCL_BIN_DIR="`cd "$i"; pwd`/"
11799                break
11800            fi
11801        done
11802        TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}"
11803    fi
11804    { echo "$as_me:$LINENO: result: ${TCLSH_PROG}" >&5
11805echo "${ECHO_T}${TCLSH_PROG}" >&6; }
11806
11807
11808
11809    { echo "$as_me:$LINENO: checking for wish" >&5
11810echo $ECHO_N "checking for wish... $ECHO_C" >&6; }
11811    if test -f "${TK_BIN_DIR}/Makefile" ; then
11812        # tkConfig.sh is in Tk build directory
11813        if test "${TEA_PLATFORM}" = "windows"; then
11814            WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}"
11815        else
11816            WISH_PROG="${TK_BIN_DIR}/wish"
11817        fi
11818    else
11819        # tkConfig.sh is in install location
11820        if test "${TEA_PLATFORM}" = "windows"; then
11821            WISH_PROG="wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}"
11822        else
11823            WISH_PROG="wish${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}${TK_DBGX}"
11824        fi
11825        list="`ls -d ${TK_BIN_DIR}/../bin 2>/dev/null` \
11826              `ls -d ${TK_BIN_DIR}/..     2>/dev/null` \
11827              `ls -d ${TK_PREFIX}/bin     2>/dev/null`"
11828        for i in $list ; do
11829            if test -f "$i/${WISH_PROG}" ; then
11830                REAL_TK_BIN_DIR="`cd "$i"; pwd`/"
11831                break
11832            fi
11833        done
11834        WISH_PROG="${REAL_TK_BIN_DIR}${WISH_PROG}"
11835    fi
11836    { echo "$as_me:$LINENO: result: ${WISH_PROG}" >&5
11837echo "${ECHO_T}${WISH_PROG}" >&6; }
11838
11839
11840
11841#--------------------------------------------------------------------
11842# Finally, substitute all of the various values into the Makefile.
11843# You may alternatively have a special pkgIndex.tcl.in or other files
11844# which require substituting th AC variables in.  Include these here.
11845#--------------------------------------------------------------------
11846
11847ac_config_files="$ac_config_files Makefile"
11848
11849cat >confcache <<\_ACEOF
11850# This file is a shell script that caches the results of configure
11851# tests run on this system so they can be shared between configure
11852# scripts and configure runs, see configure's option --config-cache.
11853# It is not useful on other systems.  If it contains results you don't
11854# want to keep, you may remove or edit it.
11855#
11856# config.status only pays attention to the cache file if you give it
11857# the --recheck option to rerun configure.
11858#
11859# `ac_cv_env_foo' variables (set or unset) will be overridden when
11860# loading this file, other *unset* `ac_cv_foo' will be assigned the
11861# following values.
11862
11863_ACEOF
11864
11865# The following way of writing the cache mishandles newlines in values,
11866# but we know of no workaround that is simple, portable, and efficient.
11867# So, we kill variables containing newlines.
11868# Ultrix sh set writes to stderr and can't be redirected directly,
11869# and sets the high bit in the cache file unless we assign to the vars.
11870(
11871  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
11872    eval ac_val=\$$ac_var
11873    case $ac_val in #(
11874    *${as_nl}*)
11875      case $ac_var in #(
11876      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
11877echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
11878      esac
11879      case $ac_var in #(
11880      _ | IFS | as_nl) ;; #(
11881      *) $as_unset $ac_var ;;
11882      esac ;;
11883    esac
11884  done
11885
11886  (set) 2>&1 |
11887    case $as_nl`(ac_space=' '; set) 2>&1` in #(
11888    *${as_nl}ac_space=\ *)
11889      # `set' does not quote correctly, so add quotes (double-quote
11890      # substitution turns \\\\ into \\, and sed turns \\ into \).
11891      sed -n \
11892	"s/'/'\\\\''/g;
11893	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
11894      ;; #(
11895    *)
11896      # `set' quotes correctly as required by POSIX, so do not add quotes.
11897      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
11898      ;;
11899    esac |
11900    sort
11901) |
11902  sed '
11903     /^ac_cv_env_/b end
11904     t clear
11905     :clear
11906     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
11907     t end
11908     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
11909     :end' >>confcache
11910if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
11911  if test -w "$cache_file"; then
11912    test "x$cache_file" != "x/dev/null" &&
11913      { echo "$as_me:$LINENO: updating cache $cache_file" >&5
11914echo "$as_me: updating cache $cache_file" >&6;}
11915    cat confcache >$cache_file
11916  else
11917    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
11918echo "$as_me: not updating unwritable cache $cache_file" >&6;}
11919  fi
11920fi
11921rm -f confcache
11922
11923test "x$prefix" = xNONE && prefix=$ac_default_prefix
11924# Let make expand exec_prefix.
11925test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11926
11927# Transform confdefs.h into DEFS.
11928# Protect against shell expansion while executing Makefile rules.
11929# Protect against Makefile macro expansion.
11930#
11931# If the first sed substitution is executed (which looks for macros that
11932# take arguments), then branch to the quote section.  Otherwise,
11933# look for a macro that doesn't take arguments.
11934ac_script='
11935t clear
11936:clear
11937s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
11938t quote
11939s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
11940t quote
11941b any
11942:quote
11943s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
11944s/\[/\\&/g
11945s/\]/\\&/g
11946s/\$/$$/g
11947H
11948:any
11949${
11950	g
11951	s/^\n//
11952	s/\n/ /g
11953	p
11954}
11955'
11956DEFS=`sed -n "$ac_script" confdefs.h`
11957
11958
11959ac_libobjs=
11960ac_ltlibobjs=
11961for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
11962  # 1. Remove the extension, and $U if already installed.
11963  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
11964  ac_i=`echo "$ac_i" | sed "$ac_script"`
11965  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
11966  #    will be set to the directory where LIBOBJS objects are built.
11967  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
11968  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
11969done
11970LIBOBJS=$ac_libobjs
11971
11972LTLIBOBJS=$ac_ltlibobjs
11973
11974
11975CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""
11976
11977: ${CONFIG_STATUS=./config.status}
11978ac_clean_files_save=$ac_clean_files
11979ac_clean_files="$ac_clean_files $CONFIG_STATUS"
11980{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
11981echo "$as_me: creating $CONFIG_STATUS" >&6;}
11982cat >$CONFIG_STATUS <<_ACEOF
11983#! $SHELL
11984# Generated by $as_me.
11985# Run this file to recreate the current configuration.
11986# Compiler output produced by configure, useful for debugging
11987# configure, is in config.log if it exists.
11988
11989debug=false
11990ac_cs_recheck=false
11991ac_cs_silent=false
11992SHELL=\${CONFIG_SHELL-$SHELL}
11993_ACEOF
11994
11995cat >>$CONFIG_STATUS <<\_ACEOF
11996## --------------------- ##
11997## M4sh Initialization.  ##
11998## --------------------- ##
11999
12000# Be more Bourne compatible
12001DUALCASE=1; export DUALCASE # for MKS sh
12002if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
12003  emulate sh
12004  NULLCMD=:
12005  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
12006  # is contrary to our usage.  Disable this feature.
12007  alias -g '${1+"$@"}'='"$@"'
12008  setopt NO_GLOB_SUBST
12009else
12010  case `(set -o) 2>/dev/null` in
12011  *posix*) set -o posix ;;
12012esac
12013
12014fi
12015
12016
12017
12018
12019# PATH needs CR
12020# Avoid depending upon Character Ranges.
12021as_cr_letters='abcdefghijklmnopqrstuvwxyz'
12022as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
12023as_cr_Letters=$as_cr_letters$as_cr_LETTERS
12024as_cr_digits='0123456789'
12025as_cr_alnum=$as_cr_Letters$as_cr_digits
12026
12027# The user is always right.
12028if test "${PATH_SEPARATOR+set}" != set; then
12029  echo "#! /bin/sh" >conf$$.sh
12030  echo  "exit 0"   >>conf$$.sh
12031  chmod +x conf$$.sh
12032  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
12033    PATH_SEPARATOR=';'
12034  else
12035    PATH_SEPARATOR=:
12036  fi
12037  rm -f conf$$.sh
12038fi
12039
12040# Support unset when possible.
12041if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
12042  as_unset=unset
12043else
12044  as_unset=false
12045fi
12046
12047
12048# IFS
12049# We need space, tab and new line, in precisely that order.  Quoting is
12050# there to prevent editors from complaining about space-tab.
12051# (If _AS_PATH_WALK were called with IFS unset, it would disable word
12052# splitting by setting IFS to empty value.)
12053as_nl='
12054'
12055IFS=" ""	$as_nl"
12056
12057# Find who we are.  Look in the path if we contain no directory separator.
12058case $0 in
12059  *[\\/]* ) as_myself=$0 ;;
12060  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12061for as_dir in $PATH
12062do
12063  IFS=$as_save_IFS
12064  test -z "$as_dir" && as_dir=.
12065  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
12066done
12067IFS=$as_save_IFS
12068
12069     ;;
12070esac
12071# We did not find ourselves, most probably we were run as `sh COMMAND'
12072# in which case we are not to be found in the path.
12073if test "x$as_myself" = x; then
12074  as_myself=$0
12075fi
12076if test ! -f "$as_myself"; then
12077  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
12078  { (exit 1); exit 1; }
12079fi
12080
12081# Work around bugs in pre-3.0 UWIN ksh.
12082for as_var in ENV MAIL MAILPATH
12083do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
12084done
12085PS1='$ '
12086PS2='> '
12087PS4='+ '
12088
12089# NLS nuisances.
12090for as_var in \
12091  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
12092  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
12093  LC_TELEPHONE LC_TIME
12094do
12095  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
12096    eval $as_var=C; export $as_var
12097  else
12098    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
12099  fi
12100done
12101
12102# Required to use basename.
12103if expr a : '\(a\)' >/dev/null 2>&1 &&
12104   test "X`expr 00001 : '.*\(...\)'`" = X001; then
12105  as_expr=expr
12106else
12107  as_expr=false
12108fi
12109
12110if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
12111  as_basename=basename
12112else
12113  as_basename=false
12114fi
12115
12116
12117# Name of the executable.
12118as_me=`$as_basename -- "$0" ||
12119$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
12120	 X"$0" : 'X\(//\)$' \| \
12121	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
12122echo X/"$0" |
12123    sed '/^.*\/\([^/][^/]*\)\/*$/{
12124	    s//\1/
12125	    q
12126	  }
12127	  /^X\/\(\/\/\)$/{
12128	    s//\1/
12129	    q
12130	  }
12131	  /^X\/\(\/\).*/{
12132	    s//\1/
12133	    q
12134	  }
12135	  s/.*/./; q'`
12136
12137# CDPATH.
12138$as_unset CDPATH
12139
12140
12141
12142  as_lineno_1=$LINENO
12143  as_lineno_2=$LINENO
12144  test "x$as_lineno_1" != "x$as_lineno_2" &&
12145  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
12146
12147  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
12148  # uniformly replaced by the line number.  The first 'sed' inserts a
12149  # line-number line after each line using $LINENO; the second 'sed'
12150  # does the real work.  The second script uses 'N' to pair each
12151  # line-number line with the line containing $LINENO, and appends
12152  # trailing '-' during substitution so that $LINENO is not a special
12153  # case at line end.
12154  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
12155  # scripts with optimization help from Paolo Bonzini.  Blame Lee
12156  # E. McMahon (1931-1989) for sed's syntax.  :-)
12157  sed -n '
12158    p
12159    /[$]LINENO/=
12160  ' <$as_myself |
12161    sed '
12162      s/[$]LINENO.*/&-/
12163      t lineno
12164      b
12165      :lineno
12166      N
12167      :loop
12168      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
12169      t loop
12170      s/-\n.*//
12171    ' >$as_me.lineno &&
12172  chmod +x "$as_me.lineno" ||
12173    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
12174   { (exit 1); exit 1; }; }
12175
12176  # Don't try to exec as it changes $[0], causing all sort of problems
12177  # (the dirname of $[0] is not the place where we might find the
12178  # original and so on.  Autoconf is especially sensitive to this).
12179  . "./$as_me.lineno"
12180  # Exit status is that of the last command.
12181  exit
12182}
12183
12184
12185if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
12186  as_dirname=dirname
12187else
12188  as_dirname=false
12189fi
12190
12191ECHO_C= ECHO_N= ECHO_T=
12192case `echo -n x` in
12193-n*)
12194  case `echo 'x\c'` in
12195  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
12196  *)   ECHO_C='\c';;
12197  esac;;
12198*)
12199  ECHO_N='-n';;
12200esac
12201
12202if expr a : '\(a\)' >/dev/null 2>&1 &&
12203   test "X`expr 00001 : '.*\(...\)'`" = X001; then
12204  as_expr=expr
12205else
12206  as_expr=false
12207fi
12208
12209rm -f conf$$ conf$$.exe conf$$.file
12210if test -d conf$$.dir; then
12211  rm -f conf$$.dir/conf$$.file
12212else
12213  rm -f conf$$.dir
12214  mkdir conf$$.dir
12215fi
12216echo >conf$$.file
12217if ln -s conf$$.file conf$$ 2>/dev/null; then
12218  as_ln_s='ln -s'
12219  # ... but there are two gotchas:
12220  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
12221  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
12222  # In both cases, we have to default to `cp -p'.
12223  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
12224    as_ln_s='cp -p'
12225elif ln conf$$.file conf$$ 2>/dev/null; then
12226  as_ln_s=ln
12227else
12228  as_ln_s='cp -p'
12229fi
12230rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
12231rmdir conf$$.dir 2>/dev/null
12232
12233if mkdir -p . 2>/dev/null; then
12234  as_mkdir_p=:
12235else
12236  test -d ./-p && rmdir ./-p
12237  as_mkdir_p=false
12238fi
12239
12240if test -x / >/dev/null 2>&1; then
12241  as_test_x='test -x'
12242else
12243  if ls -dL / >/dev/null 2>&1; then
12244    as_ls_L_option=L
12245  else
12246    as_ls_L_option=
12247  fi
12248  as_test_x='
12249    eval sh -c '\''
12250      if test -d "$1"; then
12251        test -d "$1/.";
12252      else
12253	case $1 in
12254        -*)set "./$1";;
12255	esac;
12256	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
12257	???[sx]*):;;*)false;;esac;fi
12258    '\'' sh
12259  '
12260fi
12261as_executable_p=$as_test_x
12262
12263# Sed expression to map a string onto a valid CPP name.
12264as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
12265
12266# Sed expression to map a string onto a valid variable name.
12267as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
12268
12269
12270exec 6>&1
12271
12272# Save the log message, to keep $[0] and so on meaningful, and to
12273# report actual input values of CONFIG_FILES etc. instead of their
12274# values after options handling.
12275ac_log="
12276This file was extended by tkimgwindow $as_me 1.4, which was
12277generated by GNU Autoconf 2.61.  Invocation command line was
12278
12279  CONFIG_FILES    = $CONFIG_FILES
12280  CONFIG_HEADERS  = $CONFIG_HEADERS
12281  CONFIG_LINKS    = $CONFIG_LINKS
12282  CONFIG_COMMANDS = $CONFIG_COMMANDS
12283  $ $0 $@
12284
12285on `(hostname || uname -n) 2>/dev/null | sed 1q`
12286"
12287
12288_ACEOF
12289
12290cat >>$CONFIG_STATUS <<_ACEOF
12291# Files that config.status was made for.
12292config_files="$ac_config_files"
12293
12294_ACEOF
12295
12296cat >>$CONFIG_STATUS <<\_ACEOF
12297ac_cs_usage="\
12298\`$as_me' instantiates files from templates according to the
12299current configuration.
12300
12301Usage: $0 [OPTIONS] [FILE]...
12302
12303  -h, --help       print this help, then exit
12304  -V, --version    print version number and configuration settings, then exit
12305  -q, --quiet      do not print progress messages
12306  -d, --debug      don't remove temporary files
12307      --recheck    update $as_me by reconfiguring in the same conditions
12308  --file=FILE[:TEMPLATE]
12309		   instantiate the configuration file FILE
12310
12311Configuration files:
12312$config_files
12313
12314Report bugs to <bug-autoconf@gnu.org>."
12315
12316_ACEOF
12317cat >>$CONFIG_STATUS <<_ACEOF
12318ac_cs_version="\\
12319tkimgwindow config.status 1.4
12320configured by $0, generated by GNU Autoconf 2.61,
12321  with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
12322
12323Copyright (C) 2006 Free Software Foundation, Inc.
12324This config.status script is free software; the Free Software Foundation
12325gives unlimited permission to copy, distribute and modify it."
12326
12327ac_pwd='$ac_pwd'
12328srcdir='$srcdir'
12329INSTALL='$INSTALL'
12330_ACEOF
12331
12332cat >>$CONFIG_STATUS <<\_ACEOF
12333# If no file are specified by the user, then we need to provide default
12334# value.  By we need to know if files were specified by the user.
12335ac_need_defaults=:
12336while test $# != 0
12337do
12338  case $1 in
12339  --*=*)
12340    ac_option=`expr "X$1" : 'X\([^=]*\)='`
12341    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
12342    ac_shift=:
12343    ;;
12344  *)
12345    ac_option=$1
12346    ac_optarg=$2
12347    ac_shift=shift
12348    ;;
12349  esac
12350
12351  case $ac_option in
12352  # Handling of the options.
12353  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12354    ac_cs_recheck=: ;;
12355  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
12356    echo "$ac_cs_version"; exit ;;
12357  --debug | --debu | --deb | --de | --d | -d )
12358    debug=: ;;
12359  --file | --fil | --fi | --f )
12360    $ac_shift
12361    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
12362    ac_need_defaults=false;;
12363  --he | --h |  --help | --hel | -h )
12364    echo "$ac_cs_usage"; exit ;;
12365  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
12366  | -silent | --silent | --silen | --sile | --sil | --si | --s)
12367    ac_cs_silent=: ;;
12368
12369  # This is an error.
12370  -*) { echo "$as_me: error: unrecognized option: $1
12371Try \`$0 --help' for more information." >&2
12372   { (exit 1); exit 1; }; } ;;
12373
12374  *) ac_config_targets="$ac_config_targets $1"
12375     ac_need_defaults=false ;;
12376
12377  esac
12378  shift
12379done
12380
12381ac_configure_extra_args=
12382
12383if $ac_cs_silent; then
12384  exec 6>/dev/null
12385  ac_configure_extra_args="$ac_configure_extra_args --silent"
12386fi
12387
12388_ACEOF
12389cat >>$CONFIG_STATUS <<_ACEOF
12390if \$ac_cs_recheck; then
12391  echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
12392  CONFIG_SHELL=$SHELL
12393  export CONFIG_SHELL
12394  exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
12395fi
12396
12397_ACEOF
12398cat >>$CONFIG_STATUS <<\_ACEOF
12399exec 5>>config.log
12400{
12401  echo
12402  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
12403## Running $as_me. ##
12404_ASBOX
12405  echo "$ac_log"
12406} >&5
12407
12408_ACEOF
12409cat >>$CONFIG_STATUS <<_ACEOF
12410_ACEOF
12411
12412cat >>$CONFIG_STATUS <<\_ACEOF
12413
12414# Handling of arguments.
12415for ac_config_target in $ac_config_targets
12416do
12417  case $ac_config_target in
12418    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
12419
12420  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
12421echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
12422   { (exit 1); exit 1; }; };;
12423  esac
12424done
12425
12426
12427# If the user did not use the arguments to specify the items to instantiate,
12428# then the envvar interface is used.  Set only those that are not.
12429# We use the long form for the default assignment because of an extremely
12430# bizarre bug on SunOS 4.1.3.
12431if $ac_need_defaults; then
12432  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
12433fi
12434
12435# Have a temporary directory for convenience.  Make it in the build tree
12436# simply because there is no reason against having it here, and in addition,
12437# creating and moving files from /tmp can sometimes cause problems.
12438# Hook for its removal unless debugging.
12439# Note that there is a small window in which the directory will not be cleaned:
12440# after its creation but before its name has been assigned to `$tmp'.
12441$debug ||
12442{
12443  tmp=
12444  trap 'exit_status=$?
12445  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
12446' 0
12447  trap '{ (exit 1); exit 1; }' 1 2 13 15
12448}
12449# Create a (secure) tmp directory for tmp files.
12450
12451{
12452  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
12453  test -n "$tmp" && test -d "$tmp"
12454}  ||
12455{
12456  tmp=./conf$$-$RANDOM
12457  (umask 077 && mkdir "$tmp")
12458} ||
12459{
12460   echo "$me: cannot create a temporary directory in ." >&2
12461   { (exit 1); exit 1; }
12462}
12463
12464#
12465# Set up the sed scripts for CONFIG_FILES section.
12466#
12467
12468# No need to generate the scripts if there are no CONFIG_FILES.
12469# This happens for instance when ./config.status config.h
12470if test -n "$CONFIG_FILES"; then
12471
12472_ACEOF
12473
12474
12475
12476ac_delim='%!_!# '
12477for ac_last_try in false false false false false :; do
12478  cat >conf$$subs.sed <<_ACEOF
12479SHELL!$SHELL$ac_delim
12480PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
12481PACKAGE_NAME!$PACKAGE_NAME$ac_delim
12482PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
12483PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
12484PACKAGE_STRING!$PACKAGE_STRING$ac_delim
12485PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
12486exec_prefix!$exec_prefix$ac_delim
12487prefix!$prefix$ac_delim
12488program_transform_name!$program_transform_name$ac_delim
12489bindir!$bindir$ac_delim
12490sbindir!$sbindir$ac_delim
12491libexecdir!$libexecdir$ac_delim
12492datarootdir!$datarootdir$ac_delim
12493datadir!$datadir$ac_delim
12494sysconfdir!$sysconfdir$ac_delim
12495sharedstatedir!$sharedstatedir$ac_delim
12496localstatedir!$localstatedir$ac_delim
12497includedir!$includedir$ac_delim
12498oldincludedir!$oldincludedir$ac_delim
12499docdir!$docdir$ac_delim
12500infodir!$infodir$ac_delim
12501htmldir!$htmldir$ac_delim
12502dvidir!$dvidir$ac_delim
12503pdfdir!$pdfdir$ac_delim
12504psdir!$psdir$ac_delim
12505libdir!$libdir$ac_delim
12506localedir!$localedir$ac_delim
12507mandir!$mandir$ac_delim
12508DEFS!$DEFS$ac_delim
12509ECHO_C!$ECHO_C$ac_delim
12510ECHO_N!$ECHO_N$ac_delim
12511ECHO_T!$ECHO_T$ac_delim
12512LIBS!$LIBS$ac_delim
12513build_alias!$build_alias$ac_delim
12514host_alias!$host_alias$ac_delim
12515target_alias!$target_alias$ac_delim
12516CYGPATH!$CYGPATH$ac_delim
12517EXEEXT!$EXEEXT$ac_delim
12518PKG_LIB_FILE!$PKG_LIB_FILE$ac_delim
12519PKG_STUB_LIB_FILE!$PKG_STUB_LIB_FILE$ac_delim
12520PKG_STUB_SOURCES!$PKG_STUB_SOURCES$ac_delim
12521PKG_STUB_OBJECTS!$PKG_STUB_OBJECTS$ac_delim
12522PKG_TCL_SOURCES!$PKG_TCL_SOURCES$ac_delim
12523PKG_HEADERS!$PKG_HEADERS$ac_delim
12524PKG_INCLUDES!$PKG_INCLUDES$ac_delim
12525PKG_LIBS!$PKG_LIBS$ac_delim
12526PKG_CFLAGS!$PKG_CFLAGS$ac_delim
12527PACKAGE_TCLNAME!$PACKAGE_TCLNAME$ac_delim
12528TCL_VERSION!$TCL_VERSION$ac_delim
12529TCL_PATCH_LEVEL!$TCL_PATCH_LEVEL$ac_delim
12530TCL_BIN_DIR!$TCL_BIN_DIR$ac_delim
12531TCL_SRC_DIR!$TCL_SRC_DIR$ac_delim
12532TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim
12533TCL_LIB_FLAG!$TCL_LIB_FLAG$ac_delim
12534TCL_LIB_SPEC!$TCL_LIB_SPEC$ac_delim
12535TCL_STUB_LIB_FILE!$TCL_STUB_LIB_FILE$ac_delim
12536TCL_STUB_LIB_FLAG!$TCL_STUB_LIB_FLAG$ac_delim
12537TCL_STUB_LIB_SPEC!$TCL_STUB_LIB_SPEC$ac_delim
12538CLEANFILES!$CLEANFILES$ac_delim
12539TCL_LIBS!$TCL_LIBS$ac_delim
12540TCL_DEFS!$TCL_DEFS$ac_delim
12541TCL_EXTRA_CFLAGS!$TCL_EXTRA_CFLAGS$ac_delim
12542TCL_LD_FLAGS!$TCL_LD_FLAGS$ac_delim
12543TCL_SHLIB_LD_LIBS!$TCL_SHLIB_LD_LIBS$ac_delim
12544TK_VERSION!$TK_VERSION$ac_delim
12545TK_BIN_DIR!$TK_BIN_DIR$ac_delim
12546TK_SRC_DIR!$TK_SRC_DIR$ac_delim
12547TK_LIB_FILE!$TK_LIB_FILE$ac_delim
12548TK_LIB_FLAG!$TK_LIB_FLAG$ac_delim
12549TK_LIB_SPEC!$TK_LIB_SPEC$ac_delim
12550TK_STUB_LIB_FILE!$TK_STUB_LIB_FILE$ac_delim
12551TK_STUB_LIB_FLAG!$TK_STUB_LIB_FLAG$ac_delim
12552TK_STUB_LIB_SPEC!$TK_STUB_LIB_SPEC$ac_delim
12553TK_LIBS!$TK_LIBS$ac_delim
12554TK_XINCLUDES!$TK_XINCLUDES$ac_delim
12555CC!$CC$ac_delim
12556CFLAGS!$CFLAGS$ac_delim
12557LDFLAGS!$LDFLAGS$ac_delim
12558CPPFLAGS!$CPPFLAGS$ac_delim
12559ac_ct_CC!$ac_ct_CC$ac_delim
12560OBJEXT!$OBJEXT$ac_delim
12561CPP!$CPP$ac_delim
12562INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
12563INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
12564INSTALL_DATA!$INSTALL_DATA$ac_delim
12565SET_MAKE!$SET_MAKE$ac_delim
12566RANLIB!$RANLIB$ac_delim
12567GREP!$GREP$ac_delim
12568EGREP!$EGREP$ac_delim
12569MATH_LIBS!$MATH_LIBS$ac_delim
12570tkimg_VERSION!$tkimg_VERSION$ac_delim
12571tkimg_BIN_DIR!$tkimg_BIN_DIR$ac_delim
12572tkimg_SRC_DIR!$tkimg_SRC_DIR$ac_delim
12573tkimg_LIB_FILE!$tkimg_LIB_FILE$ac_delim
12574tkimg_LIB_SPEC!$tkimg_LIB_SPEC$ac_delim
12575tkimg_STUB_LIB_FILE!$tkimg_STUB_LIB_FILE$ac_delim
12576_ACEOF
12577
12578  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
12579    break
12580  elif $ac_last_try; then
12581    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
12582echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
12583   { (exit 1); exit 1; }; }
12584  else
12585    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
12586  fi
12587done
12588
12589ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
12590if test -n "$ac_eof"; then
12591  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
12592  ac_eof=`expr $ac_eof + 1`
12593fi
12594
12595cat >>$CONFIG_STATUS <<_ACEOF
12596cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
12597/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
12598_ACEOF
12599sed '
12600s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
12601s/^/s,@/; s/!/@,|#_!!_#|/
12602:n
12603t n
12604s/'"$ac_delim"'$/,g/; t
12605s/$/\\/; p
12606N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
12607' >>$CONFIG_STATUS <conf$$subs.sed
12608rm -f conf$$subs.sed
12609cat >>$CONFIG_STATUS <<_ACEOF
12610CEOF$ac_eof
12611_ACEOF
12612
12613
12614ac_delim='%!_!# '
12615for ac_last_try in false false false false false :; do
12616  cat >conf$$subs.sed <<_ACEOF
12617tkimg_STUB_LIB_SPEC!$tkimg_STUB_LIB_SPEC$ac_delim
12618tkimg_STUB_LIB_PATH!$tkimg_STUB_LIB_PATH$ac_delim
12619tkimg_SRC_PATH!$tkimg_SRC_PATH$ac_delim
12620tkimg_BUILD_PATH!$tkimg_BUILD_PATH$ac_delim
12621PKG_SOURCES!$PKG_SOURCES$ac_delim
12622PKG_OBJECTS!$PKG_OBJECTS$ac_delim
12623TCL_INCLUDES!$TCL_INCLUDES$ac_delim
12624TCL_TOP_DIR_NATIVE!$TCL_TOP_DIR_NATIVE$ac_delim
12625TK_INCLUDES!$TK_INCLUDES$ac_delim
12626TK_TOP_DIR_NATIVE!$TK_TOP_DIR_NATIVE$ac_delim
12627TK_XLIB_DIR_NATIVE!$TK_XLIB_DIR_NATIVE$ac_delim
12628TCL_THREADS!$TCL_THREADS$ac_delim
12629SHARED_BUILD!$SHARED_BUILD$ac_delim
12630AR!$AR$ac_delim
12631CELIB_DIR!$CELIB_DIR$ac_delim
12632CFLAGS_DEBUG!$CFLAGS_DEBUG$ac_delim
12633CFLAGS_OPTIMIZE!$CFLAGS_OPTIMIZE$ac_delim
12634CFLAGS_WARNING!$CFLAGS_WARNING$ac_delim
12635STLIB_LD!$STLIB_LD$ac_delim
12636SHLIB_LD!$SHLIB_LD$ac_delim
12637SHLIB_LD_LIBS!$SHLIB_LD_LIBS$ac_delim
12638SHLIB_CFLAGS!$SHLIB_CFLAGS$ac_delim
12639LD_LIBRARY_PATH_VAR!$LD_LIBRARY_PATH_VAR$ac_delim
12640CFLAGS_DEFAULT!$CFLAGS_DEFAULT$ac_delim
12641LDFLAGS_DEFAULT!$LDFLAGS_DEFAULT$ac_delim
12642TCL_DBGX!$TCL_DBGX$ac_delim
12643XMKMF!$XMKMF$ac_delim
12644MAKE_LIB!$MAKE_LIB$ac_delim
12645MAKE_SHARED_LIB!$MAKE_SHARED_LIB$ac_delim
12646MAKE_STATIC_LIB!$MAKE_STATIC_LIB$ac_delim
12647MAKE_STUB_LIB!$MAKE_STUB_LIB$ac_delim
12648RANLIB_STUB!$RANLIB_STUB$ac_delim
12649VC_MANIFEST_EMBED_DLL!$VC_MANIFEST_EMBED_DLL$ac_delim
12650VC_MANIFEST_EMBED_EXE!$VC_MANIFEST_EMBED_EXE$ac_delim
12651TCLSH_PROG!$TCLSH_PROG$ac_delim
12652WISH_PROG!$WISH_PROG$ac_delim
12653LIBOBJS!$LIBOBJS$ac_delim
12654LTLIBOBJS!$LTLIBOBJS$ac_delim
12655_ACEOF
12656
12657  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 38; then
12658    break
12659  elif $ac_last_try; then
12660    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
12661echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
12662   { (exit 1); exit 1; }; }
12663  else
12664    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
12665  fi
12666done
12667
12668ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
12669if test -n "$ac_eof"; then
12670  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
12671  ac_eof=`expr $ac_eof + 1`
12672fi
12673
12674cat >>$CONFIG_STATUS <<_ACEOF
12675cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
12676/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
12677_ACEOF
12678sed '
12679s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
12680s/^/s,@/; s/!/@,|#_!!_#|/
12681:n
12682t n
12683s/'"$ac_delim"'$/,g/; t
12684s/$/\\/; p
12685N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
12686' >>$CONFIG_STATUS <conf$$subs.sed
12687rm -f conf$$subs.sed
12688cat >>$CONFIG_STATUS <<_ACEOF
12689:end
12690s/|#_!!_#|//g
12691CEOF$ac_eof
12692_ACEOF
12693
12694
12695# VPATH may cause trouble with some makes, so we remove $(srcdir),
12696# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
12697# trailing colons and then remove the whole line if VPATH becomes empty
12698# (actually we leave an empty line to preserve line numbers).
12699if test "x$srcdir" = x.; then
12700  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
12701s/:*\$(srcdir):*/:/
12702s/:*\${srcdir}:*/:/
12703s/:*@srcdir@:*/:/
12704s/^\([^=]*=[	 ]*\):*/\1/
12705s/:*$//
12706s/^[^=]*=[	 ]*$//
12707}'
12708fi
12709
12710cat >>$CONFIG_STATUS <<\_ACEOF
12711fi # test -n "$CONFIG_FILES"
12712
12713
12714for ac_tag in  :F $CONFIG_FILES
12715do
12716  case $ac_tag in
12717  :[FHLC]) ac_mode=$ac_tag; continue;;
12718  esac
12719  case $ac_mode$ac_tag in
12720  :[FHL]*:*);;
12721  :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
12722echo "$as_me: error: Invalid tag $ac_tag." >&2;}
12723   { (exit 1); exit 1; }; };;
12724  :[FH]-) ac_tag=-:-;;
12725  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
12726  esac
12727  ac_save_IFS=$IFS
12728  IFS=:
12729  set x $ac_tag
12730  IFS=$ac_save_IFS
12731  shift
12732  ac_file=$1
12733  shift
12734
12735  case $ac_mode in
12736  :L) ac_source=$1;;
12737  :[FH])
12738    ac_file_inputs=
12739    for ac_f
12740    do
12741      case $ac_f in
12742      -) ac_f="$tmp/stdin";;
12743      *) # Look for the file first in the build tree, then in the source tree
12744	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
12745	 # because $ac_f cannot contain `:'.
12746	 test -f "$ac_f" ||
12747	   case $ac_f in
12748	   [\\/$]*) false;;
12749	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
12750	   esac ||
12751	   { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
12752echo "$as_me: error: cannot find input file: $ac_f" >&2;}
12753   { (exit 1); exit 1; }; };;
12754      esac
12755      ac_file_inputs="$ac_file_inputs $ac_f"
12756    done
12757
12758    # Let's still pretend it is `configure' which instantiates (i.e., don't
12759    # use $as_me), people would be surprised to read:
12760    #    /* config.h.  Generated by config.status.  */
12761    configure_input="Generated from "`IFS=:
12762	  echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
12763    if test x"$ac_file" != x-; then
12764      configure_input="$ac_file.  $configure_input"
12765      { echo "$as_me:$LINENO: creating $ac_file" >&5
12766echo "$as_me: creating $ac_file" >&6;}
12767    fi
12768
12769    case $ac_tag in
12770    *:-:* | *:-) cat >"$tmp/stdin";;
12771    esac
12772    ;;
12773  esac
12774
12775  ac_dir=`$as_dirname -- "$ac_file" ||
12776$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12777	 X"$ac_file" : 'X\(//\)[^/]' \| \
12778	 X"$ac_file" : 'X\(//\)$' \| \
12779	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
12780echo X"$ac_file" |
12781    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
12782	    s//\1/
12783	    q
12784	  }
12785	  /^X\(\/\/\)[^/].*/{
12786	    s//\1/
12787	    q
12788	  }
12789	  /^X\(\/\/\)$/{
12790	    s//\1/
12791	    q
12792	  }
12793	  /^X\(\/\).*/{
12794	    s//\1/
12795	    q
12796	  }
12797	  s/.*/./; q'`
12798  { as_dir="$ac_dir"
12799  case $as_dir in #(
12800  -*) as_dir=./$as_dir;;
12801  esac
12802  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
12803    as_dirs=
12804    while :; do
12805      case $as_dir in #(
12806      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
12807      *) as_qdir=$as_dir;;
12808      esac
12809      as_dirs="'$as_qdir' $as_dirs"
12810      as_dir=`$as_dirname -- "$as_dir" ||
12811$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12812	 X"$as_dir" : 'X\(//\)[^/]' \| \
12813	 X"$as_dir" : 'X\(//\)$' \| \
12814	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
12815echo X"$as_dir" |
12816    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
12817	    s//\1/
12818	    q
12819	  }
12820	  /^X\(\/\/\)[^/].*/{
12821	    s//\1/
12822	    q
12823	  }
12824	  /^X\(\/\/\)$/{
12825	    s//\1/
12826	    q
12827	  }
12828	  /^X\(\/\).*/{
12829	    s//\1/
12830	    q
12831	  }
12832	  s/.*/./; q'`
12833      test -d "$as_dir" && break
12834    done
12835    test -z "$as_dirs" || eval "mkdir $as_dirs"
12836  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
12837echo "$as_me: error: cannot create directory $as_dir" >&2;}
12838   { (exit 1); exit 1; }; }; }
12839  ac_builddir=.
12840
12841case "$ac_dir" in
12842.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
12843*)
12844  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
12845  # A ".." for each directory in $ac_dir_suffix.
12846  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
12847  case $ac_top_builddir_sub in
12848  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
12849  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
12850  esac ;;
12851esac
12852ac_abs_top_builddir=$ac_pwd
12853ac_abs_builddir=$ac_pwd$ac_dir_suffix
12854# for backward compatibility:
12855ac_top_builddir=$ac_top_build_prefix
12856
12857case $srcdir in
12858  .)  # We are building in place.
12859    ac_srcdir=.
12860    ac_top_srcdir=$ac_top_builddir_sub
12861    ac_abs_top_srcdir=$ac_pwd ;;
12862  [\\/]* | ?:[\\/]* )  # Absolute name.
12863    ac_srcdir=$srcdir$ac_dir_suffix;
12864    ac_top_srcdir=$srcdir
12865    ac_abs_top_srcdir=$srcdir ;;
12866  *) # Relative name.
12867    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
12868    ac_top_srcdir=$ac_top_build_prefix$srcdir
12869    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
12870esac
12871ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
12872
12873
12874  case $ac_mode in
12875  :F)
12876  #
12877  # CONFIG_FILE
12878  #
12879
12880  case $INSTALL in
12881  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
12882  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
12883  esac
12884_ACEOF
12885
12886cat >>$CONFIG_STATUS <<\_ACEOF
12887# If the template does not know about datarootdir, expand it.
12888# FIXME: This hack should be removed a few years after 2.60.
12889ac_datarootdir_hack=; ac_datarootdir_seen=
12890
12891case `sed -n '/datarootdir/ {
12892  p
12893  q
12894}
12895/@datadir@/p
12896/@docdir@/p
12897/@infodir@/p
12898/@localedir@/p
12899/@mandir@/p
12900' $ac_file_inputs` in
12901*datarootdir*) ac_datarootdir_seen=yes;;
12902*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
12903  { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
12904echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
12905_ACEOF
12906cat >>$CONFIG_STATUS <<_ACEOF
12907  ac_datarootdir_hack='
12908  s&@datadir@&$datadir&g
12909  s&@docdir@&$docdir&g
12910  s&@infodir@&$infodir&g
12911  s&@localedir@&$localedir&g
12912  s&@mandir@&$mandir&g
12913    s&\\\${datarootdir}&$datarootdir&g' ;;
12914esac
12915_ACEOF
12916
12917# Neutralize VPATH when `$srcdir' = `.'.
12918# Shell code in configure.ac might set extrasub.
12919# FIXME: do we really want to maintain this feature?
12920cat >>$CONFIG_STATUS <<_ACEOF
12921  sed "$ac_vpsub
12922$extrasub
12923_ACEOF
12924cat >>$CONFIG_STATUS <<\_ACEOF
12925:t
12926/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
12927s&@configure_input@&$configure_input&;t t
12928s&@top_builddir@&$ac_top_builddir_sub&;t t
12929s&@srcdir@&$ac_srcdir&;t t
12930s&@abs_srcdir@&$ac_abs_srcdir&;t t
12931s&@top_srcdir@&$ac_top_srcdir&;t t
12932s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
12933s&@builddir@&$ac_builddir&;t t
12934s&@abs_builddir@&$ac_abs_builddir&;t t
12935s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
12936s&@INSTALL@&$ac_INSTALL&;t t
12937$ac_datarootdir_hack
12938" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
12939
12940test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
12941  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
12942  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
12943  { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
12944which seems to be undefined.  Please make sure it is defined." >&5
12945echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
12946which seems to be undefined.  Please make sure it is defined." >&2;}
12947
12948  rm -f "$tmp/stdin"
12949  case $ac_file in
12950  -) cat "$tmp/out"; rm -f "$tmp/out";;
12951  *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
12952  esac
12953 ;;
12954
12955
12956
12957  esac
12958
12959done # for ac_tag
12960
12961
12962{ (exit 0); exit 0; }
12963_ACEOF
12964chmod +x $CONFIG_STATUS
12965ac_clean_files=$ac_clean_files_save
12966
12967
12968# configure is writing to config.log, and then calls config.status.
12969# config.status does its own redirection, appending to config.log.
12970# Unfortunately, on DOS this fails, as config.log is still kept open
12971# by configure, so config.status won't be able to write to it; its
12972# output is simply discarded.  So we exec the FD to /dev/null,
12973# effectively closing config.log, so it can be properly (re)opened and
12974# appended to by config.status.  When coming back to configure, we
12975# need to make the FD available again.
12976if test "$no_create" != yes; then
12977  ac_cs_success=:
12978  ac_config_status_args=
12979  test "$silent" = yes &&
12980    ac_config_status_args="$ac_config_status_args --quiet"
12981  exec 5>/dev/null
12982  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
12983  exec 5>>config.log
12984  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
12985  # would make configure fail if this is the last instruction.
12986  $ac_cs_success || { (exit 1); exit 1; }
12987fi
12988
12989
12990#--------------------------------------------------------------------
12991