1#! /bin/sh
2# From configure.in Id: configure.in 287 2010-07-07 11:54:54Z nijtmans .
3# Guess values for system-dependent variables and create Makefiles.
4# Generated by GNU Autoconf 2.61 for tkimgpng 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='tkimgpng'
575PACKAGE_TARNAME='tkimgpng'
576PACKAGE_VERSION='1.4'
577PACKAGE_STRING='tkimgpng 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
715pngtcl_VERSION
716pngtcl_BIN_DIR
717pngtcl_SRC_DIR
718pngtcl_LIB_FILE
719pngtcl_LIB_SPEC
720pngtcl_STUB_LIB_FILE
721pngtcl_STUB_LIB_SPEC
722pngtcl_STUB_LIB_PATH
723zlibtcl_VERSION
724zlibtcl_BIN_DIR
725zlibtcl_SRC_DIR
726zlibtcl_LIB_FILE
727zlibtcl_LIB_SPEC
728zlibtcl_STUB_LIB_FILE
729zlibtcl_STUB_LIB_SPEC
730zlibtcl_STUB_LIB_PATH
731tkimg_SRC_PATH
732tkimg_BUILD_PATH
733pngtcl_SRC_PATH
734pngtcl_BUILD_PATH
735zlibtcl_SRC_PATH
736zlibtcl_BUILD_PATH
737PKG_SOURCES
738PKG_OBJECTS
739TCL_INCLUDES
740TK_INCLUDES
741TCL_THREADS
742SHARED_BUILD
743AR
744CELIB_DIR
745CFLAGS_DEBUG
746CFLAGS_OPTIMIZE
747CFLAGS_WARNING
748STLIB_LD
749SHLIB_LD
750SHLIB_LD_LIBS
751SHLIB_CFLAGS
752LD_LIBRARY_PATH_VAR
753CFLAGS_DEFAULT
754LDFLAGS_DEFAULT
755TCL_DBGX
756XMKMF
757MAKE_LIB
758MAKE_SHARED_LIB
759MAKE_STATIC_LIB
760MAKE_STUB_LIB
761RANLIB_STUB
762VC_MANIFEST_EMBED_DLL
763VC_MANIFEST_EMBED_EXE
764TCLSH_PROG
765WISH_PROG
766LIBOBJS
767LTLIBOBJS'
768ac_subst_files=''
769      ac_precious_vars='build_alias
770host_alias
771target_alias
772CC
773CFLAGS
774LDFLAGS
775LIBS
776CPPFLAGS
777CPP
778XMKMF'
779
780
781# Initialize some variables set by options.
782ac_init_help=
783ac_init_version=false
784# The variables have the same names as the options, with
785# dashes changed to underlines.
786cache_file=/dev/null
787exec_prefix=NONE
788no_create=
789no_recursion=
790prefix=NONE
791program_prefix=NONE
792program_suffix=NONE
793program_transform_name=s,x,x,
794silent=
795site=
796srcdir=
797verbose=
798x_includes=NONE
799x_libraries=NONE
800
801# Installation directory options.
802# These are left unexpanded so users can "make install exec_prefix=/foo"
803# and all the variables that are supposed to be based on exec_prefix
804# by default will actually change.
805# Use braces instead of parens because sh, perl, etc. also accept them.
806# (The list follows the same order as the GNU Coding Standards.)
807bindir='${exec_prefix}/bin'
808sbindir='${exec_prefix}/sbin'
809libexecdir='${exec_prefix}/libexec'
810datarootdir='${prefix}/share'
811datadir='${datarootdir}'
812sysconfdir='${prefix}/etc'
813sharedstatedir='${prefix}/com'
814localstatedir='${prefix}/var'
815includedir='${prefix}/include'
816oldincludedir='/usr/include'
817docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
818infodir='${datarootdir}/info'
819htmldir='${docdir}'
820dvidir='${docdir}'
821pdfdir='${docdir}'
822psdir='${docdir}'
823libdir='${exec_prefix}/lib'
824localedir='${datarootdir}/locale'
825mandir='${datarootdir}/man'
826
827ac_prev=
828ac_dashdash=
829for ac_option
830do
831  # If the previous option needs an argument, assign it.
832  if test -n "$ac_prev"; then
833    eval $ac_prev=\$ac_option
834    ac_prev=
835    continue
836  fi
837
838  case $ac_option in
839  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
840  *)	ac_optarg=yes ;;
841  esac
842
843  # Accept the important Cygnus configure options, so we can diagnose typos.
844
845  case $ac_dashdash$ac_option in
846  --)
847    ac_dashdash=yes ;;
848
849  -bindir | --bindir | --bindi | --bind | --bin | --bi)
850    ac_prev=bindir ;;
851  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
852    bindir=$ac_optarg ;;
853
854  -build | --build | --buil | --bui | --bu)
855    ac_prev=build_alias ;;
856  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
857    build_alias=$ac_optarg ;;
858
859  -cache-file | --cache-file | --cache-fil | --cache-fi \
860  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
861    ac_prev=cache_file ;;
862  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
863  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
864    cache_file=$ac_optarg ;;
865
866  --config-cache | -C)
867    cache_file=config.cache ;;
868
869  -datadir | --datadir | --datadi | --datad)
870    ac_prev=datadir ;;
871  -datadir=* | --datadir=* | --datadi=* | --datad=*)
872    datadir=$ac_optarg ;;
873
874  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
875  | --dataroo | --dataro | --datar)
876    ac_prev=datarootdir ;;
877  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
878  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
879    datarootdir=$ac_optarg ;;
880
881  -disable-* | --disable-*)
882    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
883    # Reject names that are not valid shell variable names.
884    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
885      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
886   { (exit 1); exit 1; }; }
887    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
888    eval enable_$ac_feature=no ;;
889
890  -docdir | --docdir | --docdi | --doc | --do)
891    ac_prev=docdir ;;
892  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
893    docdir=$ac_optarg ;;
894
895  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
896    ac_prev=dvidir ;;
897  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
898    dvidir=$ac_optarg ;;
899
900  -enable-* | --enable-*)
901    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
902    # Reject names that are not valid shell variable names.
903    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
904      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
905   { (exit 1); exit 1; }; }
906    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
907    eval enable_$ac_feature=\$ac_optarg ;;
908
909  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
910  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
911  | --exec | --exe | --ex)
912    ac_prev=exec_prefix ;;
913  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
914  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
915  | --exec=* | --exe=* | --ex=*)
916    exec_prefix=$ac_optarg ;;
917
918  -gas | --gas | --ga | --g)
919    # Obsolete; use --with-gas.
920    with_gas=yes ;;
921
922  -help | --help | --hel | --he | -h)
923    ac_init_help=long ;;
924  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
925    ac_init_help=recursive ;;
926  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
927    ac_init_help=short ;;
928
929  -host | --host | --hos | --ho)
930    ac_prev=host_alias ;;
931  -host=* | --host=* | --hos=* | --ho=*)
932    host_alias=$ac_optarg ;;
933
934  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
935    ac_prev=htmldir ;;
936  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
937  | --ht=*)
938    htmldir=$ac_optarg ;;
939
940  -includedir | --includedir | --includedi | --included | --include \
941  | --includ | --inclu | --incl | --inc)
942    ac_prev=includedir ;;
943  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
944  | --includ=* | --inclu=* | --incl=* | --inc=*)
945    includedir=$ac_optarg ;;
946
947  -infodir | --infodir | --infodi | --infod | --info | --inf)
948    ac_prev=infodir ;;
949  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
950    infodir=$ac_optarg ;;
951
952  -libdir | --libdir | --libdi | --libd)
953    ac_prev=libdir ;;
954  -libdir=* | --libdir=* | --libdi=* | --libd=*)
955    libdir=$ac_optarg ;;
956
957  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
958  | --libexe | --libex | --libe)
959    ac_prev=libexecdir ;;
960  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
961  | --libexe=* | --libex=* | --libe=*)
962    libexecdir=$ac_optarg ;;
963
964  -localedir | --localedir | --localedi | --localed | --locale)
965    ac_prev=localedir ;;
966  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
967    localedir=$ac_optarg ;;
968
969  -localstatedir | --localstatedir | --localstatedi | --localstated \
970  | --localstate | --localstat | --localsta | --localst | --locals)
971    ac_prev=localstatedir ;;
972  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
973  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
974    localstatedir=$ac_optarg ;;
975
976  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
977    ac_prev=mandir ;;
978  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
979    mandir=$ac_optarg ;;
980
981  -nfp | --nfp | --nf)
982    # Obsolete; use --without-fp.
983    with_fp=no ;;
984
985  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
986  | --no-cr | --no-c | -n)
987    no_create=yes ;;
988
989  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
990  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
991    no_recursion=yes ;;
992
993  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
994  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
995  | --oldin | --oldi | --old | --ol | --o)
996    ac_prev=oldincludedir ;;
997  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
998  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
999  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1000    oldincludedir=$ac_optarg ;;
1001
1002  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1003    ac_prev=prefix ;;
1004  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1005    prefix=$ac_optarg ;;
1006
1007  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1008  | --program-pre | --program-pr | --program-p)
1009    ac_prev=program_prefix ;;
1010  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1011  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1012    program_prefix=$ac_optarg ;;
1013
1014  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1015  | --program-suf | --program-su | --program-s)
1016    ac_prev=program_suffix ;;
1017  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1018  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1019    program_suffix=$ac_optarg ;;
1020
1021  -program-transform-name | --program-transform-name \
1022  | --program-transform-nam | --program-transform-na \
1023  | --program-transform-n | --program-transform- \
1024  | --program-transform | --program-transfor \
1025  | --program-transfo | --program-transf \
1026  | --program-trans | --program-tran \
1027  | --progr-tra | --program-tr | --program-t)
1028    ac_prev=program_transform_name ;;
1029  -program-transform-name=* | --program-transform-name=* \
1030  | --program-transform-nam=* | --program-transform-na=* \
1031  | --program-transform-n=* | --program-transform-=* \
1032  | --program-transform=* | --program-transfor=* \
1033  | --program-transfo=* | --program-transf=* \
1034  | --program-trans=* | --program-tran=* \
1035  | --progr-tra=* | --program-tr=* | --program-t=*)
1036    program_transform_name=$ac_optarg ;;
1037
1038  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1039    ac_prev=pdfdir ;;
1040  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1041    pdfdir=$ac_optarg ;;
1042
1043  -psdir | --psdir | --psdi | --psd | --ps)
1044    ac_prev=psdir ;;
1045  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1046    psdir=$ac_optarg ;;
1047
1048  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1049  | -silent | --silent | --silen | --sile | --sil)
1050    silent=yes ;;
1051
1052  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1053    ac_prev=sbindir ;;
1054  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1055  | --sbi=* | --sb=*)
1056    sbindir=$ac_optarg ;;
1057
1058  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1059  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1060  | --sharedst | --shareds | --shared | --share | --shar \
1061  | --sha | --sh)
1062    ac_prev=sharedstatedir ;;
1063  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1064  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1065  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1066  | --sha=* | --sh=*)
1067    sharedstatedir=$ac_optarg ;;
1068
1069  -site | --site | --sit)
1070    ac_prev=site ;;
1071  -site=* | --site=* | --sit=*)
1072    site=$ac_optarg ;;
1073
1074  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1075    ac_prev=srcdir ;;
1076  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1077    srcdir=$ac_optarg ;;
1078
1079  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1080  | --syscon | --sysco | --sysc | --sys | --sy)
1081    ac_prev=sysconfdir ;;
1082  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1083  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1084    sysconfdir=$ac_optarg ;;
1085
1086  -target | --target | --targe | --targ | --tar | --ta | --t)
1087    ac_prev=target_alias ;;
1088  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1089    target_alias=$ac_optarg ;;
1090
1091  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1092    verbose=yes ;;
1093
1094  -version | --version | --versio | --versi | --vers | -V)
1095    ac_init_version=: ;;
1096
1097  -with-* | --with-*)
1098    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1099    # Reject names that are not valid shell variable names.
1100    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1101      { echo "$as_me: error: invalid package name: $ac_package" >&2
1102   { (exit 1); exit 1; }; }
1103    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1104    eval with_$ac_package=\$ac_optarg ;;
1105
1106  -without-* | --without-*)
1107    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1108    # Reject names that are not valid shell variable names.
1109    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1110      { echo "$as_me: error: invalid package name: $ac_package" >&2
1111   { (exit 1); exit 1; }; }
1112    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1113    eval with_$ac_package=no ;;
1114
1115  --x)
1116    # Obsolete; use --with-x.
1117    with_x=yes ;;
1118
1119  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1120  | --x-incl | --x-inc | --x-in | --x-i)
1121    ac_prev=x_includes ;;
1122  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1123  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1124    x_includes=$ac_optarg ;;
1125
1126  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1127  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1128    ac_prev=x_libraries ;;
1129  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1130  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1131    x_libraries=$ac_optarg ;;
1132
1133  -*) { echo "$as_me: error: unrecognized option: $ac_option
1134Try \`$0 --help' for more information." >&2
1135   { (exit 1); exit 1; }; }
1136    ;;
1137
1138  *=*)
1139    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1140    # Reject names that are not valid shell variable names.
1141    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1142      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1143   { (exit 1); exit 1; }; }
1144    eval $ac_envvar=\$ac_optarg
1145    export $ac_envvar ;;
1146
1147  *)
1148    # FIXME: should be removed in autoconf 3.0.
1149    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1150    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1151      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1152    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1153    ;;
1154
1155  esac
1156done
1157
1158if test -n "$ac_prev"; then
1159  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1160  { echo "$as_me: error: missing argument to $ac_option" >&2
1161   { (exit 1); exit 1; }; }
1162fi
1163
1164# Be sure to have absolute directory names.
1165for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1166		datadir sysconfdir sharedstatedir localstatedir includedir \
1167		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1168		libdir localedir mandir
1169do
1170  eval ac_val=\$$ac_var
1171  case $ac_val in
1172    [\\/$]* | ?:[\\/]* )  continue;;
1173    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1174  esac
1175  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1176   { (exit 1); exit 1; }; }
1177done
1178
1179# There might be people who depend on the old broken behavior: `$host'
1180# used to hold the argument of --host etc.
1181# FIXME: To remove some day.
1182build=$build_alias
1183host=$host_alias
1184target=$target_alias
1185
1186# FIXME: To remove some day.
1187if test "x$host_alias" != x; then
1188  if test "x$build_alias" = x; then
1189    cross_compiling=maybe
1190    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1191    If a cross compiler is detected then cross compile mode will be used." >&2
1192  elif test "x$build_alias" != "x$host_alias"; then
1193    cross_compiling=yes
1194  fi
1195fi
1196
1197ac_tool_prefix=
1198test -n "$host_alias" && ac_tool_prefix=$host_alias-
1199
1200test "$silent" = yes && exec 6>/dev/null
1201
1202
1203ac_pwd=`pwd` && test -n "$ac_pwd" &&
1204ac_ls_di=`ls -di .` &&
1205ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1206  { echo "$as_me: error: Working directory cannot be determined" >&2
1207   { (exit 1); exit 1; }; }
1208test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1209  { echo "$as_me: error: pwd does not report name of working directory" >&2
1210   { (exit 1); exit 1; }; }
1211
1212
1213# Find the source files, if location was not specified.
1214if test -z "$srcdir"; then
1215  ac_srcdir_defaulted=yes
1216  # Try the directory containing this script, then the parent directory.
1217  ac_confdir=`$as_dirname -- "$0" ||
1218$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1219	 X"$0" : 'X\(//\)[^/]' \| \
1220	 X"$0" : 'X\(//\)$' \| \
1221	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1222echo X"$0" |
1223    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1224	    s//\1/
1225	    q
1226	  }
1227	  /^X\(\/\/\)[^/].*/{
1228	    s//\1/
1229	    q
1230	  }
1231	  /^X\(\/\/\)$/{
1232	    s//\1/
1233	    q
1234	  }
1235	  /^X\(\/\).*/{
1236	    s//\1/
1237	    q
1238	  }
1239	  s/.*/./; q'`
1240  srcdir=$ac_confdir
1241  if test ! -r "$srcdir/$ac_unique_file"; then
1242    srcdir=..
1243  fi
1244else
1245  ac_srcdir_defaulted=no
1246fi
1247if test ! -r "$srcdir/$ac_unique_file"; then
1248  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1249  { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1250   { (exit 1); exit 1; }; }
1251fi
1252ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1253ac_abs_confdir=`(
1254	cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
1255   { (exit 1); exit 1; }; }
1256	pwd)`
1257# When building in place, set srcdir=.
1258if test "$ac_abs_confdir" = "$ac_pwd"; then
1259  srcdir=.
1260fi
1261# Remove unnecessary trailing slashes from srcdir.
1262# Double slashes in file names in object file debugging info
1263# mess up M-x gdb in Emacs.
1264case $srcdir in
1265*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1266esac
1267for ac_var in $ac_precious_vars; do
1268  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1269  eval ac_env_${ac_var}_value=\$${ac_var}
1270  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1271  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1272done
1273
1274#
1275# Report the --help message.
1276#
1277if test "$ac_init_help" = "long"; then
1278  # Omit some internal or obsolete options to make the list less imposing.
1279  # This message is too long to be a string in the A/UX 3.1 sh.
1280  cat <<_ACEOF
1281\`configure' configures tkimgpng 1.4 to adapt to many kinds of systems.
1282
1283Usage: $0 [OPTION]... [VAR=VALUE]...
1284
1285To assign environment variables (e.g., CC, CFLAGS...), specify them as
1286VAR=VALUE.  See below for descriptions of some of the useful variables.
1287
1288Defaults for the options are specified in brackets.
1289
1290Configuration:
1291  -h, --help              display this help and exit
1292      --help=short        display options specific to this package
1293      --help=recursive    display the short help of all the included packages
1294  -V, --version           display version information and exit
1295  -q, --quiet, --silent   do not print \`checking...' messages
1296      --cache-file=FILE   cache test results in FILE [disabled]
1297  -C, --config-cache      alias for \`--cache-file=config.cache'
1298  -n, --no-create         do not create output files
1299      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1300
1301Installation directories:
1302  --prefix=PREFIX         install architecture-independent files in PREFIX
1303			  [$ac_default_prefix]
1304  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1305			  [PREFIX]
1306
1307By default, \`make install' will install all the files in
1308\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1309an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1310for instance \`--prefix=\$HOME'.
1311
1312For better control, use the options below.
1313
1314Fine tuning of the installation directories:
1315  --bindir=DIR           user executables [EPREFIX/bin]
1316  --sbindir=DIR          system admin executables [EPREFIX/sbin]
1317  --libexecdir=DIR       program executables [EPREFIX/libexec]
1318  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
1319  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
1320  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
1321  --libdir=DIR           object code libraries [EPREFIX/lib]
1322  --includedir=DIR       C header files [PREFIX/include]
1323  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
1324  --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
1325  --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
1326  --infodir=DIR          info documentation [DATAROOTDIR/info]
1327  --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
1328  --mandir=DIR           man documentation [DATAROOTDIR/man]
1329  --docdir=DIR           documentation root [DATAROOTDIR/doc/tkimgpng]
1330  --htmldir=DIR          html documentation [DOCDIR]
1331  --dvidir=DIR           dvi documentation [DOCDIR]
1332  --pdfdir=DIR           pdf documentation [DOCDIR]
1333  --psdir=DIR            ps documentation [DOCDIR]
1334_ACEOF
1335
1336  cat <<\_ACEOF
1337
1338X features:
1339  --x-includes=DIR    X include files are in DIR
1340  --x-libraries=DIR   X library files are in DIR
1341_ACEOF
1342fi
1343
1344if test -n "$ac_init_help"; then
1345  case $ac_init_help in
1346     short | recursive ) echo "Configuration of tkimgpng 1.4:";;
1347   esac
1348  cat <<\_ACEOF
1349
1350Optional Features:
1351  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1352  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1353  --enable-threads        build with threads
1354  --enable-shared         build and link with shared libraries (default: on)
1355  --enable-64bit          enable 64bit support (default: off)
1356  --enable-64bit-vis      enable 64bit Sparc VIS support (default: off)
1357  --disable-rpath         disable rpath support (default: on)
1358  --enable-wince          enable Win/CE support (where applicable)
1359  --enable-symbols        build with debugging symbols (default: off)
1360
1361Optional Packages:
1362  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1363  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1364  --with-tcl              directory containing tcl configuration
1365                          (tclConfig.sh)
1366  --with-tk               directory containing tk configuration (tkConfig.sh)
1367  --with-tkimg              directory containing tkimg configuration (tkimgConfig.sh)
1368  --with-pngtcl              directory containing pngtcl configuration (pngtclConfig.sh)
1369  --with-zlibtcl              directory containing zlibtcl configuration (zlibtclConfig.sh)
1370  --with-tclinclude       directory containing the public Tcl header files
1371  --with-tkinclude        directory containing the public Tk header files
1372  --with-celib=DIR        use Windows/CE support library from DIR
1373  --with-x                use the X Window System
1374
1375Some influential environment variables:
1376  CC          C compiler command
1377  CFLAGS      C compiler flags
1378  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1379              nonstandard directory <lib dir>
1380  LIBS        libraries to pass to the linker, e.g. -l<library>
1381  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1382              you have headers in a nonstandard directory <include dir>
1383  CPP         C preprocessor
1384  XMKMF       Path to xmkmf, Makefile generator for X Window System
1385
1386Use these variables to override the choices made by `configure' or to help
1387it to find libraries and programs with nonstandard names/locations.
1388
1389_ACEOF
1390ac_status=$?
1391fi
1392
1393if test "$ac_init_help" = "recursive"; then
1394  # If there are subdirs, report their specific --help.
1395  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1396    test -d "$ac_dir" || continue
1397    ac_builddir=.
1398
1399case "$ac_dir" in
1400.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1401*)
1402  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
1403  # A ".." for each directory in $ac_dir_suffix.
1404  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1405  case $ac_top_builddir_sub in
1406  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1407  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1408  esac ;;
1409esac
1410ac_abs_top_builddir=$ac_pwd
1411ac_abs_builddir=$ac_pwd$ac_dir_suffix
1412# for backward compatibility:
1413ac_top_builddir=$ac_top_build_prefix
1414
1415case $srcdir in
1416  .)  # We are building in place.
1417    ac_srcdir=.
1418    ac_top_srcdir=$ac_top_builddir_sub
1419    ac_abs_top_srcdir=$ac_pwd ;;
1420  [\\/]* | ?:[\\/]* )  # Absolute name.
1421    ac_srcdir=$srcdir$ac_dir_suffix;
1422    ac_top_srcdir=$srcdir
1423    ac_abs_top_srcdir=$srcdir ;;
1424  *) # Relative name.
1425    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1426    ac_top_srcdir=$ac_top_build_prefix$srcdir
1427    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1428esac
1429ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1430
1431    cd "$ac_dir" || { ac_status=$?; continue; }
1432    # Check for guested configure.
1433    if test -f "$ac_srcdir/configure.gnu"; then
1434      echo &&
1435      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1436    elif test -f "$ac_srcdir/configure"; then
1437      echo &&
1438      $SHELL "$ac_srcdir/configure" --help=recursive
1439    else
1440      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1441    fi || ac_status=$?
1442    cd "$ac_pwd" || { ac_status=$?; break; }
1443  done
1444fi
1445
1446test -n "$ac_init_help" && exit $ac_status
1447if $ac_init_version; then
1448  cat <<\_ACEOF
1449tkimgpng configure 1.4
1450generated by GNU Autoconf 2.61
1451
1452Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14532002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1454This configure script is free software; the Free Software Foundation
1455gives unlimited permission to copy, distribute and modify it.
1456_ACEOF
1457  exit
1458fi
1459cat >config.log <<_ACEOF
1460This file contains any messages produced by compilers while
1461running configure, to aid debugging if configure makes a mistake.
1462
1463It was created by tkimgpng $as_me 1.4, which was
1464generated by GNU Autoconf 2.61.  Invocation command line was
1465
1466  $ $0 $@
1467
1468_ACEOF
1469exec 5>>config.log
1470{
1471cat <<_ASUNAME
1472## --------- ##
1473## Platform. ##
1474## --------- ##
1475
1476hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1477uname -m = `(uname -m) 2>/dev/null || echo unknown`
1478uname -r = `(uname -r) 2>/dev/null || echo unknown`
1479uname -s = `(uname -s) 2>/dev/null || echo unknown`
1480uname -v = `(uname -v) 2>/dev/null || echo unknown`
1481
1482/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1483/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1484
1485/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1486/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1487/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1488/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1489/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1490/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1491/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1492
1493_ASUNAME
1494
1495as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1496for as_dir in $PATH
1497do
1498  IFS=$as_save_IFS
1499  test -z "$as_dir" && as_dir=.
1500  echo "PATH: $as_dir"
1501done
1502IFS=$as_save_IFS
1503
1504} >&5
1505
1506cat >&5 <<_ACEOF
1507
1508
1509## ----------- ##
1510## Core tests. ##
1511## ----------- ##
1512
1513_ACEOF
1514
1515
1516# Keep a trace of the command line.
1517# Strip out --no-create and --no-recursion so they do not pile up.
1518# Strip out --silent because we don't want to record it for future runs.
1519# Also quote any args containing shell meta-characters.
1520# Make two passes to allow for proper duplicate-argument suppression.
1521ac_configure_args=
1522ac_configure_args0=
1523ac_configure_args1=
1524ac_must_keep_next=false
1525for ac_pass in 1 2
1526do
1527  for ac_arg
1528  do
1529    case $ac_arg in
1530    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1531    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1532    | -silent | --silent | --silen | --sile | --sil)
1533      continue ;;
1534    *\'*)
1535      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1536    esac
1537    case $ac_pass in
1538    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1539    2)
1540      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1541      if test $ac_must_keep_next = true; then
1542	ac_must_keep_next=false # Got value, back to normal.
1543      else
1544	case $ac_arg in
1545	  *=* | --config-cache | -C | -disable-* | --disable-* \
1546	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1547	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1548	  | -with-* | --with-* | -without-* | --without-* | --x)
1549	    case "$ac_configure_args0 " in
1550	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1551	    esac
1552	    ;;
1553	  -* ) ac_must_keep_next=true ;;
1554	esac
1555      fi
1556      ac_configure_args="$ac_configure_args '$ac_arg'"
1557      ;;
1558    esac
1559  done
1560done
1561$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1562$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1563
1564# When interrupted or exit'd, cleanup temporary files, and complete
1565# config.log.  We remove comments because anyway the quotes in there
1566# would cause problems or look ugly.
1567# WARNING: Use '\'' to represent an apostrophe within the trap.
1568# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1569trap 'exit_status=$?
1570  # Save into config.log some information that might help in debugging.
1571  {
1572    echo
1573
1574    cat <<\_ASBOX
1575## ---------------- ##
1576## Cache variables. ##
1577## ---------------- ##
1578_ASBOX
1579    echo
1580    # The following way of writing the cache mishandles newlines in values,
1581(
1582  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1583    eval ac_val=\$$ac_var
1584    case $ac_val in #(
1585    *${as_nl}*)
1586      case $ac_var in #(
1587      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1588echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1589      esac
1590      case $ac_var in #(
1591      _ | IFS | as_nl) ;; #(
1592      *) $as_unset $ac_var ;;
1593      esac ;;
1594    esac
1595  done
1596  (set) 2>&1 |
1597    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1598    *${as_nl}ac_space=\ *)
1599      sed -n \
1600	"s/'\''/'\''\\\\'\'''\''/g;
1601	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1602      ;; #(
1603    *)
1604      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1605      ;;
1606    esac |
1607    sort
1608)
1609    echo
1610
1611    cat <<\_ASBOX
1612## ----------------- ##
1613## Output variables. ##
1614## ----------------- ##
1615_ASBOX
1616    echo
1617    for ac_var in $ac_subst_vars
1618    do
1619      eval ac_val=\$$ac_var
1620      case $ac_val in
1621      *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1622      esac
1623      echo "$ac_var='\''$ac_val'\''"
1624    done | sort
1625    echo
1626
1627    if test -n "$ac_subst_files"; then
1628      cat <<\_ASBOX
1629## ------------------- ##
1630## File substitutions. ##
1631## ------------------- ##
1632_ASBOX
1633      echo
1634      for ac_var in $ac_subst_files
1635      do
1636	eval ac_val=\$$ac_var
1637	case $ac_val in
1638	*\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1639	esac
1640	echo "$ac_var='\''$ac_val'\''"
1641      done | sort
1642      echo
1643    fi
1644
1645    if test -s confdefs.h; then
1646      cat <<\_ASBOX
1647## ----------- ##
1648## confdefs.h. ##
1649## ----------- ##
1650_ASBOX
1651      echo
1652      cat confdefs.h
1653      echo
1654    fi
1655    test "$ac_signal" != 0 &&
1656      echo "$as_me: caught signal $ac_signal"
1657    echo "$as_me: exit $exit_status"
1658  } >&5
1659  rm -f core *.core core.conftest.* &&
1660    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1661    exit $exit_status
1662' 0
1663for ac_signal in 1 2 13 15; do
1664  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1665done
1666ac_signal=0
1667
1668# confdefs.h avoids OS command line length limits that DEFS can exceed.
1669rm -f -r conftest* confdefs.h
1670
1671# Predefined preprocessor variables.
1672
1673cat >>confdefs.h <<_ACEOF
1674#define PACKAGE_NAME "$PACKAGE_NAME"
1675_ACEOF
1676
1677
1678cat >>confdefs.h <<_ACEOF
1679#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1680_ACEOF
1681
1682
1683cat >>confdefs.h <<_ACEOF
1684#define PACKAGE_VERSION "$PACKAGE_VERSION"
1685_ACEOF
1686
1687
1688cat >>confdefs.h <<_ACEOF
1689#define PACKAGE_STRING "$PACKAGE_STRING"
1690_ACEOF
1691
1692
1693cat >>confdefs.h <<_ACEOF
1694#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1695_ACEOF
1696
1697
1698# Let the site file select an alternate cache file if it wants to.
1699# Prefer explicitly selected file to automatically selected ones.
1700if test -n "$CONFIG_SITE"; then
1701  set x "$CONFIG_SITE"
1702elif test "x$prefix" != xNONE; then
1703  set x "$prefix/share/config.site" "$prefix/etc/config.site"
1704else
1705  set x "$ac_default_prefix/share/config.site" \
1706	"$ac_default_prefix/etc/config.site"
1707fi
1708shift
1709for ac_site_file
1710do
1711  if test -r "$ac_site_file"; then
1712    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1713echo "$as_me: loading site script $ac_site_file" >&6;}
1714    sed 's/^/| /' "$ac_site_file" >&5
1715    . "$ac_site_file"
1716  fi
1717done
1718
1719if test -r "$cache_file"; then
1720  # Some versions of bash will fail to source /dev/null (special
1721  # files actually), so we avoid doing that.
1722  if test -f "$cache_file"; then
1723    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1724echo "$as_me: loading cache $cache_file" >&6;}
1725    case $cache_file in
1726      [\\/]* | ?:[\\/]* ) . "$cache_file";;
1727      *)                      . "./$cache_file";;
1728    esac
1729  fi
1730else
1731  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1732echo "$as_me: creating cache $cache_file" >&6;}
1733  >$cache_file
1734fi
1735
1736# Check that the precious variables saved in the cache have kept the same
1737# value.
1738ac_cache_corrupted=false
1739for ac_var in $ac_precious_vars; do
1740  eval ac_old_set=\$ac_cv_env_${ac_var}_set
1741  eval ac_new_set=\$ac_env_${ac_var}_set
1742  eval ac_old_val=\$ac_cv_env_${ac_var}_value
1743  eval ac_new_val=\$ac_env_${ac_var}_value
1744  case $ac_old_set,$ac_new_set in
1745    set,)
1746      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1747echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1748      ac_cache_corrupted=: ;;
1749    ,set)
1750      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1751echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1752      ac_cache_corrupted=: ;;
1753    ,);;
1754    *)
1755      if test "x$ac_old_val" != "x$ac_new_val"; then
1756	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1757echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1758	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1759echo "$as_me:   former value:  $ac_old_val" >&2;}
1760	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1761echo "$as_me:   current value: $ac_new_val" >&2;}
1762	ac_cache_corrupted=:
1763      fi;;
1764  esac
1765  # Pass precious variables to config.status.
1766  if test "$ac_new_set" = set; then
1767    case $ac_new_val in
1768    *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1769    *) ac_arg=$ac_var=$ac_new_val ;;
1770    esac
1771    case " $ac_configure_args " in
1772      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1773      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1774    esac
1775  fi
1776done
1777if $ac_cache_corrupted; then
1778  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1779echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1780  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1781echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1782   { (exit 1); exit 1; }; }
1783fi
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809ac_ext=c
1810ac_cpp='$CPP $CPPFLAGS'
1811ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1812ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1813ac_compiler_gnu=$ac_cv_c_compiler_gnu
1814
1815
1816
1817
1818    # TEA extensions pass this us the version of TEA they think they
1819    # are compatible with.
1820    TEA_VERSION="3.9"
1821
1822    { echo "$as_me:$LINENO: checking for correct TEA configuration" >&5
1823echo $ECHO_N "checking for correct TEA configuration... $ECHO_C" >&6; }
1824    if test x"${PACKAGE_NAME}" = x ; then
1825	{ { echo "$as_me:$LINENO: error:
1826The PACKAGE_NAME variable must be defined by your TEA configure.in" >&5
1827echo "$as_me: error:
1828The PACKAGE_NAME variable must be defined by your TEA configure.in" >&2;}
1829   { (exit 1); exit 1; }; }
1830    fi
1831    if test x"3.9" = x ; then
1832	{ { echo "$as_me:$LINENO: error:
1833TEA version not specified." >&5
1834echo "$as_me: error:
1835TEA version not specified." >&2;}
1836   { (exit 1); exit 1; }; }
1837    elif test "3.9" != "${TEA_VERSION}" ; then
1838	{ echo "$as_me:$LINENO: result: warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&5
1839echo "${ECHO_T}warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&6; }
1840    else
1841	{ echo "$as_me:$LINENO: result: ok (TEA ${TEA_VERSION})" >&5
1842echo "${ECHO_T}ok (TEA ${TEA_VERSION})" >&6; }
1843    fi
1844    case "`uname -s`" in
1845	*win32*|*WIN32*|*MINGW32_*)
1846	    # Extract the first word of "cygpath", so it can be a program name with args.
1847set dummy cygpath; ac_word=$2
1848{ echo "$as_me:$LINENO: checking for $ac_word" >&5
1849echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
1850if test "${ac_cv_prog_CYGPATH+set}" = set; then
1851  echo $ECHO_N "(cached) $ECHO_C" >&6
1852else
1853  if test -n "$CYGPATH"; then
1854  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
1855else
1856as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1857for as_dir in $PATH
1858do
1859  IFS=$as_save_IFS
1860  test -z "$as_dir" && as_dir=.
1861  for ac_exec_ext in '' $ac_executable_extensions; do
1862  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
1863    ac_cv_prog_CYGPATH="cygpath -w"
1864    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1865    break 2
1866  fi
1867done
1868done
1869IFS=$as_save_IFS
1870
1871  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
1872fi
1873fi
1874CYGPATH=$ac_cv_prog_CYGPATH
1875if test -n "$CYGPATH"; then
1876  { echo "$as_me:$LINENO: result: $CYGPATH" >&5
1877echo "${ECHO_T}$CYGPATH" >&6; }
1878else
1879  { echo "$as_me:$LINENO: result: no" >&5
1880echo "${ECHO_T}no" >&6; }
1881fi
1882
1883
1884	    EXEEXT=".exe"
1885	    TEA_PLATFORM="windows"
1886	    ;;
1887	*CYGWIN_*)
1888	    CYGPATH=echo
1889	    EXEEXT=".exe"
1890	    # TEA_PLATFORM is determined later in LOAD_TCLCONFIG
1891	    ;;
1892	*)
1893	    CYGPATH=echo
1894	    EXEEXT=""
1895	    TEA_PLATFORM="unix"
1896	    ;;
1897    esac
1898
1899    # Check if exec_prefix is set. If not use fall back to prefix.
1900    # Note when adjusted, so that TEA_PREFIX can correct for this.
1901    # This is needed for recursive configures, since autoconf propagates
1902    # $prefix, but not $exec_prefix (doh!).
1903    if test x$exec_prefix = xNONE ; then
1904	exec_prefix_default=yes
1905	exec_prefix=$prefix
1906    fi
1907
1908
1909
1910
1911    # This package name must be replaced statically for AC_SUBST to work
1912
1913    # Substitute STUB_LIB_FILE in case package creates a stub library too.
1914
1915
1916    # We AC_SUBST these here to ensure they are subst'ed,
1917    # in case the user doesn't call TEA_ADD_...
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927ac_aux_dir=
1928for ac_dir in ../tclconfig "$srcdir"/../tclconfig; do
1929  if test -f "$ac_dir/install-sh"; then
1930    ac_aux_dir=$ac_dir
1931    ac_install_sh="$ac_aux_dir/install-sh -c"
1932    break
1933  elif test -f "$ac_dir/install.sh"; then
1934    ac_aux_dir=$ac_dir
1935    ac_install_sh="$ac_aux_dir/install.sh -c"
1936    break
1937  elif test -f "$ac_dir/shtool"; then
1938    ac_aux_dir=$ac_dir
1939    ac_install_sh="$ac_aux_dir/shtool install -c"
1940    break
1941  fi
1942done
1943if test -z "$ac_aux_dir"; then
1944  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in ../tclconfig \"$srcdir\"/../tclconfig" >&5
1945echo "$as_me: error: cannot find install-sh or install.sh in ../tclconfig \"$srcdir\"/../tclconfig" >&2;}
1946   { (exit 1); exit 1; }; }
1947fi
1948
1949# These three variables are undocumented and unsupported,
1950# and are intended to be withdrawn in a future Autoconf release.
1951# They can cause serious problems if a builder's source tree is in a directory
1952# whose full name contains unusual characters.
1953ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
1954ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
1955ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
1956
1957
1958
1959PHIMGTYPE="png"
1960CPACKAGE="Tkimgpng"
1961PACKAGE_TCLNAME="img::png"
1962
1963
1964#--------------------------------------------------------------------
1965# Load the tclConfig.sh file
1966# Load the tkConfig.sh file
1967#--------------------------------------------------------------------
1968
1969
1970
1971    #
1972    # Ok, lets find the tcl configuration
1973    # First, look for one uninstalled.
1974    # the alternative search directory is invoked by --with-tcl
1975    #
1976
1977    if test x"${no_tcl}" = x ; then
1978	# we reset no_tcl in case something fails here
1979	no_tcl=true
1980
1981# Check whether --with-tcl was given.
1982if test "${with_tcl+set}" = set; then
1983  withval=$with_tcl; with_tclconfig="${withval}"
1984fi
1985
1986	{ echo "$as_me:$LINENO: checking for Tcl configuration" >&5
1987echo $ECHO_N "checking for Tcl configuration... $ECHO_C" >&6; }
1988	if test "${ac_cv_c_tclconfig+set}" = set; then
1989  echo $ECHO_N "(cached) $ECHO_C" >&6
1990else
1991
1992
1993	    # First check to see if --with-tcl was specified.
1994	    if test x"${with_tclconfig}" != x ; then
1995		case "${with_tclconfig}" in
1996		    */tclConfig.sh )
1997			if test -f "${with_tclconfig}"; then
1998			    { echo "$as_me:$LINENO: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&5
1999echo "$as_me: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&2;}
2000			    with_tclconfig="`echo "${with_tclconfig}" | sed 's!/tclConfig\.sh$!!'`"
2001			fi ;;
2002		esac
2003		if test -f "${with_tclconfig}/tclConfig.sh" ; then
2004		    ac_cv_c_tclconfig="`(cd "${with_tclconfig}"; pwd)`"
2005		else
2006		    { { echo "$as_me:$LINENO: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&5
2007echo "$as_me: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&2;}
2008   { (exit 1); exit 1; }; }
2009		fi
2010	    fi
2011
2012	    # then check for a private Tcl installation
2013	    if test x"${ac_cv_c_tclconfig}" = x ; then
2014		for i in \
2015			../tcl \
2016			`ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2017			`ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
2018			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
2019			../../tcl \
2020			`ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2021			`ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
2022			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
2023			../../../tcl \
2024			`ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2025			`ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
2026			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
2027		    if test "${TEA_PLATFORM}" = "windows" \
2028			    -a -f "$i/win/tclConfig.sh" ; then
2029			ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
2030			break
2031		    fi
2032		    if test -f "$i/unix/tclConfig.sh" ; then
2033			ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
2034			break
2035		    fi
2036		done
2037	    fi
2038
2039	    # on Darwin, check in Framework installation locations
2040	    if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
2041		for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
2042			`ls -d /Library/Frameworks 2>/dev/null` \
2043			`ls -d /Network/Library/Frameworks 2>/dev/null` \
2044			`ls -d /System/Library/Frameworks 2>/dev/null` \
2045			; do
2046		    if test -f "$i/Tcl.framework/tclConfig.sh" ; then
2047			ac_cv_c_tclconfig="`(cd $i/Tcl.framework; pwd)`"
2048			break
2049		    fi
2050		done
2051	    fi
2052
2053	    # TEA specific: on Windows, check in common installation locations
2054	    if test "${TEA_PLATFORM}" = "windows" \
2055		-a x"${ac_cv_c_tclconfig}" = x ; then
2056		for i in `ls -d C:/Tcl/lib 2>/dev/null` \
2057			`ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
2058			; do
2059		    if test -f "$i/tclConfig.sh" ; then
2060			ac_cv_c_tclconfig="`(cd $i; pwd)`"
2061			break
2062		    fi
2063		done
2064	    fi
2065
2066	    # check in a few common install locations
2067	    if test x"${ac_cv_c_tclconfig}" = x ; then
2068		for i in `ls -d ${libdir} 2>/dev/null` \
2069			`ls -d ${exec_prefix}/lib 2>/dev/null` \
2070			`ls -d ${prefix}/lib 2>/dev/null` \
2071			`ls -d /usr/local/lib 2>/dev/null` \
2072			`ls -d /usr/contrib/lib 2>/dev/null` \
2073			`ls -d /usr/lib 2>/dev/null` \
2074			`ls -d /usr/lib64 2>/dev/null` \
2075			; do
2076		    if test -f "$i/tclConfig.sh" ; then
2077			ac_cv_c_tclconfig="`(cd $i; pwd)`"
2078			break
2079		    fi
2080		done
2081	    fi
2082
2083	    # check in a few other private locations
2084	    if test x"${ac_cv_c_tclconfig}" = x ; then
2085		for i in \
2086			${srcdir}/../tcl \
2087			`ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2088			`ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
2089			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
2090		    if test "${TEA_PLATFORM}" = "windows" \
2091			    -a -f "$i/win/tclConfig.sh" ; then
2092			ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
2093			break
2094		    fi
2095		    if test -f "$i/unix/tclConfig.sh" ; then
2096			ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
2097			break
2098		    fi
2099		done
2100	    fi
2101
2102fi
2103
2104
2105	if test x"${ac_cv_c_tclconfig}" = x ; then
2106	    TCL_BIN_DIR="# no Tcl configs found"
2107	    { { echo "$as_me:$LINENO: error: Can't find Tcl configuration definitions" >&5
2108echo "$as_me: error: Can't find Tcl configuration definitions" >&2;}
2109   { (exit 1); exit 1; }; }
2110	else
2111	    no_tcl=
2112	    TCL_BIN_DIR="${ac_cv_c_tclconfig}"
2113	    { echo "$as_me:$LINENO: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
2114echo "${ECHO_T}found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
2115	fi
2116    fi
2117
2118
2119    { echo "$as_me:$LINENO: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
2120echo $ECHO_N "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... $ECHO_C" >&6; }
2121
2122    if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
2123        { echo "$as_me:$LINENO: result: loading" >&5
2124echo "${ECHO_T}loading" >&6; }
2125	. "${TCL_BIN_DIR}/tclConfig.sh"
2126    else
2127        { echo "$as_me:$LINENO: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
2128echo "${ECHO_T}could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
2129    fi
2130
2131    # eval is required to do the TCL_DBGX substitution
2132    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
2133    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
2134
2135    # If the TCL_BIN_DIR is the build directory (not the install directory),
2136    # then set the common variable name to the value of the build variables.
2137    # For example, the variable TCL_LIB_SPEC will be set to the value
2138    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
2139    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
2140    # installed and uninstalled version of Tcl.
2141    if test -f "${TCL_BIN_DIR}/Makefile" ; then
2142        TCL_LIB_SPEC="${TCL_BUILD_LIB_SPEC}"
2143        TCL_STUB_LIB_SPEC="${TCL_BUILD_STUB_LIB_SPEC}"
2144        TCL_STUB_LIB_PATH="${TCL_BUILD_STUB_LIB_PATH}"
2145    elif test "`uname -s`" = "Darwin"; then
2146	# If Tcl was built as a framework, attempt to use the libraries
2147	# from the framework at the given location so that linking works
2148	# against Tcl.framework installed in an arbitrary location.
2149	case ${TCL_DEFS} in
2150	    *TCL_FRAMEWORK*)
2151		if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
2152		    for i in "`cd "${TCL_BIN_DIR}"; pwd`" \
2153			     "`cd "${TCL_BIN_DIR}"/../..; pwd`"; do
2154			if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
2155			    TCL_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TCL_LIB_FILE}"
2156			    break
2157			fi
2158		    done
2159		fi
2160		if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
2161		    TCL_STUB_LIB_SPEC="-L`echo "${TCL_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
2162		    TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
2163		fi
2164		;;
2165	esac
2166    fi
2167
2168    # eval is required to do the TCL_DBGX substitution
2169    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
2170    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
2171    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
2172    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187    case "`uname -s`" in
2188	*CYGWIN_*)
2189	    { echo "$as_me:$LINENO: checking for cygwin variant" >&5
2190echo $ECHO_N "checking for cygwin variant... $ECHO_C" >&6; }
2191	    case ${TCL_EXTRA_CFLAGS} in
2192		*-mwin32*|*-mno-cygwin*)
2193		    TEA_PLATFORM="windows"
2194		    CFLAGS="$CFLAGS -mwin32"
2195		    { echo "$as_me:$LINENO: result: win32" >&5
2196echo "${ECHO_T}win32" >&6; }
2197		    ;;
2198		*)
2199		    TEA_PLATFORM="unix"
2200		    { echo "$as_me:$LINENO: result: unix" >&5
2201echo "${ECHO_T}unix" >&6; }
2202		    ;;
2203	    esac
2204	    EXEEXT=".exe"
2205	    ;;
2206	*)
2207	    ;;
2208    esac
2209
2210    # Do this here as we have fully defined TEA_PLATFORM now
2211    if test "${TEA_PLATFORM}" = "windows" ; then
2212	# The BUILD_$pkg is to define the correct extern storage class
2213	# handling when making this package
2214
2215cat >>confdefs.h <<_ACEOF
2216#define BUILD_${PACKAGE_NAME}
2217_ACEOF
2218
2219	CLEANFILES="$CLEANFILES *.lib *.dll *.pdb *.exp"
2220    fi
2221
2222    # TEA specific:
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232    #
2233    # Ok, lets find the tk configuration
2234    # First, look for one uninstalled.
2235    # the alternative search directory is invoked by --with-tk
2236    #
2237
2238    if test x"${no_tk}" = x ; then
2239	# we reset no_tk in case something fails here
2240	no_tk=true
2241
2242# Check whether --with-tk was given.
2243if test "${with_tk+set}" = set; then
2244  withval=$with_tk; with_tkconfig="${withval}"
2245fi
2246
2247	{ echo "$as_me:$LINENO: checking for Tk configuration" >&5
2248echo $ECHO_N "checking for Tk configuration... $ECHO_C" >&6; }
2249	if test "${ac_cv_c_tkconfig+set}" = set; then
2250  echo $ECHO_N "(cached) $ECHO_C" >&6
2251else
2252
2253
2254	    # First check to see if --with-tkconfig was specified.
2255	    if test x"${with_tkconfig}" != x ; then
2256		case "${with_tkconfig}" in
2257		    */tkConfig.sh )
2258			if test -f "${with_tkconfig}"; then
2259			    { echo "$as_me:$LINENO: WARNING: --with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself" >&5
2260echo "$as_me: WARNING: --with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself" >&2;}
2261			    with_tkconfig="`echo "${with_tkconfig}" | sed 's!/tkConfig\.sh$!!'`"
2262			fi ;;
2263		esac
2264		if test -f "${with_tkconfig}/tkConfig.sh" ; then
2265		    ac_cv_c_tkconfig="`(cd "${with_tkconfig}"; pwd)`"
2266		else
2267		    { { echo "$as_me:$LINENO: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&5
2268echo "$as_me: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&2;}
2269   { (exit 1); exit 1; }; }
2270		fi
2271	    fi
2272
2273	    # then check for a private Tk library
2274	    if test x"${ac_cv_c_tkconfig}" = x ; then
2275		for i in \
2276			../tk \
2277			`ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
2278			`ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
2279			`ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
2280			../../tk \
2281			`ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
2282			`ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
2283			`ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
2284			../../../tk \
2285			`ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
2286			`ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
2287			`ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
2288		    if test "${TEA_PLATFORM}" = "windows" \
2289			    -a -f "$i/win/tkConfig.sh" ; then
2290			ac_cv_c_tkconfig="`(cd $i/win; pwd)`"
2291			break
2292		    fi
2293		    if test -f "$i/unix/tkConfig.sh" ; then
2294			ac_cv_c_tkconfig="`(cd $i/unix; pwd)`"
2295			break
2296		    fi
2297		done
2298	    fi
2299
2300	    # on Darwin, check in Framework installation locations
2301	    if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
2302		for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
2303			`ls -d /Library/Frameworks 2>/dev/null` \
2304			`ls -d /Network/Library/Frameworks 2>/dev/null` \
2305			`ls -d /System/Library/Frameworks 2>/dev/null` \
2306			; do
2307		    if test -f "$i/Tk.framework/tkConfig.sh" ; then
2308			ac_cv_c_tkconfig="`(cd $i/Tk.framework; pwd)`"
2309			break
2310		    fi
2311		done
2312	    fi
2313
2314	    # check in a few common install locations
2315	    if test x"${ac_cv_c_tkconfig}" = x ; then
2316		for i in `ls -d ${libdir} 2>/dev/null` \
2317			`ls -d ${exec_prefix}/lib 2>/dev/null` \
2318			`ls -d ${prefix}/lib 2>/dev/null` \
2319			`ls -d /usr/local/lib 2>/dev/null` \
2320			`ls -d /usr/contrib/lib 2>/dev/null` \
2321			`ls -d /usr/lib 2>/dev/null` \
2322			`ls -d /usr/lib64 2>/dev/null` \
2323			; do
2324		    if test -f "$i/tkConfig.sh" ; then
2325			ac_cv_c_tkconfig="`(cd $i; pwd)`"
2326			break
2327		    fi
2328		done
2329	    fi
2330
2331	    # TEA specific: on Windows, check in common installation locations
2332	    if test "${TEA_PLATFORM}" = "windows" \
2333		-a x"${ac_cv_c_tkconfig}" = x ; then
2334		for i in `ls -d C:/Tcl/lib 2>/dev/null` \
2335			`ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
2336			; do
2337		    if test -f "$i/tkConfig.sh" ; then
2338			ac_cv_c_tkconfig="`(cd $i; pwd)`"
2339			break
2340		    fi
2341		done
2342	    fi
2343
2344	    # check in a few other private locations
2345	    if test x"${ac_cv_c_tkconfig}" = x ; then
2346		for i in \
2347			${srcdir}/../tk \
2348			`ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
2349			`ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
2350			`ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
2351		    if test "${TEA_PLATFORM}" = "windows" \
2352			    -a -f "$i/win/tkConfig.sh" ; then
2353			ac_cv_c_tkconfig="`(cd $i/win; pwd)`"
2354			break
2355		    fi
2356		    if test -f "$i/unix/tkConfig.sh" ; then
2357			ac_cv_c_tkconfig="`(cd $i/unix; pwd)`"
2358			break
2359		    fi
2360		done
2361	    fi
2362
2363fi
2364
2365
2366	if test x"${ac_cv_c_tkconfig}" = x ; then
2367	    TK_BIN_DIR="# no Tk configs found"
2368	    { { echo "$as_me:$LINENO: error: Can't find Tk configuration definitions" >&5
2369echo "$as_me: error: Can't find Tk configuration definitions" >&2;}
2370   { (exit 1); exit 1; }; }
2371	else
2372	    no_tk=
2373	    TK_BIN_DIR="${ac_cv_c_tkconfig}"
2374	    { echo "$as_me:$LINENO: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
2375echo "${ECHO_T}found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
2376	fi
2377    fi
2378
2379
2380    { echo "$as_me:$LINENO: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
2381echo $ECHO_N "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... $ECHO_C" >&6; }
2382
2383    if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
2384        { echo "$as_me:$LINENO: result: loading" >&5
2385echo "${ECHO_T}loading" >&6; }
2386	. "${TK_BIN_DIR}/tkConfig.sh"
2387    else
2388        { echo "$as_me:$LINENO: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
2389echo "${ECHO_T}could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
2390    fi
2391
2392    # eval is required to do the TK_DBGX substitution
2393    eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
2394    eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
2395
2396    # If the TK_BIN_DIR is the build directory (not the install directory),
2397    # then set the common variable name to the value of the build variables.
2398    # For example, the variable TK_LIB_SPEC will be set to the value
2399    # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
2400    # instead of TK_BUILD_LIB_SPEC since it will work with both an
2401    # installed and uninstalled version of Tcl.
2402    if test -f "${TK_BIN_DIR}/Makefile" ; then
2403        TK_LIB_SPEC="${TK_BUILD_LIB_SPEC}"
2404        TK_STUB_LIB_SPEC="${TK_BUILD_STUB_LIB_SPEC}"
2405        TK_STUB_LIB_PATH="${TK_BUILD_STUB_LIB_PATH}"
2406    elif test "`uname -s`" = "Darwin"; then
2407	# If Tk was built as a framework, attempt to use the libraries
2408	# from the framework at the given location so that linking works
2409	# against Tk.framework installed in an arbitrary location.
2410	case ${TK_DEFS} in
2411	    *TK_FRAMEWORK*)
2412		if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
2413		    for i in "`cd "${TK_BIN_DIR}"; pwd`" \
2414			     "`cd "${TK_BIN_DIR}"/../..; pwd`"; do
2415			if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
2416			    TK_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TK_LIB_FILE}"
2417			    break
2418			fi
2419		    done
2420		fi
2421		if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
2422		    TK_STUB_LIB_SPEC="-L` echo "${TK_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TK_STUB_LIB_FLAG}"
2423		    TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
2424		fi
2425		;;
2426	esac
2427    fi
2428
2429    # eval is required to do the TK_DBGX substitution
2430    eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
2431    eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
2432    eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
2433    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
2434
2435    # TEA specific: Ensure windowingsystem is defined
2436    if test "${TEA_PLATFORM}" = "unix" ; then
2437	case ${TK_DEFS} in
2438	    *MAC_OSX_TK*)
2439
2440cat >>confdefs.h <<\_ACEOF
2441#define MAC_OSX_TK 1
2442_ACEOF
2443
2444		TEA_WINDOWINGSYSTEM="aqua"
2445		;;
2446	    *)
2447		TEA_WINDOWINGSYSTEM="x11"
2448		;;
2449	esac
2450    elif test "${TEA_PLATFORM}" = "windows" ; then
2451	TEA_WINDOWINGSYSTEM="win32"
2452    fi
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466    # TEA specific:
2467
2468
2469
2470
2471#-----------------------------------------------------------------------
2472# Handle the --prefix=... option by defaulting to what Tcl gave.
2473# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
2474#-----------------------------------------------------------------------
2475
2476
2477    if test "${prefix}" = "NONE"; then
2478	prefix_default=yes
2479	if test x"${TCL_PREFIX}" != x; then
2480	    { echo "$as_me:$LINENO: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&5
2481echo "$as_me: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&6;}
2482	    prefix=${TCL_PREFIX}
2483	else
2484	    { echo "$as_me:$LINENO: --prefix defaulting to /usr/local" >&5
2485echo "$as_me: --prefix defaulting to /usr/local" >&6;}
2486	    prefix=/usr/local
2487	fi
2488    fi
2489    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \
2490	-o x"${exec_prefix_default}" = x"yes" ; then
2491	if test x"${TCL_EXEC_PREFIX}" != x; then
2492	    { echo "$as_me:$LINENO: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&5
2493echo "$as_me: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&6;}
2494	    exec_prefix=${TCL_EXEC_PREFIX}
2495	else
2496	    { echo "$as_me:$LINENO: --exec-prefix defaulting to ${prefix}" >&5
2497echo "$as_me: --exec-prefix defaulting to ${prefix}" >&6;}
2498	    exec_prefix=$prefix
2499	fi
2500    fi
2501
2502
2503#-----------------------------------------------------------------------
2504# Standard compiler checks.
2505# This sets up CC by using the CC env var, or looks for gcc otherwise.
2506# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
2507# the basic setup necessary to compile executables.
2508#-----------------------------------------------------------------------
2509
2510
2511    # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE)
2512    # in this macro, they need to go into TEA_SETUP_COMPILER instead.
2513
2514    # If the user did not set CFLAGS, set it now to keep
2515    # the AC_PROG_CC macro from adding "-g -O2".
2516    if test "${CFLAGS+set}" != "set" ; then
2517	CFLAGS=""
2518    fi
2519
2520    ac_ext=c
2521ac_cpp='$CPP $CPPFLAGS'
2522ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2523ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2524ac_compiler_gnu=$ac_cv_c_compiler_gnu
2525if test -n "$ac_tool_prefix"; then
2526  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2527set dummy ${ac_tool_prefix}gcc; ac_word=$2
2528{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2529echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2530if test "${ac_cv_prog_CC+set}" = set; then
2531  echo $ECHO_N "(cached) $ECHO_C" >&6
2532else
2533  if test -n "$CC"; then
2534  ac_cv_prog_CC="$CC" # Let the user override the test.
2535else
2536as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2537for as_dir in $PATH
2538do
2539  IFS=$as_save_IFS
2540  test -z "$as_dir" && as_dir=.
2541  for ac_exec_ext in '' $ac_executable_extensions; do
2542  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2543    ac_cv_prog_CC="${ac_tool_prefix}gcc"
2544    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2545    break 2
2546  fi
2547done
2548done
2549IFS=$as_save_IFS
2550
2551fi
2552fi
2553CC=$ac_cv_prog_CC
2554if test -n "$CC"; then
2555  { echo "$as_me:$LINENO: result: $CC" >&5
2556echo "${ECHO_T}$CC" >&6; }
2557else
2558  { echo "$as_me:$LINENO: result: no" >&5
2559echo "${ECHO_T}no" >&6; }
2560fi
2561
2562
2563fi
2564if test -z "$ac_cv_prog_CC"; then
2565  ac_ct_CC=$CC
2566  # Extract the first word of "gcc", so it can be a program name with args.
2567set dummy gcc; ac_word=$2
2568{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2569echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2570if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2571  echo $ECHO_N "(cached) $ECHO_C" >&6
2572else
2573  if test -n "$ac_ct_CC"; then
2574  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2575else
2576as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2577for as_dir in $PATH
2578do
2579  IFS=$as_save_IFS
2580  test -z "$as_dir" && as_dir=.
2581  for ac_exec_ext in '' $ac_executable_extensions; do
2582  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2583    ac_cv_prog_ac_ct_CC="gcc"
2584    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2585    break 2
2586  fi
2587done
2588done
2589IFS=$as_save_IFS
2590
2591fi
2592fi
2593ac_ct_CC=$ac_cv_prog_ac_ct_CC
2594if test -n "$ac_ct_CC"; then
2595  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2596echo "${ECHO_T}$ac_ct_CC" >&6; }
2597else
2598  { echo "$as_me:$LINENO: result: no" >&5
2599echo "${ECHO_T}no" >&6; }
2600fi
2601
2602  if test "x$ac_ct_CC" = x; then
2603    CC=""
2604  else
2605    case $cross_compiling:$ac_tool_warned in
2606yes:)
2607{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2608whose name does not start with the host triplet.  If you think this
2609configuration is useful to you, please write to autoconf@gnu.org." >&5
2610echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2611whose name does not start with the host triplet.  If you think this
2612configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2613ac_tool_warned=yes ;;
2614esac
2615    CC=$ac_ct_CC
2616  fi
2617else
2618  CC="$ac_cv_prog_CC"
2619fi
2620
2621if test -z "$CC"; then
2622          if test -n "$ac_tool_prefix"; then
2623    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2624set dummy ${ac_tool_prefix}cc; ac_word=$2
2625{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2626echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2627if test "${ac_cv_prog_CC+set}" = set; then
2628  echo $ECHO_N "(cached) $ECHO_C" >&6
2629else
2630  if test -n "$CC"; then
2631  ac_cv_prog_CC="$CC" # Let the user override the test.
2632else
2633as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2634for as_dir in $PATH
2635do
2636  IFS=$as_save_IFS
2637  test -z "$as_dir" && as_dir=.
2638  for ac_exec_ext in '' $ac_executable_extensions; do
2639  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2640    ac_cv_prog_CC="${ac_tool_prefix}cc"
2641    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2642    break 2
2643  fi
2644done
2645done
2646IFS=$as_save_IFS
2647
2648fi
2649fi
2650CC=$ac_cv_prog_CC
2651if test -n "$CC"; then
2652  { echo "$as_me:$LINENO: result: $CC" >&5
2653echo "${ECHO_T}$CC" >&6; }
2654else
2655  { echo "$as_me:$LINENO: result: no" >&5
2656echo "${ECHO_T}no" >&6; }
2657fi
2658
2659
2660  fi
2661fi
2662if test -z "$CC"; then
2663  # Extract the first word of "cc", so it can be a program name with args.
2664set dummy cc; ac_word=$2
2665{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2666echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2667if test "${ac_cv_prog_CC+set}" = set; then
2668  echo $ECHO_N "(cached) $ECHO_C" >&6
2669else
2670  if test -n "$CC"; then
2671  ac_cv_prog_CC="$CC" # Let the user override the test.
2672else
2673  ac_prog_rejected=no
2674as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2675for as_dir in $PATH
2676do
2677  IFS=$as_save_IFS
2678  test -z "$as_dir" && as_dir=.
2679  for ac_exec_ext in '' $ac_executable_extensions; do
2680  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2681    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2682       ac_prog_rejected=yes
2683       continue
2684     fi
2685    ac_cv_prog_CC="cc"
2686    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2687    break 2
2688  fi
2689done
2690done
2691IFS=$as_save_IFS
2692
2693if test $ac_prog_rejected = yes; then
2694  # We found a bogon in the path, so make sure we never use it.
2695  set dummy $ac_cv_prog_CC
2696  shift
2697  if test $# != 0; then
2698    # We chose a different compiler from the bogus one.
2699    # However, it has the same basename, so the bogon will be chosen
2700    # first if we set CC to just the basename; use the full file name.
2701    shift
2702    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2703  fi
2704fi
2705fi
2706fi
2707CC=$ac_cv_prog_CC
2708if test -n "$CC"; then
2709  { echo "$as_me:$LINENO: result: $CC" >&5
2710echo "${ECHO_T}$CC" >&6; }
2711else
2712  { echo "$as_me:$LINENO: result: no" >&5
2713echo "${ECHO_T}no" >&6; }
2714fi
2715
2716
2717fi
2718if test -z "$CC"; then
2719  if test -n "$ac_tool_prefix"; then
2720  for ac_prog in cl.exe
2721  do
2722    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2723set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2724{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2725echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2726if test "${ac_cv_prog_CC+set}" = set; then
2727  echo $ECHO_N "(cached) $ECHO_C" >&6
2728else
2729  if test -n "$CC"; then
2730  ac_cv_prog_CC="$CC" # Let the user override the test.
2731else
2732as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2733for as_dir in $PATH
2734do
2735  IFS=$as_save_IFS
2736  test -z "$as_dir" && as_dir=.
2737  for ac_exec_ext in '' $ac_executable_extensions; do
2738  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2739    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2740    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2741    break 2
2742  fi
2743done
2744done
2745IFS=$as_save_IFS
2746
2747fi
2748fi
2749CC=$ac_cv_prog_CC
2750if test -n "$CC"; then
2751  { echo "$as_me:$LINENO: result: $CC" >&5
2752echo "${ECHO_T}$CC" >&6; }
2753else
2754  { echo "$as_me:$LINENO: result: no" >&5
2755echo "${ECHO_T}no" >&6; }
2756fi
2757
2758
2759    test -n "$CC" && break
2760  done
2761fi
2762if test -z "$CC"; then
2763  ac_ct_CC=$CC
2764  for ac_prog in cl.exe
2765do
2766  # Extract the first word of "$ac_prog", so it can be a program name with args.
2767set dummy $ac_prog; ac_word=$2
2768{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2769echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2770if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2771  echo $ECHO_N "(cached) $ECHO_C" >&6
2772else
2773  if test -n "$ac_ct_CC"; then
2774  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2775else
2776as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2777for as_dir in $PATH
2778do
2779  IFS=$as_save_IFS
2780  test -z "$as_dir" && as_dir=.
2781  for ac_exec_ext in '' $ac_executable_extensions; do
2782  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2783    ac_cv_prog_ac_ct_CC="$ac_prog"
2784    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2785    break 2
2786  fi
2787done
2788done
2789IFS=$as_save_IFS
2790
2791fi
2792fi
2793ac_ct_CC=$ac_cv_prog_ac_ct_CC
2794if test -n "$ac_ct_CC"; then
2795  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2796echo "${ECHO_T}$ac_ct_CC" >&6; }
2797else
2798  { echo "$as_me:$LINENO: result: no" >&5
2799echo "${ECHO_T}no" >&6; }
2800fi
2801
2802
2803  test -n "$ac_ct_CC" && break
2804done
2805
2806  if test "x$ac_ct_CC" = x; then
2807    CC=""
2808  else
2809    case $cross_compiling:$ac_tool_warned in
2810yes:)
2811{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2812whose name does not start with the host triplet.  If you think this
2813configuration is useful to you, please write to autoconf@gnu.org." >&5
2814echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2815whose name does not start with the host triplet.  If you think this
2816configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2817ac_tool_warned=yes ;;
2818esac
2819    CC=$ac_ct_CC
2820  fi
2821fi
2822
2823fi
2824
2825
2826test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2827See \`config.log' for more details." >&5
2828echo "$as_me: error: no acceptable C compiler found in \$PATH
2829See \`config.log' for more details." >&2;}
2830   { (exit 1); exit 1; }; }
2831
2832# Provide some information about the compiler.
2833echo "$as_me:$LINENO: checking for C compiler version" >&5
2834ac_compiler=`set X $ac_compile; echo $2`
2835{ (ac_try="$ac_compiler --version >&5"
2836case "(($ac_try" in
2837  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2838  *) ac_try_echo=$ac_try;;
2839esac
2840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2841  (eval "$ac_compiler --version >&5") 2>&5
2842  ac_status=$?
2843  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2844  (exit $ac_status); }
2845{ (ac_try="$ac_compiler -v >&5"
2846case "(($ac_try" in
2847  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2848  *) ac_try_echo=$ac_try;;
2849esac
2850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2851  (eval "$ac_compiler -v >&5") 2>&5
2852  ac_status=$?
2853  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2854  (exit $ac_status); }
2855{ (ac_try="$ac_compiler -V >&5"
2856case "(($ac_try" in
2857  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2858  *) ac_try_echo=$ac_try;;
2859esac
2860eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2861  (eval "$ac_compiler -V >&5") 2>&5
2862  ac_status=$?
2863  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2864  (exit $ac_status); }
2865
2866cat >conftest.$ac_ext <<_ACEOF
2867/* confdefs.h.  */
2868_ACEOF
2869cat confdefs.h >>conftest.$ac_ext
2870cat >>conftest.$ac_ext <<_ACEOF
2871/* end confdefs.h.  */
2872
2873int
2874main ()
2875{
2876
2877  ;
2878  return 0;
2879}
2880_ACEOF
2881ac_clean_files_save=$ac_clean_files
2882ac_clean_files="$ac_clean_files a.out a.exe b.out"
2883# Try to create an executable without -o first, disregard a.out.
2884# It will help us diagnose broken compilers, and finding out an intuition
2885# of exeext.
2886{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2887echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2888ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2889#
2890# List of possible output files, starting from the most likely.
2891# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2892# only as a last resort.  b.out is created by i960 compilers.
2893ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2894#
2895# The IRIX 6 linker writes into existing files which may not be
2896# executable, retaining their permissions.  Remove them first so a
2897# subsequent execution test works.
2898ac_rmfiles=
2899for ac_file in $ac_files
2900do
2901  case $ac_file in
2902    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2903    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2904  esac
2905done
2906rm -f $ac_rmfiles
2907
2908if { (ac_try="$ac_link_default"
2909case "(($ac_try" in
2910  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2911  *) ac_try_echo=$ac_try;;
2912esac
2913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2914  (eval "$ac_link_default") 2>&5
2915  ac_status=$?
2916  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2917  (exit $ac_status); }; then
2918  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2919# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2920# in a Makefile.  We should not override ac_cv_exeext if it was cached,
2921# so that the user can short-circuit this test for compilers unknown to
2922# Autoconf.
2923for ac_file in $ac_files ''
2924do
2925  test -f "$ac_file" || continue
2926  case $ac_file in
2927    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
2928	;;
2929    [ab].out )
2930	# We found the default executable, but exeext='' is most
2931	# certainly right.
2932	break;;
2933    *.* )
2934        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2935	then :; else
2936	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2937	fi
2938	# We set ac_cv_exeext here because the later test for it is not
2939	# safe: cross compilers may not add the suffix if given an `-o'
2940	# argument, so we may need to know it at that point already.
2941	# Even if this section looks crufty: it has the advantage of
2942	# actually working.
2943	break;;
2944    * )
2945	break;;
2946  esac
2947done
2948test "$ac_cv_exeext" = no && ac_cv_exeext=
2949
2950else
2951  ac_file=''
2952fi
2953
2954{ echo "$as_me:$LINENO: result: $ac_file" >&5
2955echo "${ECHO_T}$ac_file" >&6; }
2956if test -z "$ac_file"; then
2957  echo "$as_me: failed program was:" >&5
2958sed 's/^/| /' conftest.$ac_ext >&5
2959
2960{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2961See \`config.log' for more details." >&5
2962echo "$as_me: error: C compiler cannot create executables
2963See \`config.log' for more details." >&2;}
2964   { (exit 77); exit 77; }; }
2965fi
2966
2967ac_exeext=$ac_cv_exeext
2968
2969# Check that the compiler produces executables we can run.  If not, either
2970# the compiler is broken, or we cross compile.
2971{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2972echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
2973# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2974# If not cross compiling, check that we can run a simple program.
2975if test "$cross_compiling" != yes; then
2976  if { ac_try='./$ac_file'
2977  { (case "(($ac_try" in
2978  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2979  *) ac_try_echo=$ac_try;;
2980esac
2981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2982  (eval "$ac_try") 2>&5
2983  ac_status=$?
2984  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2985  (exit $ac_status); }; }; then
2986    cross_compiling=no
2987  else
2988    if test "$cross_compiling" = maybe; then
2989	cross_compiling=yes
2990    else
2991	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2992If you meant to cross compile, use \`--host'.
2993See \`config.log' for more details." >&5
2994echo "$as_me: error: cannot run C compiled programs.
2995If you meant to cross compile, use \`--host'.
2996See \`config.log' for more details." >&2;}
2997   { (exit 1); exit 1; }; }
2998    fi
2999  fi
3000fi
3001{ echo "$as_me:$LINENO: result: yes" >&5
3002echo "${ECHO_T}yes" >&6; }
3003
3004rm -f a.out a.exe conftest$ac_cv_exeext b.out
3005ac_clean_files=$ac_clean_files_save
3006# Check that the compiler produces executables we can run.  If not, either
3007# the compiler is broken, or we cross compile.
3008{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
3009echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
3010{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
3011echo "${ECHO_T}$cross_compiling" >&6; }
3012
3013{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
3014echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
3015if { (ac_try="$ac_link"
3016case "(($ac_try" in
3017  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3018  *) ac_try_echo=$ac_try;;
3019esac
3020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3021  (eval "$ac_link") 2>&5
3022  ac_status=$?
3023  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3024  (exit $ac_status); }; then
3025  # If both `conftest.exe' and `conftest' are `present' (well, observable)
3026# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3027# work properly (i.e., refer to `conftest.exe'), while it won't with
3028# `rm'.
3029for ac_file in conftest.exe conftest conftest.*; do
3030  test -f "$ac_file" || continue
3031  case $ac_file in
3032    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
3033    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3034	  break;;
3035    * ) break;;
3036  esac
3037done
3038else
3039  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3040See \`config.log' for more details." >&5
3041echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3042See \`config.log' for more details." >&2;}
3043   { (exit 1); exit 1; }; }
3044fi
3045
3046rm -f conftest$ac_cv_exeext
3047{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3048echo "${ECHO_T}$ac_cv_exeext" >&6; }
3049
3050rm -f conftest.$ac_ext
3051EXEEXT=$ac_cv_exeext
3052ac_exeext=$EXEEXT
3053{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
3054echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
3055if test "${ac_cv_objext+set}" = set; then
3056  echo $ECHO_N "(cached) $ECHO_C" >&6
3057else
3058  cat >conftest.$ac_ext <<_ACEOF
3059/* confdefs.h.  */
3060_ACEOF
3061cat confdefs.h >>conftest.$ac_ext
3062cat >>conftest.$ac_ext <<_ACEOF
3063/* end confdefs.h.  */
3064
3065int
3066main ()
3067{
3068
3069  ;
3070  return 0;
3071}
3072_ACEOF
3073rm -f conftest.o conftest.obj
3074if { (ac_try="$ac_compile"
3075case "(($ac_try" in
3076  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3077  *) ac_try_echo=$ac_try;;
3078esac
3079eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3080  (eval "$ac_compile") 2>&5
3081  ac_status=$?
3082  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3083  (exit $ac_status); }; then
3084  for ac_file in conftest.o conftest.obj conftest.*; do
3085  test -f "$ac_file" || continue;
3086  case $ac_file in
3087    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
3088    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3089       break;;
3090  esac
3091done
3092else
3093  echo "$as_me: failed program was:" >&5
3094sed 's/^/| /' conftest.$ac_ext >&5
3095
3096{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3097See \`config.log' for more details." >&5
3098echo "$as_me: error: cannot compute suffix of object files: cannot compile
3099See \`config.log' for more details." >&2;}
3100   { (exit 1); exit 1; }; }
3101fi
3102
3103rm -f conftest.$ac_cv_objext conftest.$ac_ext
3104fi
3105{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3106echo "${ECHO_T}$ac_cv_objext" >&6; }
3107OBJEXT=$ac_cv_objext
3108ac_objext=$OBJEXT
3109{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3110echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
3111if test "${ac_cv_c_compiler_gnu+set}" = set; then
3112  echo $ECHO_N "(cached) $ECHO_C" >&6
3113else
3114  cat >conftest.$ac_ext <<_ACEOF
3115/* confdefs.h.  */
3116_ACEOF
3117cat confdefs.h >>conftest.$ac_ext
3118cat >>conftest.$ac_ext <<_ACEOF
3119/* end confdefs.h.  */
3120
3121int
3122main ()
3123{
3124#ifndef __GNUC__
3125       choke me
3126#endif
3127
3128  ;
3129  return 0;
3130}
3131_ACEOF
3132rm -f conftest.$ac_objext
3133if { (ac_try="$ac_compile"
3134case "(($ac_try" in
3135  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3136  *) ac_try_echo=$ac_try;;
3137esac
3138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3139  (eval "$ac_compile") 2>conftest.er1
3140  ac_status=$?
3141  grep -v '^ *+' conftest.er1 >conftest.err
3142  rm -f conftest.er1
3143  cat conftest.err >&5
3144  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3145  (exit $ac_status); } && {
3146	 test -z "$ac_c_werror_flag" ||
3147	 test ! -s conftest.err
3148       } && test -s conftest.$ac_objext; then
3149  ac_compiler_gnu=yes
3150else
3151  echo "$as_me: failed program was:" >&5
3152sed 's/^/| /' conftest.$ac_ext >&5
3153
3154	ac_compiler_gnu=no
3155fi
3156
3157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3158ac_cv_c_compiler_gnu=$ac_compiler_gnu
3159
3160fi
3161{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3162echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
3163GCC=`test $ac_compiler_gnu = yes && echo yes`
3164ac_test_CFLAGS=${CFLAGS+set}
3165ac_save_CFLAGS=$CFLAGS
3166{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3167echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
3168if test "${ac_cv_prog_cc_g+set}" = set; then
3169  echo $ECHO_N "(cached) $ECHO_C" >&6
3170else
3171  ac_save_c_werror_flag=$ac_c_werror_flag
3172   ac_c_werror_flag=yes
3173   ac_cv_prog_cc_g=no
3174   CFLAGS="-g"
3175   cat >conftest.$ac_ext <<_ACEOF
3176/* confdefs.h.  */
3177_ACEOF
3178cat confdefs.h >>conftest.$ac_ext
3179cat >>conftest.$ac_ext <<_ACEOF
3180/* end confdefs.h.  */
3181
3182int
3183main ()
3184{
3185
3186  ;
3187  return 0;
3188}
3189_ACEOF
3190rm -f conftest.$ac_objext
3191if { (ac_try="$ac_compile"
3192case "(($ac_try" in
3193  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3194  *) ac_try_echo=$ac_try;;
3195esac
3196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3197  (eval "$ac_compile") 2>conftest.er1
3198  ac_status=$?
3199  grep -v '^ *+' conftest.er1 >conftest.err
3200  rm -f conftest.er1
3201  cat conftest.err >&5
3202  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3203  (exit $ac_status); } && {
3204	 test -z "$ac_c_werror_flag" ||
3205	 test ! -s conftest.err
3206       } && test -s conftest.$ac_objext; then
3207  ac_cv_prog_cc_g=yes
3208else
3209  echo "$as_me: failed program was:" >&5
3210sed 's/^/| /' conftest.$ac_ext >&5
3211
3212	CFLAGS=""
3213      cat >conftest.$ac_ext <<_ACEOF
3214/* confdefs.h.  */
3215_ACEOF
3216cat confdefs.h >>conftest.$ac_ext
3217cat >>conftest.$ac_ext <<_ACEOF
3218/* end confdefs.h.  */
3219
3220int
3221main ()
3222{
3223
3224  ;
3225  return 0;
3226}
3227_ACEOF
3228rm -f conftest.$ac_objext
3229if { (ac_try="$ac_compile"
3230case "(($ac_try" in
3231  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3232  *) ac_try_echo=$ac_try;;
3233esac
3234eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3235  (eval "$ac_compile") 2>conftest.er1
3236  ac_status=$?
3237  grep -v '^ *+' conftest.er1 >conftest.err
3238  rm -f conftest.er1
3239  cat conftest.err >&5
3240  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3241  (exit $ac_status); } && {
3242	 test -z "$ac_c_werror_flag" ||
3243	 test ! -s conftest.err
3244       } && test -s conftest.$ac_objext; then
3245  :
3246else
3247  echo "$as_me: failed program was:" >&5
3248sed 's/^/| /' conftest.$ac_ext >&5
3249
3250	ac_c_werror_flag=$ac_save_c_werror_flag
3251	 CFLAGS="-g"
3252	 cat >conftest.$ac_ext <<_ACEOF
3253/* confdefs.h.  */
3254_ACEOF
3255cat confdefs.h >>conftest.$ac_ext
3256cat >>conftest.$ac_ext <<_ACEOF
3257/* end confdefs.h.  */
3258
3259int
3260main ()
3261{
3262
3263  ;
3264  return 0;
3265}
3266_ACEOF
3267rm -f conftest.$ac_objext
3268if { (ac_try="$ac_compile"
3269case "(($ac_try" in
3270  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3271  *) ac_try_echo=$ac_try;;
3272esac
3273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3274  (eval "$ac_compile") 2>conftest.er1
3275  ac_status=$?
3276  grep -v '^ *+' conftest.er1 >conftest.err
3277  rm -f conftest.er1
3278  cat conftest.err >&5
3279  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3280  (exit $ac_status); } && {
3281	 test -z "$ac_c_werror_flag" ||
3282	 test ! -s conftest.err
3283       } && test -s conftest.$ac_objext; then
3284  ac_cv_prog_cc_g=yes
3285else
3286  echo "$as_me: failed program was:" >&5
3287sed 's/^/| /' conftest.$ac_ext >&5
3288
3289
3290fi
3291
3292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3293fi
3294
3295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3296fi
3297
3298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3299   ac_c_werror_flag=$ac_save_c_werror_flag
3300fi
3301{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3302echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
3303if test "$ac_test_CFLAGS" = set; then
3304  CFLAGS=$ac_save_CFLAGS
3305elif test $ac_cv_prog_cc_g = yes; then
3306  if test "$GCC" = yes; then
3307    CFLAGS="-g -O2"
3308  else
3309    CFLAGS="-g"
3310  fi
3311else
3312  if test "$GCC" = yes; then
3313    CFLAGS="-O2"
3314  else
3315    CFLAGS=
3316  fi
3317fi
3318{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3319echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3320if test "${ac_cv_prog_cc_c89+set}" = set; then
3321  echo $ECHO_N "(cached) $ECHO_C" >&6
3322else
3323  ac_cv_prog_cc_c89=no
3324ac_save_CC=$CC
3325cat >conftest.$ac_ext <<_ACEOF
3326/* confdefs.h.  */
3327_ACEOF
3328cat confdefs.h >>conftest.$ac_ext
3329cat >>conftest.$ac_ext <<_ACEOF
3330/* end confdefs.h.  */
3331#include <stdarg.h>
3332#include <stdio.h>
3333#include <sys/types.h>
3334#include <sys/stat.h>
3335/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3336struct buf { int x; };
3337FILE * (*rcsopen) (struct buf *, struct stat *, int);
3338static char *e (p, i)
3339     char **p;
3340     int i;
3341{
3342  return p[i];
3343}
3344static char *f (char * (*g) (char **, int), char **p, ...)
3345{
3346  char *s;
3347  va_list v;
3348  va_start (v,p);
3349  s = g (p, va_arg (v,int));
3350  va_end (v);
3351  return s;
3352}
3353
3354/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3355   function prototypes and stuff, but not '\xHH' hex character constants.
3356   These don't provoke an error unfortunately, instead are silently treated
3357   as 'x'.  The following induces an error, until -std is added to get
3358   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3359   array size at least.  It's necessary to write '\x00'==0 to get something
3360   that's true only with -std.  */
3361int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3362
3363/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3364   inside strings and character constants.  */
3365#define FOO(x) 'x'
3366int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3367
3368int test (int i, double x);
3369struct s1 {int (*f) (int a);};
3370struct s2 {int (*f) (double a);};
3371int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3372int argc;
3373char **argv;
3374int
3375main ()
3376{
3377return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3378  ;
3379  return 0;
3380}
3381_ACEOF
3382for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3383	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3384do
3385  CC="$ac_save_CC $ac_arg"
3386  rm -f conftest.$ac_objext
3387if { (ac_try="$ac_compile"
3388case "(($ac_try" in
3389  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3390  *) ac_try_echo=$ac_try;;
3391esac
3392eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3393  (eval "$ac_compile") 2>conftest.er1
3394  ac_status=$?
3395  grep -v '^ *+' conftest.er1 >conftest.err
3396  rm -f conftest.er1
3397  cat conftest.err >&5
3398  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3399  (exit $ac_status); } && {
3400	 test -z "$ac_c_werror_flag" ||
3401	 test ! -s conftest.err
3402       } && test -s conftest.$ac_objext; then
3403  ac_cv_prog_cc_c89=$ac_arg
3404else
3405  echo "$as_me: failed program was:" >&5
3406sed 's/^/| /' conftest.$ac_ext >&5
3407
3408
3409fi
3410
3411rm -f core conftest.err conftest.$ac_objext
3412  test "x$ac_cv_prog_cc_c89" != "xno" && break
3413done
3414rm -f conftest.$ac_ext
3415CC=$ac_save_CC
3416
3417fi
3418# AC_CACHE_VAL
3419case "x$ac_cv_prog_cc_c89" in
3420  x)
3421    { echo "$as_me:$LINENO: result: none needed" >&5
3422echo "${ECHO_T}none needed" >&6; } ;;
3423  xno)
3424    { echo "$as_me:$LINENO: result: unsupported" >&5
3425echo "${ECHO_T}unsupported" >&6; } ;;
3426  *)
3427    CC="$CC $ac_cv_prog_cc_c89"
3428    { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3429echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
3430esac
3431
3432
3433ac_ext=c
3434ac_cpp='$CPP $CPPFLAGS'
3435ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3436ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3437ac_compiler_gnu=$ac_cv_c_compiler_gnu
3438
3439    ac_ext=c
3440ac_cpp='$CPP $CPPFLAGS'
3441ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3442ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3443ac_compiler_gnu=$ac_cv_c_compiler_gnu
3444{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3445echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
3446# On Suns, sometimes $CPP names a directory.
3447if test -n "$CPP" && test -d "$CPP"; then
3448  CPP=
3449fi
3450if test -z "$CPP"; then
3451  if test "${ac_cv_prog_CPP+set}" = set; then
3452  echo $ECHO_N "(cached) $ECHO_C" >&6
3453else
3454      # Double quotes because CPP needs to be expanded
3455    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3456    do
3457      ac_preproc_ok=false
3458for ac_c_preproc_warn_flag in '' yes
3459do
3460  # Use a header file that comes with gcc, so configuring glibc
3461  # with a fresh cross-compiler works.
3462  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3463  # <limits.h> exists even on freestanding compilers.
3464  # On the NeXT, cc -E runs the code through the compiler's parser,
3465  # not just through cpp. "Syntax error" is here to catch this case.
3466  cat >conftest.$ac_ext <<_ACEOF
3467/* confdefs.h.  */
3468_ACEOF
3469cat confdefs.h >>conftest.$ac_ext
3470cat >>conftest.$ac_ext <<_ACEOF
3471/* end confdefs.h.  */
3472#ifdef __STDC__
3473# include <limits.h>
3474#else
3475# include <assert.h>
3476#endif
3477		     Syntax error
3478_ACEOF
3479if { (ac_try="$ac_cpp conftest.$ac_ext"
3480case "(($ac_try" in
3481  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3482  *) ac_try_echo=$ac_try;;
3483esac
3484eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3485  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3486  ac_status=$?
3487  grep -v '^ *+' conftest.er1 >conftest.err
3488  rm -f conftest.er1
3489  cat conftest.err >&5
3490  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3491  (exit $ac_status); } >/dev/null && {
3492	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3493	 test ! -s conftest.err
3494       }; then
3495  :
3496else
3497  echo "$as_me: failed program was:" >&5
3498sed 's/^/| /' conftest.$ac_ext >&5
3499
3500  # Broken: fails on valid input.
3501continue
3502fi
3503
3504rm -f conftest.err conftest.$ac_ext
3505
3506  # OK, works on sane cases.  Now check whether nonexistent headers
3507  # can be detected and how.
3508  cat >conftest.$ac_ext <<_ACEOF
3509/* confdefs.h.  */
3510_ACEOF
3511cat confdefs.h >>conftest.$ac_ext
3512cat >>conftest.$ac_ext <<_ACEOF
3513/* end confdefs.h.  */
3514#include <ac_nonexistent.h>
3515_ACEOF
3516if { (ac_try="$ac_cpp conftest.$ac_ext"
3517case "(($ac_try" in
3518  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3519  *) ac_try_echo=$ac_try;;
3520esac
3521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3522  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3523  ac_status=$?
3524  grep -v '^ *+' conftest.er1 >conftest.err
3525  rm -f conftest.er1
3526  cat conftest.err >&5
3527  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3528  (exit $ac_status); } >/dev/null && {
3529	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3530	 test ! -s conftest.err
3531       }; then
3532  # Broken: success on invalid input.
3533continue
3534else
3535  echo "$as_me: failed program was:" >&5
3536sed 's/^/| /' conftest.$ac_ext >&5
3537
3538  # Passes both tests.
3539ac_preproc_ok=:
3540break
3541fi
3542
3543rm -f conftest.err conftest.$ac_ext
3544
3545done
3546# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3547rm -f conftest.err conftest.$ac_ext
3548if $ac_preproc_ok; then
3549  break
3550fi
3551
3552    done
3553    ac_cv_prog_CPP=$CPP
3554
3555fi
3556  CPP=$ac_cv_prog_CPP
3557else
3558  ac_cv_prog_CPP=$CPP
3559fi
3560{ echo "$as_me:$LINENO: result: $CPP" >&5
3561echo "${ECHO_T}$CPP" >&6; }
3562ac_preproc_ok=false
3563for ac_c_preproc_warn_flag in '' yes
3564do
3565  # Use a header file that comes with gcc, so configuring glibc
3566  # with a fresh cross-compiler works.
3567  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3568  # <limits.h> exists even on freestanding compilers.
3569  # On the NeXT, cc -E runs the code through the compiler's parser,
3570  # not just through cpp. "Syntax error" is here to catch this case.
3571  cat >conftest.$ac_ext <<_ACEOF
3572/* confdefs.h.  */
3573_ACEOF
3574cat confdefs.h >>conftest.$ac_ext
3575cat >>conftest.$ac_ext <<_ACEOF
3576/* end confdefs.h.  */
3577#ifdef __STDC__
3578# include <limits.h>
3579#else
3580# include <assert.h>
3581#endif
3582		     Syntax error
3583_ACEOF
3584if { (ac_try="$ac_cpp conftest.$ac_ext"
3585case "(($ac_try" in
3586  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3587  *) ac_try_echo=$ac_try;;
3588esac
3589eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3590  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3591  ac_status=$?
3592  grep -v '^ *+' conftest.er1 >conftest.err
3593  rm -f conftest.er1
3594  cat conftest.err >&5
3595  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3596  (exit $ac_status); } >/dev/null && {
3597	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3598	 test ! -s conftest.err
3599       }; then
3600  :
3601else
3602  echo "$as_me: failed program was:" >&5
3603sed 's/^/| /' conftest.$ac_ext >&5
3604
3605  # Broken: fails on valid input.
3606continue
3607fi
3608
3609rm -f conftest.err conftest.$ac_ext
3610
3611  # OK, works on sane cases.  Now check whether nonexistent headers
3612  # can be detected and how.
3613  cat >conftest.$ac_ext <<_ACEOF
3614/* confdefs.h.  */
3615_ACEOF
3616cat confdefs.h >>conftest.$ac_ext
3617cat >>conftest.$ac_ext <<_ACEOF
3618/* end confdefs.h.  */
3619#include <ac_nonexistent.h>
3620_ACEOF
3621if { (ac_try="$ac_cpp conftest.$ac_ext"
3622case "(($ac_try" in
3623  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3624  *) ac_try_echo=$ac_try;;
3625esac
3626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3627  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3628  ac_status=$?
3629  grep -v '^ *+' conftest.er1 >conftest.err
3630  rm -f conftest.er1
3631  cat conftest.err >&5
3632  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3633  (exit $ac_status); } >/dev/null && {
3634	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3635	 test ! -s conftest.err
3636       }; then
3637  # Broken: success on invalid input.
3638continue
3639else
3640  echo "$as_me: failed program was:" >&5
3641sed 's/^/| /' conftest.$ac_ext >&5
3642
3643  # Passes both tests.
3644ac_preproc_ok=:
3645break
3646fi
3647
3648rm -f conftest.err conftest.$ac_ext
3649
3650done
3651# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3652rm -f conftest.err conftest.$ac_ext
3653if $ac_preproc_ok; then
3654  :
3655else
3656  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3657See \`config.log' for more details." >&5
3658echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3659See \`config.log' for more details." >&2;}
3660   { (exit 1); exit 1; }; }
3661fi
3662
3663ac_ext=c
3664ac_cpp='$CPP $CPPFLAGS'
3665ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3666ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3667ac_compiler_gnu=$ac_cv_c_compiler_gnu
3668
3669
3670    # Find a good install program.  We prefer a C program (faster),
3671# so one script is as good as another.  But avoid the broken or
3672# incompatible versions:
3673# SysV /etc/install, /usr/sbin/install
3674# SunOS /usr/etc/install
3675# IRIX /sbin/install
3676# AIX /bin/install
3677# AmigaOS /C/install, which installs bootblocks on floppy discs
3678# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3679# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3680# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3681# OS/2's system install, which has a completely different semantic
3682# ./install, which can be erroneously created by make from ./install.sh.
3683{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3684echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
3685if test -z "$INSTALL"; then
3686if test "${ac_cv_path_install+set}" = set; then
3687  echo $ECHO_N "(cached) $ECHO_C" >&6
3688else
3689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3690for as_dir in $PATH
3691do
3692  IFS=$as_save_IFS
3693  test -z "$as_dir" && as_dir=.
3694  # Account for people who put trailing slashes in PATH elements.
3695case $as_dir/ in
3696  ./ | .// | /cC/* | \
3697  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3698  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
3699  /usr/ucb/* ) ;;
3700  *)
3701    # OSF1 and SCO ODT 3.0 have their own names for install.
3702    # Don't use installbsd from OSF since it installs stuff as root
3703    # by default.
3704    for ac_prog in ginstall scoinst install; do
3705      for ac_exec_ext in '' $ac_executable_extensions; do
3706	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3707	  if test $ac_prog = install &&
3708	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3709	    # AIX install.  It has an incompatible calling convention.
3710	    :
3711	  elif test $ac_prog = install &&
3712	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3713	    # program-specific install script used by HP pwplus--don't use.
3714	    :
3715	  else
3716	    ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3717	    break 3
3718	  fi
3719	fi
3720      done
3721    done
3722    ;;
3723esac
3724done
3725IFS=$as_save_IFS
3726
3727
3728fi
3729  if test "${ac_cv_path_install+set}" = set; then
3730    INSTALL=$ac_cv_path_install
3731  else
3732    # As a last resort, use the slow shell script.  Don't cache a
3733    # value for INSTALL within a source directory, because that will
3734    # break other packages using the cache if that directory is
3735    # removed, or if the value is a relative name.
3736    INSTALL=$ac_install_sh
3737  fi
3738fi
3739{ echo "$as_me:$LINENO: result: $INSTALL" >&5
3740echo "${ECHO_T}$INSTALL" >&6; }
3741
3742# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3743# It thinks the first close brace ends the variable substitution.
3744test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3745
3746test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3747
3748test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3749
3750
3751    #--------------------------------------------------------------------
3752    # Checks to see if the make program sets the $MAKE variable.
3753    #--------------------------------------------------------------------
3754
3755    { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3756echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
3757set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3758if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
3759  echo $ECHO_N "(cached) $ECHO_C" >&6
3760else
3761  cat >conftest.make <<\_ACEOF
3762SHELL = /bin/sh
3763all:
3764	@echo '@@@%%%=$(MAKE)=@@@%%%'
3765_ACEOF
3766# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3767case `${MAKE-make} -f conftest.make 2>/dev/null` in
3768  *@@@%%%=?*=@@@%%%*)
3769    eval ac_cv_prog_make_${ac_make}_set=yes;;
3770  *)
3771    eval ac_cv_prog_make_${ac_make}_set=no;;
3772esac
3773rm -f conftest.make
3774fi
3775if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3776  { echo "$as_me:$LINENO: result: yes" >&5
3777echo "${ECHO_T}yes" >&6; }
3778  SET_MAKE=
3779else
3780  { echo "$as_me:$LINENO: result: no" >&5
3781echo "${ECHO_T}no" >&6; }
3782  SET_MAKE="MAKE=${MAKE-make}"
3783fi
3784
3785
3786    #--------------------------------------------------------------------
3787    # Find ranlib
3788    #--------------------------------------------------------------------
3789
3790    if test -n "$ac_tool_prefix"; then
3791  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3792set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3793{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3794echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3795if test "${ac_cv_prog_RANLIB+set}" = set; then
3796  echo $ECHO_N "(cached) $ECHO_C" >&6
3797else
3798  if test -n "$RANLIB"; then
3799  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3800else
3801as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3802for as_dir in $PATH
3803do
3804  IFS=$as_save_IFS
3805  test -z "$as_dir" && as_dir=.
3806  for ac_exec_ext in '' $ac_executable_extensions; do
3807  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3808    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3809    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3810    break 2
3811  fi
3812done
3813done
3814IFS=$as_save_IFS
3815
3816fi
3817fi
3818RANLIB=$ac_cv_prog_RANLIB
3819if test -n "$RANLIB"; then
3820  { echo "$as_me:$LINENO: result: $RANLIB" >&5
3821echo "${ECHO_T}$RANLIB" >&6; }
3822else
3823  { echo "$as_me:$LINENO: result: no" >&5
3824echo "${ECHO_T}no" >&6; }
3825fi
3826
3827
3828fi
3829if test -z "$ac_cv_prog_RANLIB"; then
3830  ac_ct_RANLIB=$RANLIB
3831  # Extract the first word of "ranlib", so it can be a program name with args.
3832set dummy ranlib; ac_word=$2
3833{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3834echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3835if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3836  echo $ECHO_N "(cached) $ECHO_C" >&6
3837else
3838  if test -n "$ac_ct_RANLIB"; then
3839  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3840else
3841as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3842for as_dir in $PATH
3843do
3844  IFS=$as_save_IFS
3845  test -z "$as_dir" && as_dir=.
3846  for ac_exec_ext in '' $ac_executable_extensions; do
3847  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3848    ac_cv_prog_ac_ct_RANLIB="ranlib"
3849    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3850    break 2
3851  fi
3852done
3853done
3854IFS=$as_save_IFS
3855
3856fi
3857fi
3858ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3859if test -n "$ac_ct_RANLIB"; then
3860  { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3861echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
3862else
3863  { echo "$as_me:$LINENO: result: no" >&5
3864echo "${ECHO_T}no" >&6; }
3865fi
3866
3867  if test "x$ac_ct_RANLIB" = x; then
3868    RANLIB=":"
3869  else
3870    case $cross_compiling:$ac_tool_warned in
3871yes:)
3872{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3873whose name does not start with the host triplet.  If you think this
3874configuration is useful to you, please write to autoconf@gnu.org." >&5
3875echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3876whose name does not start with the host triplet.  If you think this
3877configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3878ac_tool_warned=yes ;;
3879esac
3880    RANLIB=$ac_ct_RANLIB
3881  fi
3882else
3883  RANLIB="$ac_cv_prog_RANLIB"
3884fi
3885
3886
3887    #--------------------------------------------------------------------
3888    # Determines the correct binary file extension (.o, .obj, .exe etc.)
3889    #--------------------------------------------------------------------
3890
3891
3892
3893
3894
3895
3896{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3897echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3898if test "${ac_cv_path_GREP+set}" = set; then
3899  echo $ECHO_N "(cached) $ECHO_C" >&6
3900else
3901  # Extract the first word of "grep ggrep" to use in msg output
3902if test -z "$GREP"; then
3903set dummy grep ggrep; ac_prog_name=$2
3904if test "${ac_cv_path_GREP+set}" = set; then
3905  echo $ECHO_N "(cached) $ECHO_C" >&6
3906else
3907  ac_path_GREP_found=false
3908# Loop through the user's path and test for each of PROGNAME-LIST
3909as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3910for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3911do
3912  IFS=$as_save_IFS
3913  test -z "$as_dir" && as_dir=.
3914  for ac_prog in grep ggrep; do
3915  for ac_exec_ext in '' $ac_executable_extensions; do
3916    ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3917    { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3918    # Check for GNU ac_path_GREP and select it if it is found.
3919  # Check for GNU $ac_path_GREP
3920case `"$ac_path_GREP" --version 2>&1` in
3921*GNU*)
3922  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3923*)
3924  ac_count=0
3925  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3926  while :
3927  do
3928    cat "conftest.in" "conftest.in" >"conftest.tmp"
3929    mv "conftest.tmp" "conftest.in"
3930    cp "conftest.in" "conftest.nl"
3931    echo 'GREP' >> "conftest.nl"
3932    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3933    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3934    ac_count=`expr $ac_count + 1`
3935    if test $ac_count -gt ${ac_path_GREP_max-0}; then
3936      # Best one so far, save it but keep looking for a better one
3937      ac_cv_path_GREP="$ac_path_GREP"
3938      ac_path_GREP_max=$ac_count
3939    fi
3940    # 10*(2^10) chars as input seems more than enough
3941    test $ac_count -gt 10 && break
3942  done
3943  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3944esac
3945
3946
3947    $ac_path_GREP_found && break 3
3948  done
3949done
3950
3951done
3952IFS=$as_save_IFS
3953
3954
3955fi
3956
3957GREP="$ac_cv_path_GREP"
3958if test -z "$GREP"; then
3959  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3960echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3961   { (exit 1); exit 1; }; }
3962fi
3963
3964else
3965  ac_cv_path_GREP=$GREP
3966fi
3967
3968
3969fi
3970{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3971echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3972 GREP="$ac_cv_path_GREP"
3973
3974
3975{ echo "$as_me:$LINENO: checking for egrep" >&5
3976echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3977if test "${ac_cv_path_EGREP+set}" = set; then
3978  echo $ECHO_N "(cached) $ECHO_C" >&6
3979else
3980  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3981   then ac_cv_path_EGREP="$GREP -E"
3982   else
3983     # Extract the first word of "egrep" to use in msg output
3984if test -z "$EGREP"; then
3985set dummy egrep; ac_prog_name=$2
3986if test "${ac_cv_path_EGREP+set}" = set; then
3987  echo $ECHO_N "(cached) $ECHO_C" >&6
3988else
3989  ac_path_EGREP_found=false
3990# Loop through the user's path and test for each of PROGNAME-LIST
3991as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3992for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3993do
3994  IFS=$as_save_IFS
3995  test -z "$as_dir" && as_dir=.
3996  for ac_prog in egrep; do
3997  for ac_exec_ext in '' $ac_executable_extensions; do
3998    ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3999    { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4000    # Check for GNU ac_path_EGREP and select it if it is found.
4001  # Check for GNU $ac_path_EGREP
4002case `"$ac_path_EGREP" --version 2>&1` in
4003*GNU*)
4004  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4005*)
4006  ac_count=0
4007  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4008  while :
4009  do
4010    cat "conftest.in" "conftest.in" >"conftest.tmp"
4011    mv "conftest.tmp" "conftest.in"
4012    cp "conftest.in" "conftest.nl"
4013    echo 'EGREP' >> "conftest.nl"
4014    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4015    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4016    ac_count=`expr $ac_count + 1`
4017    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4018      # Best one so far, save it but keep looking for a better one
4019      ac_cv_path_EGREP="$ac_path_EGREP"
4020      ac_path_EGREP_max=$ac_count
4021    fi
4022    # 10*(2^10) chars as input seems more than enough
4023    test $ac_count -gt 10 && break
4024  done
4025  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4026esac
4027
4028
4029    $ac_path_EGREP_found && break 3
4030  done
4031done
4032
4033done
4034IFS=$as_save_IFS
4035
4036
4037fi
4038
4039EGREP="$ac_cv_path_EGREP"
4040if test -z "$EGREP"; then
4041  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4042echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4043   { (exit 1); exit 1; }; }
4044fi
4045
4046else
4047  ac_cv_path_EGREP=$EGREP
4048fi
4049
4050
4051   fi
4052fi
4053{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4054echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
4055 EGREP="$ac_cv_path_EGREP"
4056
4057
4058{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4059echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
4060if test "${ac_cv_header_stdc+set}" = set; then
4061  echo $ECHO_N "(cached) $ECHO_C" >&6
4062else
4063  cat >conftest.$ac_ext <<_ACEOF
4064/* confdefs.h.  */
4065_ACEOF
4066cat confdefs.h >>conftest.$ac_ext
4067cat >>conftest.$ac_ext <<_ACEOF
4068/* end confdefs.h.  */
4069#include <stdlib.h>
4070#include <stdarg.h>
4071#include <string.h>
4072#include <float.h>
4073
4074int
4075main ()
4076{
4077
4078  ;
4079  return 0;
4080}
4081_ACEOF
4082rm -f conftest.$ac_objext
4083if { (ac_try="$ac_compile"
4084case "(($ac_try" in
4085  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4086  *) ac_try_echo=$ac_try;;
4087esac
4088eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4089  (eval "$ac_compile") 2>conftest.er1
4090  ac_status=$?
4091  grep -v '^ *+' conftest.er1 >conftest.err
4092  rm -f conftest.er1
4093  cat conftest.err >&5
4094  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4095  (exit $ac_status); } && {
4096	 test -z "$ac_c_werror_flag" ||
4097	 test ! -s conftest.err
4098       } && test -s conftest.$ac_objext; then
4099  ac_cv_header_stdc=yes
4100else
4101  echo "$as_me: failed program was:" >&5
4102sed 's/^/| /' conftest.$ac_ext >&5
4103
4104	ac_cv_header_stdc=no
4105fi
4106
4107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4108
4109if test $ac_cv_header_stdc = yes; then
4110  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4111  cat >conftest.$ac_ext <<_ACEOF
4112/* confdefs.h.  */
4113_ACEOF
4114cat confdefs.h >>conftest.$ac_ext
4115cat >>conftest.$ac_ext <<_ACEOF
4116/* end confdefs.h.  */
4117#include <string.h>
4118
4119_ACEOF
4120if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4121  $EGREP "memchr" >/dev/null 2>&1; then
4122  :
4123else
4124  ac_cv_header_stdc=no
4125fi
4126rm -f -r conftest*
4127
4128fi
4129
4130if test $ac_cv_header_stdc = yes; then
4131  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4132  cat >conftest.$ac_ext <<_ACEOF
4133/* confdefs.h.  */
4134_ACEOF
4135cat confdefs.h >>conftest.$ac_ext
4136cat >>conftest.$ac_ext <<_ACEOF
4137/* end confdefs.h.  */
4138#include <stdlib.h>
4139
4140_ACEOF
4141if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4142  $EGREP "free" >/dev/null 2>&1; then
4143  :
4144else
4145  ac_cv_header_stdc=no
4146fi
4147rm -f -r conftest*
4148
4149fi
4150
4151if test $ac_cv_header_stdc = yes; then
4152  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4153  if test "$cross_compiling" = yes; then
4154  :
4155else
4156  cat >conftest.$ac_ext <<_ACEOF
4157/* confdefs.h.  */
4158_ACEOF
4159cat confdefs.h >>conftest.$ac_ext
4160cat >>conftest.$ac_ext <<_ACEOF
4161/* end confdefs.h.  */
4162#include <ctype.h>
4163#include <stdlib.h>
4164#if ((' ' & 0x0FF) == 0x020)
4165# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4166# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4167#else
4168# define ISLOWER(c) \
4169		   (('a' <= (c) && (c) <= 'i') \
4170		     || ('j' <= (c) && (c) <= 'r') \
4171		     || ('s' <= (c) && (c) <= 'z'))
4172# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4173#endif
4174
4175#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4176int
4177main ()
4178{
4179  int i;
4180  for (i = 0; i < 256; i++)
4181    if (XOR (islower (i), ISLOWER (i))
4182	|| toupper (i) != TOUPPER (i))
4183      return 2;
4184  return 0;
4185}
4186_ACEOF
4187rm -f conftest$ac_exeext
4188if { (ac_try="$ac_link"
4189case "(($ac_try" in
4190  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4191  *) ac_try_echo=$ac_try;;
4192esac
4193eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4194  (eval "$ac_link") 2>&5
4195  ac_status=$?
4196  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4197  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4198  { (case "(($ac_try" in
4199  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4200  *) ac_try_echo=$ac_try;;
4201esac
4202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4203  (eval "$ac_try") 2>&5
4204  ac_status=$?
4205  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4206  (exit $ac_status); }; }; then
4207  :
4208else
4209  echo "$as_me: program exited with status $ac_status" >&5
4210echo "$as_me: failed program was:" >&5
4211sed 's/^/| /' conftest.$ac_ext >&5
4212
4213( exit $ac_status )
4214ac_cv_header_stdc=no
4215fi
4216rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4217fi
4218
4219
4220fi
4221fi
4222{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4223echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
4224if test $ac_cv_header_stdc = yes; then
4225
4226cat >>confdefs.h <<\_ACEOF
4227#define STDC_HEADERS 1
4228_ACEOF
4229
4230fi
4231
4232# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4243		  inttypes.h stdint.h unistd.h
4244do
4245as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4246{ echo "$as_me:$LINENO: checking for $ac_header" >&5
4247echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4248if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4249  echo $ECHO_N "(cached) $ECHO_C" >&6
4250else
4251  cat >conftest.$ac_ext <<_ACEOF
4252/* confdefs.h.  */
4253_ACEOF
4254cat confdefs.h >>conftest.$ac_ext
4255cat >>conftest.$ac_ext <<_ACEOF
4256/* end confdefs.h.  */
4257$ac_includes_default
4258
4259#include <$ac_header>
4260_ACEOF
4261rm -f conftest.$ac_objext
4262if { (ac_try="$ac_compile"
4263case "(($ac_try" in
4264  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4265  *) ac_try_echo=$ac_try;;
4266esac
4267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4268  (eval "$ac_compile") 2>conftest.er1
4269  ac_status=$?
4270  grep -v '^ *+' conftest.er1 >conftest.err
4271  rm -f conftest.er1
4272  cat conftest.err >&5
4273  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4274  (exit $ac_status); } && {
4275	 test -z "$ac_c_werror_flag" ||
4276	 test ! -s conftest.err
4277       } && test -s conftest.$ac_objext; then
4278  eval "$as_ac_Header=yes"
4279else
4280  echo "$as_me: failed program was:" >&5
4281sed 's/^/| /' conftest.$ac_ext >&5
4282
4283	eval "$as_ac_Header=no"
4284fi
4285
4286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4287fi
4288ac_res=`eval echo '${'$as_ac_Header'}'`
4289	       { echo "$as_me:$LINENO: result: $ac_res" >&5
4290echo "${ECHO_T}$ac_res" >&6; }
4291if test `eval echo '${'$as_ac_Header'}'` = yes; then
4292  cat >>confdefs.h <<_ACEOF
4293#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4294_ACEOF
4295
4296fi
4297
4298done
4299
4300
4301
4302    # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here.
4303
4304
4305    #------------------------------------------------------------------------
4306    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
4307    # It makes compiling go faster.  (This is only a performance feature.)
4308    #------------------------------------------------------------------------
4309
4310    if test -z "$no_pipe" -a -n "$GCC"; then
4311	{ echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5
4312echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6; }
4313if test "${tcl_cv_cc_pipe+set}" = set; then
4314  echo $ECHO_N "(cached) $ECHO_C" >&6
4315else
4316
4317	    hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
4318	    cat >conftest.$ac_ext <<_ACEOF
4319/* confdefs.h.  */
4320_ACEOF
4321cat confdefs.h >>conftest.$ac_ext
4322cat >>conftest.$ac_ext <<_ACEOF
4323/* end confdefs.h.  */
4324
4325int
4326main ()
4327{
4328
4329  ;
4330  return 0;
4331}
4332_ACEOF
4333rm -f conftest.$ac_objext
4334if { (ac_try="$ac_compile"
4335case "(($ac_try" in
4336  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4337  *) ac_try_echo=$ac_try;;
4338esac
4339eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4340  (eval "$ac_compile") 2>conftest.er1
4341  ac_status=$?
4342  grep -v '^ *+' conftest.er1 >conftest.err
4343  rm -f conftest.er1
4344  cat conftest.err >&5
4345  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4346  (exit $ac_status); } && {
4347	 test -z "$ac_c_werror_flag" ||
4348	 test ! -s conftest.err
4349       } && test -s conftest.$ac_objext; then
4350  tcl_cv_cc_pipe=yes
4351else
4352  echo "$as_me: failed program was:" >&5
4353sed 's/^/| /' conftest.$ac_ext >&5
4354
4355	tcl_cv_cc_pipe=no
4356fi
4357
4358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4359	    CFLAGS=$hold_cflags
4360fi
4361{ echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5
4362echo "${ECHO_T}$tcl_cv_cc_pipe" >&6; }
4363	if test $tcl_cv_cc_pipe = yes; then
4364	    CFLAGS="$CFLAGS -pipe"
4365	fi
4366    fi
4367
4368    #--------------------------------------------------------------------
4369    # Common compiler flag setup
4370    #--------------------------------------------------------------------
4371
4372    { echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
4373echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
4374if test "${ac_cv_c_bigendian+set}" = set; then
4375  echo $ECHO_N "(cached) $ECHO_C" >&6
4376else
4377  # See if sys/param.h defines the BYTE_ORDER macro.
4378cat >conftest.$ac_ext <<_ACEOF
4379/* confdefs.h.  */
4380_ACEOF
4381cat confdefs.h >>conftest.$ac_ext
4382cat >>conftest.$ac_ext <<_ACEOF
4383/* end confdefs.h.  */
4384#include <sys/types.h>
4385#include <sys/param.h>
4386
4387int
4388main ()
4389{
4390#if  ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
4391	&& BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
4392 bogus endian macros
4393#endif
4394
4395  ;
4396  return 0;
4397}
4398_ACEOF
4399rm -f conftest.$ac_objext
4400if { (ac_try="$ac_compile"
4401case "(($ac_try" in
4402  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4403  *) ac_try_echo=$ac_try;;
4404esac
4405eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4406  (eval "$ac_compile") 2>conftest.er1
4407  ac_status=$?
4408  grep -v '^ *+' conftest.er1 >conftest.err
4409  rm -f conftest.er1
4410  cat conftest.err >&5
4411  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4412  (exit $ac_status); } && {
4413	 test -z "$ac_c_werror_flag" ||
4414	 test ! -s conftest.err
4415       } && test -s conftest.$ac_objext; then
4416  # It does; now see whether it defined to BIG_ENDIAN or not.
4417cat >conftest.$ac_ext <<_ACEOF
4418/* confdefs.h.  */
4419_ACEOF
4420cat confdefs.h >>conftest.$ac_ext
4421cat >>conftest.$ac_ext <<_ACEOF
4422/* end confdefs.h.  */
4423#include <sys/types.h>
4424#include <sys/param.h>
4425
4426int
4427main ()
4428{
4429#if BYTE_ORDER != BIG_ENDIAN
4430 not big endian
4431#endif
4432
4433  ;
4434  return 0;
4435}
4436_ACEOF
4437rm -f conftest.$ac_objext
4438if { (ac_try="$ac_compile"
4439case "(($ac_try" in
4440  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4441  *) ac_try_echo=$ac_try;;
4442esac
4443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4444  (eval "$ac_compile") 2>conftest.er1
4445  ac_status=$?
4446  grep -v '^ *+' conftest.er1 >conftest.err
4447  rm -f conftest.er1
4448  cat conftest.err >&5
4449  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4450  (exit $ac_status); } && {
4451	 test -z "$ac_c_werror_flag" ||
4452	 test ! -s conftest.err
4453       } && test -s conftest.$ac_objext; then
4454  ac_cv_c_bigendian=yes
4455else
4456  echo "$as_me: failed program was:" >&5
4457sed 's/^/| /' conftest.$ac_ext >&5
4458
4459	ac_cv_c_bigendian=no
4460fi
4461
4462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4463else
4464  echo "$as_me: failed program was:" >&5
4465sed 's/^/| /' conftest.$ac_ext >&5
4466
4467	# It does not; compile a test program.
4468if test "$cross_compiling" = yes; then
4469  # try to guess the endianness by grepping values into an object file
4470  ac_cv_c_bigendian=unknown
4471  cat >conftest.$ac_ext <<_ACEOF
4472/* confdefs.h.  */
4473_ACEOF
4474cat confdefs.h >>conftest.$ac_ext
4475cat >>conftest.$ac_ext <<_ACEOF
4476/* end confdefs.h.  */
4477short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
4478short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
4479void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
4480short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
4481short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
4482void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
4483int
4484main ()
4485{
4486 _ascii (); _ebcdic ();
4487  ;
4488  return 0;
4489}
4490_ACEOF
4491rm -f conftest.$ac_objext
4492if { (ac_try="$ac_compile"
4493case "(($ac_try" in
4494  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4495  *) ac_try_echo=$ac_try;;
4496esac
4497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4498  (eval "$ac_compile") 2>conftest.er1
4499  ac_status=$?
4500  grep -v '^ *+' conftest.er1 >conftest.err
4501  rm -f conftest.er1
4502  cat conftest.err >&5
4503  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4504  (exit $ac_status); } && {
4505	 test -z "$ac_c_werror_flag" ||
4506	 test ! -s conftest.err
4507       } && test -s conftest.$ac_objext; then
4508  if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
4509  ac_cv_c_bigendian=yes
4510fi
4511if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
4512  if test "$ac_cv_c_bigendian" = unknown; then
4513    ac_cv_c_bigendian=no
4514  else
4515    # finding both strings is unlikely to happen, but who knows?
4516    ac_cv_c_bigendian=unknown
4517  fi
4518fi
4519else
4520  echo "$as_me: failed program was:" >&5
4521sed 's/^/| /' conftest.$ac_ext >&5
4522
4523
4524fi
4525
4526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4527else
4528  cat >conftest.$ac_ext <<_ACEOF
4529/* confdefs.h.  */
4530_ACEOF
4531cat confdefs.h >>conftest.$ac_ext
4532cat >>conftest.$ac_ext <<_ACEOF
4533/* end confdefs.h.  */
4534$ac_includes_default
4535int
4536main ()
4537{
4538
4539  /* Are we little or big endian?  From Harbison&Steele.  */
4540  union
4541  {
4542    long int l;
4543    char c[sizeof (long int)];
4544  } u;
4545  u.l = 1;
4546  return u.c[sizeof (long int) - 1] == 1;
4547
4548  ;
4549  return 0;
4550}
4551_ACEOF
4552rm -f conftest$ac_exeext
4553if { (ac_try="$ac_link"
4554case "(($ac_try" in
4555  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4556  *) ac_try_echo=$ac_try;;
4557esac
4558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4559  (eval "$ac_link") 2>&5
4560  ac_status=$?
4561  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4562  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4563  { (case "(($ac_try" in
4564  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4565  *) ac_try_echo=$ac_try;;
4566esac
4567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4568  (eval "$ac_try") 2>&5
4569  ac_status=$?
4570  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4571  (exit $ac_status); }; }; then
4572  ac_cv_c_bigendian=no
4573else
4574  echo "$as_me: program exited with status $ac_status" >&5
4575echo "$as_me: failed program was:" >&5
4576sed 's/^/| /' conftest.$ac_ext >&5
4577
4578( exit $ac_status )
4579ac_cv_c_bigendian=yes
4580fi
4581rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4582fi
4583
4584
4585fi
4586
4587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4588fi
4589{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
4590echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
4591case $ac_cv_c_bigendian in
4592  yes)
4593
4594cat >>confdefs.h <<\_ACEOF
4595#define WORDS_BIGENDIAN 1
4596_ACEOF
4597 ;;
4598  no)
4599     ;;
4600  *)
4601    { { echo "$as_me:$LINENO: error: unknown endianness
4602presetting ac_cv_c_bigendian=no (or yes) will help" >&5
4603echo "$as_me: error: unknown endianness
4604presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
4605   { (exit 1); exit 1; }; } ;;
4606esac
4607
4608    if test "${TEA_PLATFORM}" = "unix" ; then
4609
4610    #--------------------------------------------------------------------
4611    # On a few very rare systems, all of the libm.a stuff is
4612    # already in libc.a.  Set compiler flags accordingly.
4613    # Also, Linux requires the "ieee" library for math to work
4614    # right (and it must appear before "-lm").
4615    #--------------------------------------------------------------------
4616
4617    { echo "$as_me:$LINENO: checking for sin" >&5
4618echo $ECHO_N "checking for sin... $ECHO_C" >&6; }
4619if test "${ac_cv_func_sin+set}" = set; then
4620  echo $ECHO_N "(cached) $ECHO_C" >&6
4621else
4622  cat >conftest.$ac_ext <<_ACEOF
4623/* confdefs.h.  */
4624_ACEOF
4625cat confdefs.h >>conftest.$ac_ext
4626cat >>conftest.$ac_ext <<_ACEOF
4627/* end confdefs.h.  */
4628/* Define sin to an innocuous variant, in case <limits.h> declares sin.
4629   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4630#define sin innocuous_sin
4631
4632/* System header to define __stub macros and hopefully few prototypes,
4633    which can conflict with char sin (); below.
4634    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4635    <limits.h> exists even on freestanding compilers.  */
4636
4637#ifdef __STDC__
4638# include <limits.h>
4639#else
4640# include <assert.h>
4641#endif
4642
4643#undef sin
4644
4645/* Override any GCC internal prototype to avoid an error.
4646   Use char because int might match the return type of a GCC
4647   builtin and then its argument prototype would still apply.  */
4648#ifdef __cplusplus
4649extern "C"
4650#endif
4651char sin ();
4652/* The GNU C library defines this for functions which it implements
4653    to always fail with ENOSYS.  Some functions are actually named
4654    something starting with __ and the normal name is an alias.  */
4655#if defined __stub_sin || defined __stub___sin
4656choke me
4657#endif
4658
4659int
4660main ()
4661{
4662return sin ();
4663  ;
4664  return 0;
4665}
4666_ACEOF
4667rm -f conftest.$ac_objext conftest$ac_exeext
4668if { (ac_try="$ac_link"
4669case "(($ac_try" in
4670  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4671  *) ac_try_echo=$ac_try;;
4672esac
4673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4674  (eval "$ac_link") 2>conftest.er1
4675  ac_status=$?
4676  grep -v '^ *+' conftest.er1 >conftest.err
4677  rm -f conftest.er1
4678  cat conftest.err >&5
4679  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4680  (exit $ac_status); } && {
4681	 test -z "$ac_c_werror_flag" ||
4682	 test ! -s conftest.err
4683       } && test -s conftest$ac_exeext &&
4684       $as_test_x conftest$ac_exeext; then
4685  ac_cv_func_sin=yes
4686else
4687  echo "$as_me: failed program was:" >&5
4688sed 's/^/| /' conftest.$ac_ext >&5
4689
4690	ac_cv_func_sin=no
4691fi
4692
4693rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4694      conftest$ac_exeext conftest.$ac_ext
4695fi
4696{ echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5
4697echo "${ECHO_T}$ac_cv_func_sin" >&6; }
4698if test $ac_cv_func_sin = yes; then
4699  MATH_LIBS=""
4700else
4701  MATH_LIBS="-lm"
4702fi
4703
4704    { echo "$as_me:$LINENO: checking for main in -lieee" >&5
4705echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6; }
4706if test "${ac_cv_lib_ieee_main+set}" = set; then
4707  echo $ECHO_N "(cached) $ECHO_C" >&6
4708else
4709  ac_check_lib_save_LIBS=$LIBS
4710LIBS="-lieee  $LIBS"
4711cat >conftest.$ac_ext <<_ACEOF
4712/* confdefs.h.  */
4713_ACEOF
4714cat confdefs.h >>conftest.$ac_ext
4715cat >>conftest.$ac_ext <<_ACEOF
4716/* end confdefs.h.  */
4717
4718
4719int
4720main ()
4721{
4722return main ();
4723  ;
4724  return 0;
4725}
4726_ACEOF
4727rm -f conftest.$ac_objext conftest$ac_exeext
4728if { (ac_try="$ac_link"
4729case "(($ac_try" in
4730  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4731  *) ac_try_echo=$ac_try;;
4732esac
4733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4734  (eval "$ac_link") 2>conftest.er1
4735  ac_status=$?
4736  grep -v '^ *+' conftest.er1 >conftest.err
4737  rm -f conftest.er1
4738  cat conftest.err >&5
4739  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4740  (exit $ac_status); } && {
4741	 test -z "$ac_c_werror_flag" ||
4742	 test ! -s conftest.err
4743       } && test -s conftest$ac_exeext &&
4744       $as_test_x conftest$ac_exeext; then
4745  ac_cv_lib_ieee_main=yes
4746else
4747  echo "$as_me: failed program was:" >&5
4748sed 's/^/| /' conftest.$ac_ext >&5
4749
4750	ac_cv_lib_ieee_main=no
4751fi
4752
4753rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4754      conftest$ac_exeext conftest.$ac_ext
4755LIBS=$ac_check_lib_save_LIBS
4756fi
4757{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5
4758echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6; }
4759if test $ac_cv_lib_ieee_main = yes; then
4760  MATH_LIBS="-lieee $MATH_LIBS"
4761fi
4762
4763
4764    #--------------------------------------------------------------------
4765    # Interactive UNIX requires -linet instead of -lsocket, plus it
4766    # needs net/errno.h to define the socket-related error codes.
4767    #--------------------------------------------------------------------
4768
4769    { echo "$as_me:$LINENO: checking for main in -linet" >&5
4770echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6; }
4771if test "${ac_cv_lib_inet_main+set}" = set; then
4772  echo $ECHO_N "(cached) $ECHO_C" >&6
4773else
4774  ac_check_lib_save_LIBS=$LIBS
4775LIBS="-linet  $LIBS"
4776cat >conftest.$ac_ext <<_ACEOF
4777/* confdefs.h.  */
4778_ACEOF
4779cat confdefs.h >>conftest.$ac_ext
4780cat >>conftest.$ac_ext <<_ACEOF
4781/* end confdefs.h.  */
4782
4783
4784int
4785main ()
4786{
4787return main ();
4788  ;
4789  return 0;
4790}
4791_ACEOF
4792rm -f conftest.$ac_objext conftest$ac_exeext
4793if { (ac_try="$ac_link"
4794case "(($ac_try" in
4795  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4796  *) ac_try_echo=$ac_try;;
4797esac
4798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4799  (eval "$ac_link") 2>conftest.er1
4800  ac_status=$?
4801  grep -v '^ *+' conftest.er1 >conftest.err
4802  rm -f conftest.er1
4803  cat conftest.err >&5
4804  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4805  (exit $ac_status); } && {
4806	 test -z "$ac_c_werror_flag" ||
4807	 test ! -s conftest.err
4808       } && test -s conftest$ac_exeext &&
4809       $as_test_x conftest$ac_exeext; then
4810  ac_cv_lib_inet_main=yes
4811else
4812  echo "$as_me: failed program was:" >&5
4813sed 's/^/| /' conftest.$ac_ext >&5
4814
4815	ac_cv_lib_inet_main=no
4816fi
4817
4818rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4819      conftest$ac_exeext conftest.$ac_ext
4820LIBS=$ac_check_lib_save_LIBS
4821fi
4822{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5
4823echo "${ECHO_T}$ac_cv_lib_inet_main" >&6; }
4824if test $ac_cv_lib_inet_main = yes; then
4825  LIBS="$LIBS -linet"
4826fi
4827
4828    if test "${ac_cv_header_net_errno_h+set}" = set; then
4829  { echo "$as_me:$LINENO: checking for net/errno.h" >&5
4830echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; }
4831if test "${ac_cv_header_net_errno_h+set}" = set; then
4832  echo $ECHO_N "(cached) $ECHO_C" >&6
4833fi
4834{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
4835echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; }
4836else
4837  # Is the header compilable?
4838{ echo "$as_me:$LINENO: checking net/errno.h usability" >&5
4839echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6; }
4840cat >conftest.$ac_ext <<_ACEOF
4841/* confdefs.h.  */
4842_ACEOF
4843cat confdefs.h >>conftest.$ac_ext
4844cat >>conftest.$ac_ext <<_ACEOF
4845/* end confdefs.h.  */
4846$ac_includes_default
4847#include <net/errno.h>
4848_ACEOF
4849rm -f conftest.$ac_objext
4850if { (ac_try="$ac_compile"
4851case "(($ac_try" in
4852  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4853  *) ac_try_echo=$ac_try;;
4854esac
4855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4856  (eval "$ac_compile") 2>conftest.er1
4857  ac_status=$?
4858  grep -v '^ *+' conftest.er1 >conftest.err
4859  rm -f conftest.er1
4860  cat conftest.err >&5
4861  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4862  (exit $ac_status); } && {
4863	 test -z "$ac_c_werror_flag" ||
4864	 test ! -s conftest.err
4865       } && test -s conftest.$ac_objext; then
4866  ac_header_compiler=yes
4867else
4868  echo "$as_me: failed program was:" >&5
4869sed 's/^/| /' conftest.$ac_ext >&5
4870
4871	ac_header_compiler=no
4872fi
4873
4874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4875{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4876echo "${ECHO_T}$ac_header_compiler" >&6; }
4877
4878# Is the header present?
4879{ echo "$as_me:$LINENO: checking net/errno.h presence" >&5
4880echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6; }
4881cat >conftest.$ac_ext <<_ACEOF
4882/* confdefs.h.  */
4883_ACEOF
4884cat confdefs.h >>conftest.$ac_ext
4885cat >>conftest.$ac_ext <<_ACEOF
4886/* end confdefs.h.  */
4887#include <net/errno.h>
4888_ACEOF
4889if { (ac_try="$ac_cpp conftest.$ac_ext"
4890case "(($ac_try" in
4891  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4892  *) ac_try_echo=$ac_try;;
4893esac
4894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4895  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4896  ac_status=$?
4897  grep -v '^ *+' conftest.er1 >conftest.err
4898  rm -f conftest.er1
4899  cat conftest.err >&5
4900  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4901  (exit $ac_status); } >/dev/null && {
4902	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4903	 test ! -s conftest.err
4904       }; then
4905  ac_header_preproc=yes
4906else
4907  echo "$as_me: failed program was:" >&5
4908sed 's/^/| /' conftest.$ac_ext >&5
4909
4910  ac_header_preproc=no
4911fi
4912
4913rm -f conftest.err conftest.$ac_ext
4914{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4915echo "${ECHO_T}$ac_header_preproc" >&6; }
4916
4917# So?  What about this header?
4918case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4919  yes:no: )
4920    { echo "$as_me:$LINENO: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
4921echo "$as_me: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4922    { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the compiler's result" >&5
4923echo "$as_me: WARNING: net/errno.h: proceeding with the compiler's result" >&2;}
4924    ac_header_preproc=yes
4925    ;;
4926  no:yes:* )
4927    { echo "$as_me:$LINENO: WARNING: net/errno.h: present but cannot be compiled" >&5
4928echo "$as_me: WARNING: net/errno.h: present but cannot be compiled" >&2;}
4929    { echo "$as_me:$LINENO: WARNING: net/errno.h:     check for missing prerequisite headers?" >&5
4930echo "$as_me: WARNING: net/errno.h:     check for missing prerequisite headers?" >&2;}
4931    { echo "$as_me:$LINENO: WARNING: net/errno.h: see the Autoconf documentation" >&5
4932echo "$as_me: WARNING: net/errno.h: see the Autoconf documentation" >&2;}
4933    { echo "$as_me:$LINENO: WARNING: net/errno.h:     section \"Present But Cannot Be Compiled\"" >&5
4934echo "$as_me: WARNING: net/errno.h:     section \"Present But Cannot Be Compiled\"" >&2;}
4935    { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the preprocessor's result" >&5
4936echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;}
4937    { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5
4938echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;}
4939
4940    ;;
4941esac
4942{ echo "$as_me:$LINENO: checking for net/errno.h" >&5
4943echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; }
4944if test "${ac_cv_header_net_errno_h+set}" = set; then
4945  echo $ECHO_N "(cached) $ECHO_C" >&6
4946else
4947  ac_cv_header_net_errno_h=$ac_header_preproc
4948fi
4949{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
4950echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; }
4951
4952fi
4953if test $ac_cv_header_net_errno_h = yes; then
4954
4955
4956cat >>confdefs.h <<\_ACEOF
4957#define HAVE_NET_ERRNO_H 1
4958_ACEOF
4959
4960fi
4961
4962
4963
4964    #--------------------------------------------------------------------
4965    #	Check for the existence of the -lsocket and -lnsl libraries.
4966    #	The order here is important, so that they end up in the right
4967    #	order in the command line generated by make.  Here are some
4968    #	special considerations:
4969    #	1. Use "connect" and "accept" to check for -lsocket, and
4970    #	   "gethostbyname" to check for -lnsl.
4971    #	2. Use each function name only once:  can't redo a check because
4972    #	   autoconf caches the results of the last check and won't redo it.
4973    #	3. Use -lnsl and -lsocket only if they supply procedures that
4974    #	   aren't already present in the normal libraries.  This is because
4975    #	   IRIX 5.2 has libraries, but they aren't needed and they're
4976    #	   bogus:  they goof up name resolution if used.
4977    #	4. On some SVR4 systems, can't use -lsocket without -lnsl too.
4978    #	   To get around this problem, check for both libraries together
4979    #	   if -lsocket doesn't work by itself.
4980    #--------------------------------------------------------------------
4981
4982    tcl_checkBoth=0
4983    { echo "$as_me:$LINENO: checking for connect" >&5
4984echo $ECHO_N "checking for connect... $ECHO_C" >&6; }
4985if test "${ac_cv_func_connect+set}" = set; then
4986  echo $ECHO_N "(cached) $ECHO_C" >&6
4987else
4988  cat >conftest.$ac_ext <<_ACEOF
4989/* confdefs.h.  */
4990_ACEOF
4991cat confdefs.h >>conftest.$ac_ext
4992cat >>conftest.$ac_ext <<_ACEOF
4993/* end confdefs.h.  */
4994/* Define connect to an innocuous variant, in case <limits.h> declares connect.
4995   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4996#define connect innocuous_connect
4997
4998/* System header to define __stub macros and hopefully few prototypes,
4999    which can conflict with char connect (); below.
5000    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5001    <limits.h> exists even on freestanding compilers.  */
5002
5003#ifdef __STDC__
5004# include <limits.h>
5005#else
5006# include <assert.h>
5007#endif
5008
5009#undef connect
5010
5011/* Override any GCC internal prototype to avoid an error.
5012   Use char because int might match the return type of a GCC
5013   builtin and then its argument prototype would still apply.  */
5014#ifdef __cplusplus
5015extern "C"
5016#endif
5017char connect ();
5018/* The GNU C library defines this for functions which it implements
5019    to always fail with ENOSYS.  Some functions are actually named
5020    something starting with __ and the normal name is an alias.  */
5021#if defined __stub_connect || defined __stub___connect
5022choke me
5023#endif
5024
5025int
5026main ()
5027{
5028return connect ();
5029  ;
5030  return 0;
5031}
5032_ACEOF
5033rm -f conftest.$ac_objext conftest$ac_exeext
5034if { (ac_try="$ac_link"
5035case "(($ac_try" in
5036  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5037  *) ac_try_echo=$ac_try;;
5038esac
5039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5040  (eval "$ac_link") 2>conftest.er1
5041  ac_status=$?
5042  grep -v '^ *+' conftest.er1 >conftest.err
5043  rm -f conftest.er1
5044  cat conftest.err >&5
5045  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5046  (exit $ac_status); } && {
5047	 test -z "$ac_c_werror_flag" ||
5048	 test ! -s conftest.err
5049       } && test -s conftest$ac_exeext &&
5050       $as_test_x conftest$ac_exeext; then
5051  ac_cv_func_connect=yes
5052else
5053  echo "$as_me: failed program was:" >&5
5054sed 's/^/| /' conftest.$ac_ext >&5
5055
5056	ac_cv_func_connect=no
5057fi
5058
5059rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5060      conftest$ac_exeext conftest.$ac_ext
5061fi
5062{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
5063echo "${ECHO_T}$ac_cv_func_connect" >&6; }
5064if test $ac_cv_func_connect = yes; then
5065  tcl_checkSocket=0
5066else
5067  tcl_checkSocket=1
5068fi
5069
5070    if test "$tcl_checkSocket" = 1; then
5071	{ echo "$as_me:$LINENO: checking for setsockopt" >&5
5072echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6; }
5073if test "${ac_cv_func_setsockopt+set}" = set; then
5074  echo $ECHO_N "(cached) $ECHO_C" >&6
5075else
5076  cat >conftest.$ac_ext <<_ACEOF
5077/* confdefs.h.  */
5078_ACEOF
5079cat confdefs.h >>conftest.$ac_ext
5080cat >>conftest.$ac_ext <<_ACEOF
5081/* end confdefs.h.  */
5082/* Define setsockopt to an innocuous variant, in case <limits.h> declares setsockopt.
5083   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5084#define setsockopt innocuous_setsockopt
5085
5086/* System header to define __stub macros and hopefully few prototypes,
5087    which can conflict with char setsockopt (); below.
5088    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5089    <limits.h> exists even on freestanding compilers.  */
5090
5091#ifdef __STDC__
5092# include <limits.h>
5093#else
5094# include <assert.h>
5095#endif
5096
5097#undef setsockopt
5098
5099/* Override any GCC internal prototype to avoid an error.
5100   Use char because int might match the return type of a GCC
5101   builtin and then its argument prototype would still apply.  */
5102#ifdef __cplusplus
5103extern "C"
5104#endif
5105char setsockopt ();
5106/* The GNU C library defines this for functions which it implements
5107    to always fail with ENOSYS.  Some functions are actually named
5108    something starting with __ and the normal name is an alias.  */
5109#if defined __stub_setsockopt || defined __stub___setsockopt
5110choke me
5111#endif
5112
5113int
5114main ()
5115{
5116return setsockopt ();
5117  ;
5118  return 0;
5119}
5120_ACEOF
5121rm -f conftest.$ac_objext conftest$ac_exeext
5122if { (ac_try="$ac_link"
5123case "(($ac_try" in
5124  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5125  *) ac_try_echo=$ac_try;;
5126esac
5127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5128  (eval "$ac_link") 2>conftest.er1
5129  ac_status=$?
5130  grep -v '^ *+' conftest.er1 >conftest.err
5131  rm -f conftest.er1
5132  cat conftest.err >&5
5133  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5134  (exit $ac_status); } && {
5135	 test -z "$ac_c_werror_flag" ||
5136	 test ! -s conftest.err
5137       } && test -s conftest$ac_exeext &&
5138       $as_test_x conftest$ac_exeext; then
5139  ac_cv_func_setsockopt=yes
5140else
5141  echo "$as_me: failed program was:" >&5
5142sed 's/^/| /' conftest.$ac_ext >&5
5143
5144	ac_cv_func_setsockopt=no
5145fi
5146
5147rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5148      conftest$ac_exeext conftest.$ac_ext
5149fi
5150{ echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5
5151echo "${ECHO_T}$ac_cv_func_setsockopt" >&6; }
5152if test $ac_cv_func_setsockopt = yes; then
5153  :
5154else
5155  { echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5
5156echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6; }
5157if test "${ac_cv_lib_socket_setsockopt+set}" = set; then
5158  echo $ECHO_N "(cached) $ECHO_C" >&6
5159else
5160  ac_check_lib_save_LIBS=$LIBS
5161LIBS="-lsocket  $LIBS"
5162cat >conftest.$ac_ext <<_ACEOF
5163/* confdefs.h.  */
5164_ACEOF
5165cat confdefs.h >>conftest.$ac_ext
5166cat >>conftest.$ac_ext <<_ACEOF
5167/* end confdefs.h.  */
5168
5169/* Override any GCC internal prototype to avoid an error.
5170   Use char because int might match the return type of a GCC
5171   builtin and then its argument prototype would still apply.  */
5172#ifdef __cplusplus
5173extern "C"
5174#endif
5175char setsockopt ();
5176int
5177main ()
5178{
5179return setsockopt ();
5180  ;
5181  return 0;
5182}
5183_ACEOF
5184rm -f conftest.$ac_objext conftest$ac_exeext
5185if { (ac_try="$ac_link"
5186case "(($ac_try" in
5187  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5188  *) ac_try_echo=$ac_try;;
5189esac
5190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5191  (eval "$ac_link") 2>conftest.er1
5192  ac_status=$?
5193  grep -v '^ *+' conftest.er1 >conftest.err
5194  rm -f conftest.er1
5195  cat conftest.err >&5
5196  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5197  (exit $ac_status); } && {
5198	 test -z "$ac_c_werror_flag" ||
5199	 test ! -s conftest.err
5200       } && test -s conftest$ac_exeext &&
5201       $as_test_x conftest$ac_exeext; then
5202  ac_cv_lib_socket_setsockopt=yes
5203else
5204  echo "$as_me: failed program was:" >&5
5205sed 's/^/| /' conftest.$ac_ext >&5
5206
5207	ac_cv_lib_socket_setsockopt=no
5208fi
5209
5210rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5211      conftest$ac_exeext conftest.$ac_ext
5212LIBS=$ac_check_lib_save_LIBS
5213fi
5214{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5
5215echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6; }
5216if test $ac_cv_lib_socket_setsockopt = yes; then
5217  LIBS="$LIBS -lsocket"
5218else
5219  tcl_checkBoth=1
5220fi
5221
5222fi
5223
5224    fi
5225    if test "$tcl_checkBoth" = 1; then
5226	tk_oldLibs=$LIBS
5227	LIBS="$LIBS -lsocket -lnsl"
5228	{ echo "$as_me:$LINENO: checking for accept" >&5
5229echo $ECHO_N "checking for accept... $ECHO_C" >&6; }
5230if test "${ac_cv_func_accept+set}" = set; then
5231  echo $ECHO_N "(cached) $ECHO_C" >&6
5232else
5233  cat >conftest.$ac_ext <<_ACEOF
5234/* confdefs.h.  */
5235_ACEOF
5236cat confdefs.h >>conftest.$ac_ext
5237cat >>conftest.$ac_ext <<_ACEOF
5238/* end confdefs.h.  */
5239/* Define accept to an innocuous variant, in case <limits.h> declares accept.
5240   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5241#define accept innocuous_accept
5242
5243/* System header to define __stub macros and hopefully few prototypes,
5244    which can conflict with char accept (); below.
5245    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5246    <limits.h> exists even on freestanding compilers.  */
5247
5248#ifdef __STDC__
5249# include <limits.h>
5250#else
5251# include <assert.h>
5252#endif
5253
5254#undef accept
5255
5256/* Override any GCC internal prototype to avoid an error.
5257   Use char because int might match the return type of a GCC
5258   builtin and then its argument prototype would still apply.  */
5259#ifdef __cplusplus
5260extern "C"
5261#endif
5262char accept ();
5263/* The GNU C library defines this for functions which it implements
5264    to always fail with ENOSYS.  Some functions are actually named
5265    something starting with __ and the normal name is an alias.  */
5266#if defined __stub_accept || defined __stub___accept
5267choke me
5268#endif
5269
5270int
5271main ()
5272{
5273return accept ();
5274  ;
5275  return 0;
5276}
5277_ACEOF
5278rm -f conftest.$ac_objext conftest$ac_exeext
5279if { (ac_try="$ac_link"
5280case "(($ac_try" in
5281  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5282  *) ac_try_echo=$ac_try;;
5283esac
5284eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5285  (eval "$ac_link") 2>conftest.er1
5286  ac_status=$?
5287  grep -v '^ *+' conftest.er1 >conftest.err
5288  rm -f conftest.er1
5289  cat conftest.err >&5
5290  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5291  (exit $ac_status); } && {
5292	 test -z "$ac_c_werror_flag" ||
5293	 test ! -s conftest.err
5294       } && test -s conftest$ac_exeext &&
5295       $as_test_x conftest$ac_exeext; then
5296  ac_cv_func_accept=yes
5297else
5298  echo "$as_me: failed program was:" >&5
5299sed 's/^/| /' conftest.$ac_ext >&5
5300
5301	ac_cv_func_accept=no
5302fi
5303
5304rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5305      conftest$ac_exeext conftest.$ac_ext
5306fi
5307{ echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5
5308echo "${ECHO_T}$ac_cv_func_accept" >&6; }
5309if test $ac_cv_func_accept = yes; then
5310  tcl_checkNsl=0
5311else
5312  LIBS=$tk_oldLibs
5313fi
5314
5315    fi
5316    { echo "$as_me:$LINENO: checking for gethostbyname" >&5
5317echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; }
5318if test "${ac_cv_func_gethostbyname+set}" = set; then
5319  echo $ECHO_N "(cached) $ECHO_C" >&6
5320else
5321  cat >conftest.$ac_ext <<_ACEOF
5322/* confdefs.h.  */
5323_ACEOF
5324cat confdefs.h >>conftest.$ac_ext
5325cat >>conftest.$ac_ext <<_ACEOF
5326/* end confdefs.h.  */
5327/* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
5328   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5329#define gethostbyname innocuous_gethostbyname
5330
5331/* System header to define __stub macros and hopefully few prototypes,
5332    which can conflict with char gethostbyname (); below.
5333    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5334    <limits.h> exists even on freestanding compilers.  */
5335
5336#ifdef __STDC__
5337# include <limits.h>
5338#else
5339# include <assert.h>
5340#endif
5341
5342#undef gethostbyname
5343
5344/* Override any GCC internal prototype to avoid an error.
5345   Use char because int might match the return type of a GCC
5346   builtin and then its argument prototype would still apply.  */
5347#ifdef __cplusplus
5348extern "C"
5349#endif
5350char gethostbyname ();
5351/* The GNU C library defines this for functions which it implements
5352    to always fail with ENOSYS.  Some functions are actually named
5353    something starting with __ and the normal name is an alias.  */
5354#if defined __stub_gethostbyname || defined __stub___gethostbyname
5355choke me
5356#endif
5357
5358int
5359main ()
5360{
5361return gethostbyname ();
5362  ;
5363  return 0;
5364}
5365_ACEOF
5366rm -f conftest.$ac_objext conftest$ac_exeext
5367if { (ac_try="$ac_link"
5368case "(($ac_try" in
5369  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5370  *) ac_try_echo=$ac_try;;
5371esac
5372eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5373  (eval "$ac_link") 2>conftest.er1
5374  ac_status=$?
5375  grep -v '^ *+' conftest.er1 >conftest.err
5376  rm -f conftest.er1
5377  cat conftest.err >&5
5378  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5379  (exit $ac_status); } && {
5380	 test -z "$ac_c_werror_flag" ||
5381	 test ! -s conftest.err
5382       } && test -s conftest$ac_exeext &&
5383       $as_test_x conftest$ac_exeext; then
5384  ac_cv_func_gethostbyname=yes
5385else
5386  echo "$as_me: failed program was:" >&5
5387sed 's/^/| /' conftest.$ac_ext >&5
5388
5389	ac_cv_func_gethostbyname=no
5390fi
5391
5392rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5393      conftest$ac_exeext conftest.$ac_ext
5394fi
5395{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
5396echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; }
5397if test $ac_cv_func_gethostbyname = yes; then
5398  :
5399else
5400  { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
5401echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; }
5402if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
5403  echo $ECHO_N "(cached) $ECHO_C" >&6
5404else
5405  ac_check_lib_save_LIBS=$LIBS
5406LIBS="-lnsl  $LIBS"
5407cat >conftest.$ac_ext <<_ACEOF
5408/* confdefs.h.  */
5409_ACEOF
5410cat confdefs.h >>conftest.$ac_ext
5411cat >>conftest.$ac_ext <<_ACEOF
5412/* end confdefs.h.  */
5413
5414/* Override any GCC internal prototype to avoid an error.
5415   Use char because int might match the return type of a GCC
5416   builtin and then its argument prototype would still apply.  */
5417#ifdef __cplusplus
5418extern "C"
5419#endif
5420char gethostbyname ();
5421int
5422main ()
5423{
5424return gethostbyname ();
5425  ;
5426  return 0;
5427}
5428_ACEOF
5429rm -f conftest.$ac_objext conftest$ac_exeext
5430if { (ac_try="$ac_link"
5431case "(($ac_try" in
5432  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5433  *) ac_try_echo=$ac_try;;
5434esac
5435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5436  (eval "$ac_link") 2>conftest.er1
5437  ac_status=$?
5438  grep -v '^ *+' conftest.er1 >conftest.err
5439  rm -f conftest.er1
5440  cat conftest.err >&5
5441  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5442  (exit $ac_status); } && {
5443	 test -z "$ac_c_werror_flag" ||
5444	 test ! -s conftest.err
5445       } && test -s conftest$ac_exeext &&
5446       $as_test_x conftest$ac_exeext; then
5447  ac_cv_lib_nsl_gethostbyname=yes
5448else
5449  echo "$as_me: failed program was:" >&5
5450sed 's/^/| /' conftest.$ac_ext >&5
5451
5452	ac_cv_lib_nsl_gethostbyname=no
5453fi
5454
5455rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5456      conftest$ac_exeext conftest.$ac_ext
5457LIBS=$ac_check_lib_save_LIBS
5458fi
5459{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
5460echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; }
5461if test $ac_cv_lib_nsl_gethostbyname = yes; then
5462  LIBS="$LIBS -lnsl"
5463fi
5464
5465fi
5466
5467
5468    # TEA specific: Don't perform the eval of the libraries here because
5469    # DL_LIBS won't be set until we call TEA_CONFIG_CFLAGS
5470
5471    TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}'
5472
5473
5474
5475
5476    { echo "$as_me:$LINENO: checking dirent.h" >&5
5477echo $ECHO_N "checking dirent.h... $ECHO_C" >&6; }
5478if test "${tcl_cv_dirent_h+set}" = set; then
5479  echo $ECHO_N "(cached) $ECHO_C" >&6
5480else
5481
5482    cat >conftest.$ac_ext <<_ACEOF
5483/* confdefs.h.  */
5484_ACEOF
5485cat confdefs.h >>conftest.$ac_ext
5486cat >>conftest.$ac_ext <<_ACEOF
5487/* end confdefs.h.  */
5488#include <sys/types.h>
5489#include <dirent.h>
5490int
5491main ()
5492{
5493
5494#ifndef _POSIX_SOURCE
5495#   ifdef __Lynx__
5496	/*
5497	 * Generate compilation error to make the test fail:  Lynx headers
5498	 * are only valid if really in the POSIX environment.
5499	 */
5500
5501	missing_procedure();
5502#   endif
5503#endif
5504DIR *d;
5505struct dirent *entryPtr;
5506char *p;
5507d = opendir("foobar");
5508entryPtr = readdir(d);
5509p = entryPtr->d_name;
5510closedir(d);
5511
5512  ;
5513  return 0;
5514}
5515_ACEOF
5516rm -f conftest.$ac_objext conftest$ac_exeext
5517if { (ac_try="$ac_link"
5518case "(($ac_try" in
5519  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5520  *) ac_try_echo=$ac_try;;
5521esac
5522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5523  (eval "$ac_link") 2>conftest.er1
5524  ac_status=$?
5525  grep -v '^ *+' conftest.er1 >conftest.err
5526  rm -f conftest.er1
5527  cat conftest.err >&5
5528  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5529  (exit $ac_status); } && {
5530	 test -z "$ac_c_werror_flag" ||
5531	 test ! -s conftest.err
5532       } && test -s conftest$ac_exeext &&
5533       $as_test_x conftest$ac_exeext; then
5534  tcl_cv_dirent_h=yes
5535else
5536  echo "$as_me: failed program was:" >&5
5537sed 's/^/| /' conftest.$ac_ext >&5
5538
5539	tcl_cv_dirent_h=no
5540fi
5541
5542rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5543      conftest$ac_exeext conftest.$ac_ext
5544fi
5545{ echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5
5546echo "${ECHO_T}$tcl_cv_dirent_h" >&6; }
5547
5548    if test $tcl_cv_dirent_h = no; then
5549
5550cat >>confdefs.h <<\_ACEOF
5551#define NO_DIRENT_H 1
5552_ACEOF
5553
5554    fi
5555
5556    # TEA specific:
5557    if test "${ac_cv_header_errno_h+set}" = set; then
5558  { echo "$as_me:$LINENO: checking for errno.h" >&5
5559echo $ECHO_N "checking for errno.h... $ECHO_C" >&6; }
5560if test "${ac_cv_header_errno_h+set}" = set; then
5561  echo $ECHO_N "(cached) $ECHO_C" >&6
5562fi
5563{ echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
5564echo "${ECHO_T}$ac_cv_header_errno_h" >&6; }
5565else
5566  # Is the header compilable?
5567{ echo "$as_me:$LINENO: checking errno.h usability" >&5
5568echo $ECHO_N "checking errno.h usability... $ECHO_C" >&6; }
5569cat >conftest.$ac_ext <<_ACEOF
5570/* confdefs.h.  */
5571_ACEOF
5572cat confdefs.h >>conftest.$ac_ext
5573cat >>conftest.$ac_ext <<_ACEOF
5574/* end confdefs.h.  */
5575$ac_includes_default
5576#include <errno.h>
5577_ACEOF
5578rm -f conftest.$ac_objext
5579if { (ac_try="$ac_compile"
5580case "(($ac_try" in
5581  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5582  *) ac_try_echo=$ac_try;;
5583esac
5584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5585  (eval "$ac_compile") 2>conftest.er1
5586  ac_status=$?
5587  grep -v '^ *+' conftest.er1 >conftest.err
5588  rm -f conftest.er1
5589  cat conftest.err >&5
5590  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5591  (exit $ac_status); } && {
5592	 test -z "$ac_c_werror_flag" ||
5593	 test ! -s conftest.err
5594       } && test -s conftest.$ac_objext; then
5595  ac_header_compiler=yes
5596else
5597  echo "$as_me: failed program was:" >&5
5598sed 's/^/| /' conftest.$ac_ext >&5
5599
5600	ac_header_compiler=no
5601fi
5602
5603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5604{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5605echo "${ECHO_T}$ac_header_compiler" >&6; }
5606
5607# Is the header present?
5608{ echo "$as_me:$LINENO: checking errno.h presence" >&5
5609echo $ECHO_N "checking errno.h presence... $ECHO_C" >&6; }
5610cat >conftest.$ac_ext <<_ACEOF
5611/* confdefs.h.  */
5612_ACEOF
5613cat confdefs.h >>conftest.$ac_ext
5614cat >>conftest.$ac_ext <<_ACEOF
5615/* end confdefs.h.  */
5616#include <errno.h>
5617_ACEOF
5618if { (ac_try="$ac_cpp conftest.$ac_ext"
5619case "(($ac_try" in
5620  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5621  *) ac_try_echo=$ac_try;;
5622esac
5623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5624  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5625  ac_status=$?
5626  grep -v '^ *+' conftest.er1 >conftest.err
5627  rm -f conftest.er1
5628  cat conftest.err >&5
5629  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5630  (exit $ac_status); } >/dev/null && {
5631	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5632	 test ! -s conftest.err
5633       }; then
5634  ac_header_preproc=yes
5635else
5636  echo "$as_me: failed program was:" >&5
5637sed 's/^/| /' conftest.$ac_ext >&5
5638
5639  ac_header_preproc=no
5640fi
5641
5642rm -f conftest.err conftest.$ac_ext
5643{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5644echo "${ECHO_T}$ac_header_preproc" >&6; }
5645
5646# So?  What about this header?
5647case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5648  yes:no: )
5649    { echo "$as_me:$LINENO: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
5650echo "$as_me: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5651    { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the compiler's result" >&5
5652echo "$as_me: WARNING: errno.h: proceeding with the compiler's result" >&2;}
5653    ac_header_preproc=yes
5654    ;;
5655  no:yes:* )
5656    { echo "$as_me:$LINENO: WARNING: errno.h: present but cannot be compiled" >&5
5657echo "$as_me: WARNING: errno.h: present but cannot be compiled" >&2;}
5658    { echo "$as_me:$LINENO: WARNING: errno.h:     check for missing prerequisite headers?" >&5
5659echo "$as_me: WARNING: errno.h:     check for missing prerequisite headers?" >&2;}
5660    { echo "$as_me:$LINENO: WARNING: errno.h: see the Autoconf documentation" >&5
5661echo "$as_me: WARNING: errno.h: see the Autoconf documentation" >&2;}
5662    { echo "$as_me:$LINENO: WARNING: errno.h:     section \"Present But Cannot Be Compiled\"" >&5
5663echo "$as_me: WARNING: errno.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5664    { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the preprocessor's result" >&5
5665echo "$as_me: WARNING: errno.h: proceeding with the preprocessor's result" >&2;}
5666    { echo "$as_me:$LINENO: WARNING: errno.h: in the future, the compiler will take precedence" >&5
5667echo "$as_me: WARNING: errno.h: in the future, the compiler will take precedence" >&2;}
5668
5669    ;;
5670esac
5671{ echo "$as_me:$LINENO: checking for errno.h" >&5
5672echo $ECHO_N "checking for errno.h... $ECHO_C" >&6; }
5673if test "${ac_cv_header_errno_h+set}" = set; then
5674  echo $ECHO_N "(cached) $ECHO_C" >&6
5675else
5676  ac_cv_header_errno_h=$ac_header_preproc
5677fi
5678{ echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
5679echo "${ECHO_T}$ac_cv_header_errno_h" >&6; }
5680
5681fi
5682if test $ac_cv_header_errno_h = yes; then
5683  :
5684else
5685
5686cat >>confdefs.h <<\_ACEOF
5687#define NO_ERRNO_H 1
5688_ACEOF
5689
5690fi
5691
5692
5693    if test "${ac_cv_header_float_h+set}" = set; then
5694  { echo "$as_me:$LINENO: checking for float.h" >&5
5695echo $ECHO_N "checking for float.h... $ECHO_C" >&6; }
5696if test "${ac_cv_header_float_h+set}" = set; then
5697  echo $ECHO_N "(cached) $ECHO_C" >&6
5698fi
5699{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
5700echo "${ECHO_T}$ac_cv_header_float_h" >&6; }
5701else
5702  # Is the header compilable?
5703{ echo "$as_me:$LINENO: checking float.h usability" >&5
5704echo $ECHO_N "checking float.h usability... $ECHO_C" >&6; }
5705cat >conftest.$ac_ext <<_ACEOF
5706/* confdefs.h.  */
5707_ACEOF
5708cat confdefs.h >>conftest.$ac_ext
5709cat >>conftest.$ac_ext <<_ACEOF
5710/* end confdefs.h.  */
5711$ac_includes_default
5712#include <float.h>
5713_ACEOF
5714rm -f conftest.$ac_objext
5715if { (ac_try="$ac_compile"
5716case "(($ac_try" in
5717  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5718  *) ac_try_echo=$ac_try;;
5719esac
5720eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5721  (eval "$ac_compile") 2>conftest.er1
5722  ac_status=$?
5723  grep -v '^ *+' conftest.er1 >conftest.err
5724  rm -f conftest.er1
5725  cat conftest.err >&5
5726  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5727  (exit $ac_status); } && {
5728	 test -z "$ac_c_werror_flag" ||
5729	 test ! -s conftest.err
5730       } && test -s conftest.$ac_objext; then
5731  ac_header_compiler=yes
5732else
5733  echo "$as_me: failed program was:" >&5
5734sed 's/^/| /' conftest.$ac_ext >&5
5735
5736	ac_header_compiler=no
5737fi
5738
5739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5740{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5741echo "${ECHO_T}$ac_header_compiler" >&6; }
5742
5743# Is the header present?
5744{ echo "$as_me:$LINENO: checking float.h presence" >&5
5745echo $ECHO_N "checking float.h presence... $ECHO_C" >&6; }
5746cat >conftest.$ac_ext <<_ACEOF
5747/* confdefs.h.  */
5748_ACEOF
5749cat confdefs.h >>conftest.$ac_ext
5750cat >>conftest.$ac_ext <<_ACEOF
5751/* end confdefs.h.  */
5752#include <float.h>
5753_ACEOF
5754if { (ac_try="$ac_cpp conftest.$ac_ext"
5755case "(($ac_try" in
5756  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5757  *) ac_try_echo=$ac_try;;
5758esac
5759eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5760  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5761  ac_status=$?
5762  grep -v '^ *+' conftest.er1 >conftest.err
5763  rm -f conftest.er1
5764  cat conftest.err >&5
5765  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5766  (exit $ac_status); } >/dev/null && {
5767	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5768	 test ! -s conftest.err
5769       }; then
5770  ac_header_preproc=yes
5771else
5772  echo "$as_me: failed program was:" >&5
5773sed 's/^/| /' conftest.$ac_ext >&5
5774
5775  ac_header_preproc=no
5776fi
5777
5778rm -f conftest.err conftest.$ac_ext
5779{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5780echo "${ECHO_T}$ac_header_preproc" >&6; }
5781
5782# So?  What about this header?
5783case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5784  yes:no: )
5785    { echo "$as_me:$LINENO: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&5
5786echo "$as_me: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5787    { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the compiler's result" >&5
5788echo "$as_me: WARNING: float.h: proceeding with the compiler's result" >&2;}
5789    ac_header_preproc=yes
5790    ;;
5791  no:yes:* )
5792    { echo "$as_me:$LINENO: WARNING: float.h: present but cannot be compiled" >&5
5793echo "$as_me: WARNING: float.h: present but cannot be compiled" >&2;}
5794    { echo "$as_me:$LINENO: WARNING: float.h:     check for missing prerequisite headers?" >&5
5795echo "$as_me: WARNING: float.h:     check for missing prerequisite headers?" >&2;}
5796    { echo "$as_me:$LINENO: WARNING: float.h: see the Autoconf documentation" >&5
5797echo "$as_me: WARNING: float.h: see the Autoconf documentation" >&2;}
5798    { echo "$as_me:$LINENO: WARNING: float.h:     section \"Present But Cannot Be Compiled\"" >&5
5799echo "$as_me: WARNING: float.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5800    { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the preprocessor's result" >&5
5801echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;}
5802    { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5
5803echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;}
5804
5805    ;;
5806esac
5807{ echo "$as_me:$LINENO: checking for float.h" >&5
5808echo $ECHO_N "checking for float.h... $ECHO_C" >&6; }
5809if test "${ac_cv_header_float_h+set}" = set; then
5810  echo $ECHO_N "(cached) $ECHO_C" >&6
5811else
5812  ac_cv_header_float_h=$ac_header_preproc
5813fi
5814{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
5815echo "${ECHO_T}$ac_cv_header_float_h" >&6; }
5816
5817fi
5818if test $ac_cv_header_float_h = yes; then
5819  :
5820else
5821
5822cat >>confdefs.h <<\_ACEOF
5823#define NO_FLOAT_H 1
5824_ACEOF
5825
5826fi
5827
5828
5829    if test "${ac_cv_header_values_h+set}" = set; then
5830  { echo "$as_me:$LINENO: checking for values.h" >&5
5831echo $ECHO_N "checking for values.h... $ECHO_C" >&6; }
5832if test "${ac_cv_header_values_h+set}" = set; then
5833  echo $ECHO_N "(cached) $ECHO_C" >&6
5834fi
5835{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
5836echo "${ECHO_T}$ac_cv_header_values_h" >&6; }
5837else
5838  # Is the header compilable?
5839{ echo "$as_me:$LINENO: checking values.h usability" >&5
5840echo $ECHO_N "checking values.h usability... $ECHO_C" >&6; }
5841cat >conftest.$ac_ext <<_ACEOF
5842/* confdefs.h.  */
5843_ACEOF
5844cat confdefs.h >>conftest.$ac_ext
5845cat >>conftest.$ac_ext <<_ACEOF
5846/* end confdefs.h.  */
5847$ac_includes_default
5848#include <values.h>
5849_ACEOF
5850rm -f conftest.$ac_objext
5851if { (ac_try="$ac_compile"
5852case "(($ac_try" in
5853  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5854  *) ac_try_echo=$ac_try;;
5855esac
5856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5857  (eval "$ac_compile") 2>conftest.er1
5858  ac_status=$?
5859  grep -v '^ *+' conftest.er1 >conftest.err
5860  rm -f conftest.er1
5861  cat conftest.err >&5
5862  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5863  (exit $ac_status); } && {
5864	 test -z "$ac_c_werror_flag" ||
5865	 test ! -s conftest.err
5866       } && test -s conftest.$ac_objext; then
5867  ac_header_compiler=yes
5868else
5869  echo "$as_me: failed program was:" >&5
5870sed 's/^/| /' conftest.$ac_ext >&5
5871
5872	ac_header_compiler=no
5873fi
5874
5875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5876{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5877echo "${ECHO_T}$ac_header_compiler" >&6; }
5878
5879# Is the header present?
5880{ echo "$as_me:$LINENO: checking values.h presence" >&5
5881echo $ECHO_N "checking values.h presence... $ECHO_C" >&6; }
5882cat >conftest.$ac_ext <<_ACEOF
5883/* confdefs.h.  */
5884_ACEOF
5885cat confdefs.h >>conftest.$ac_ext
5886cat >>conftest.$ac_ext <<_ACEOF
5887/* end confdefs.h.  */
5888#include <values.h>
5889_ACEOF
5890if { (ac_try="$ac_cpp conftest.$ac_ext"
5891case "(($ac_try" in
5892  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5893  *) ac_try_echo=$ac_try;;
5894esac
5895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5896  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5897  ac_status=$?
5898  grep -v '^ *+' conftest.er1 >conftest.err
5899  rm -f conftest.er1
5900  cat conftest.err >&5
5901  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5902  (exit $ac_status); } >/dev/null && {
5903	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5904	 test ! -s conftest.err
5905       }; then
5906  ac_header_preproc=yes
5907else
5908  echo "$as_me: failed program was:" >&5
5909sed 's/^/| /' conftest.$ac_ext >&5
5910
5911  ac_header_preproc=no
5912fi
5913
5914rm -f conftest.err conftest.$ac_ext
5915{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5916echo "${ECHO_T}$ac_header_preproc" >&6; }
5917
5918# So?  What about this header?
5919case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5920  yes:no: )
5921    { echo "$as_me:$LINENO: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&5
5922echo "$as_me: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5923    { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the compiler's result" >&5
5924echo "$as_me: WARNING: values.h: proceeding with the compiler's result" >&2;}
5925    ac_header_preproc=yes
5926    ;;
5927  no:yes:* )
5928    { echo "$as_me:$LINENO: WARNING: values.h: present but cannot be compiled" >&5
5929echo "$as_me: WARNING: values.h: present but cannot be compiled" >&2;}
5930    { echo "$as_me:$LINENO: WARNING: values.h:     check for missing prerequisite headers?" >&5
5931echo "$as_me: WARNING: values.h:     check for missing prerequisite headers?" >&2;}
5932    { echo "$as_me:$LINENO: WARNING: values.h: see the Autoconf documentation" >&5
5933echo "$as_me: WARNING: values.h: see the Autoconf documentation" >&2;}
5934    { echo "$as_me:$LINENO: WARNING: values.h:     section \"Present But Cannot Be Compiled\"" >&5
5935echo "$as_me: WARNING: values.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5936    { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the preprocessor's result" >&5
5937echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;}
5938    { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5
5939echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;}
5940
5941    ;;
5942esac
5943{ echo "$as_me:$LINENO: checking for values.h" >&5
5944echo $ECHO_N "checking for values.h... $ECHO_C" >&6; }
5945if test "${ac_cv_header_values_h+set}" = set; then
5946  echo $ECHO_N "(cached) $ECHO_C" >&6
5947else
5948  ac_cv_header_values_h=$ac_header_preproc
5949fi
5950{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
5951echo "${ECHO_T}$ac_cv_header_values_h" >&6; }
5952
5953fi
5954if test $ac_cv_header_values_h = yes; then
5955  :
5956else
5957
5958cat >>confdefs.h <<\_ACEOF
5959#define NO_VALUES_H 1
5960_ACEOF
5961
5962fi
5963
5964
5965    if test "${ac_cv_header_limits_h+set}" = set; then
5966  { echo "$as_me:$LINENO: checking for limits.h" >&5
5967echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; }
5968if test "${ac_cv_header_limits_h+set}" = set; then
5969  echo $ECHO_N "(cached) $ECHO_C" >&6
5970fi
5971{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
5972echo "${ECHO_T}$ac_cv_header_limits_h" >&6; }
5973else
5974  # Is the header compilable?
5975{ echo "$as_me:$LINENO: checking limits.h usability" >&5
5976echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6; }
5977cat >conftest.$ac_ext <<_ACEOF
5978/* confdefs.h.  */
5979_ACEOF
5980cat confdefs.h >>conftest.$ac_ext
5981cat >>conftest.$ac_ext <<_ACEOF
5982/* end confdefs.h.  */
5983$ac_includes_default
5984#include <limits.h>
5985_ACEOF
5986rm -f conftest.$ac_objext
5987if { (ac_try="$ac_compile"
5988case "(($ac_try" in
5989  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5990  *) ac_try_echo=$ac_try;;
5991esac
5992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5993  (eval "$ac_compile") 2>conftest.er1
5994  ac_status=$?
5995  grep -v '^ *+' conftest.er1 >conftest.err
5996  rm -f conftest.er1
5997  cat conftest.err >&5
5998  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5999  (exit $ac_status); } && {
6000	 test -z "$ac_c_werror_flag" ||
6001	 test ! -s conftest.err
6002       } && test -s conftest.$ac_objext; then
6003  ac_header_compiler=yes
6004else
6005  echo "$as_me: failed program was:" >&5
6006sed 's/^/| /' conftest.$ac_ext >&5
6007
6008	ac_header_compiler=no
6009fi
6010
6011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6012{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6013echo "${ECHO_T}$ac_header_compiler" >&6; }
6014
6015# Is the header present?
6016{ echo "$as_me:$LINENO: checking limits.h presence" >&5
6017echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6; }
6018cat >conftest.$ac_ext <<_ACEOF
6019/* confdefs.h.  */
6020_ACEOF
6021cat confdefs.h >>conftest.$ac_ext
6022cat >>conftest.$ac_ext <<_ACEOF
6023/* end confdefs.h.  */
6024#include <limits.h>
6025_ACEOF
6026if { (ac_try="$ac_cpp conftest.$ac_ext"
6027case "(($ac_try" in
6028  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6029  *) ac_try_echo=$ac_try;;
6030esac
6031eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6032  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6033  ac_status=$?
6034  grep -v '^ *+' conftest.er1 >conftest.err
6035  rm -f conftest.er1
6036  cat conftest.err >&5
6037  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6038  (exit $ac_status); } >/dev/null && {
6039	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6040	 test ! -s conftest.err
6041       }; then
6042  ac_header_preproc=yes
6043else
6044  echo "$as_me: failed program was:" >&5
6045sed 's/^/| /' conftest.$ac_ext >&5
6046
6047  ac_header_preproc=no
6048fi
6049
6050rm -f conftest.err conftest.$ac_ext
6051{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6052echo "${ECHO_T}$ac_header_preproc" >&6; }
6053
6054# So?  What about this header?
6055case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6056  yes:no: )
6057    { echo "$as_me:$LINENO: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&5
6058echo "$as_me: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6059    { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the compiler's result" >&5
6060echo "$as_me: WARNING: limits.h: proceeding with the compiler's result" >&2;}
6061    ac_header_preproc=yes
6062    ;;
6063  no:yes:* )
6064    { echo "$as_me:$LINENO: WARNING: limits.h: present but cannot be compiled" >&5
6065echo "$as_me: WARNING: limits.h: present but cannot be compiled" >&2;}
6066    { echo "$as_me:$LINENO: WARNING: limits.h:     check for missing prerequisite headers?" >&5
6067echo "$as_me: WARNING: limits.h:     check for missing prerequisite headers?" >&2;}
6068    { echo "$as_me:$LINENO: WARNING: limits.h: see the Autoconf documentation" >&5
6069echo "$as_me: WARNING: limits.h: see the Autoconf documentation" >&2;}
6070    { echo "$as_me:$LINENO: WARNING: limits.h:     section \"Present But Cannot Be Compiled\"" >&5
6071echo "$as_me: WARNING: limits.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6072    { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the preprocessor's result" >&5
6073echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;}
6074    { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5
6075echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;}
6076
6077    ;;
6078esac
6079{ echo "$as_me:$LINENO: checking for limits.h" >&5
6080echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; }
6081if test "${ac_cv_header_limits_h+set}" = set; then
6082  echo $ECHO_N "(cached) $ECHO_C" >&6
6083else
6084  ac_cv_header_limits_h=$ac_header_preproc
6085fi
6086{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
6087echo "${ECHO_T}$ac_cv_header_limits_h" >&6; }
6088
6089fi
6090if test $ac_cv_header_limits_h = yes; then
6091
6092cat >>confdefs.h <<\_ACEOF
6093#define HAVE_LIMITS_H 1
6094_ACEOF
6095
6096else
6097
6098cat >>confdefs.h <<\_ACEOF
6099#define NO_LIMITS_H 1
6100_ACEOF
6101
6102fi
6103
6104
6105    if test "${ac_cv_header_stdlib_h+set}" = set; then
6106  { echo "$as_me:$LINENO: checking for stdlib.h" >&5
6107echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; }
6108if test "${ac_cv_header_stdlib_h+set}" = set; then
6109  echo $ECHO_N "(cached) $ECHO_C" >&6
6110fi
6111{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
6112echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; }
6113else
6114  # Is the header compilable?
6115{ echo "$as_me:$LINENO: checking stdlib.h usability" >&5
6116echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6; }
6117cat >conftest.$ac_ext <<_ACEOF
6118/* confdefs.h.  */
6119_ACEOF
6120cat confdefs.h >>conftest.$ac_ext
6121cat >>conftest.$ac_ext <<_ACEOF
6122/* end confdefs.h.  */
6123$ac_includes_default
6124#include <stdlib.h>
6125_ACEOF
6126rm -f conftest.$ac_objext
6127if { (ac_try="$ac_compile"
6128case "(($ac_try" in
6129  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6130  *) ac_try_echo=$ac_try;;
6131esac
6132eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6133  (eval "$ac_compile") 2>conftest.er1
6134  ac_status=$?
6135  grep -v '^ *+' conftest.er1 >conftest.err
6136  rm -f conftest.er1
6137  cat conftest.err >&5
6138  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6139  (exit $ac_status); } && {
6140	 test -z "$ac_c_werror_flag" ||
6141	 test ! -s conftest.err
6142       } && test -s conftest.$ac_objext; then
6143  ac_header_compiler=yes
6144else
6145  echo "$as_me: failed program was:" >&5
6146sed 's/^/| /' conftest.$ac_ext >&5
6147
6148	ac_header_compiler=no
6149fi
6150
6151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6152{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6153echo "${ECHO_T}$ac_header_compiler" >&6; }
6154
6155# Is the header present?
6156{ echo "$as_me:$LINENO: checking stdlib.h presence" >&5
6157echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6; }
6158cat >conftest.$ac_ext <<_ACEOF
6159/* confdefs.h.  */
6160_ACEOF
6161cat confdefs.h >>conftest.$ac_ext
6162cat >>conftest.$ac_ext <<_ACEOF
6163/* end confdefs.h.  */
6164#include <stdlib.h>
6165_ACEOF
6166if { (ac_try="$ac_cpp conftest.$ac_ext"
6167case "(($ac_try" in
6168  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6169  *) ac_try_echo=$ac_try;;
6170esac
6171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6172  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6173  ac_status=$?
6174  grep -v '^ *+' conftest.er1 >conftest.err
6175  rm -f conftest.er1
6176  cat conftest.err >&5
6177  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6178  (exit $ac_status); } >/dev/null && {
6179	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6180	 test ! -s conftest.err
6181       }; then
6182  ac_header_preproc=yes
6183else
6184  echo "$as_me: failed program was:" >&5
6185sed 's/^/| /' conftest.$ac_ext >&5
6186
6187  ac_header_preproc=no
6188fi
6189
6190rm -f conftest.err conftest.$ac_ext
6191{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6192echo "${ECHO_T}$ac_header_preproc" >&6; }
6193
6194# So?  What about this header?
6195case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6196  yes:no: )
6197    { echo "$as_me:$LINENO: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
6198echo "$as_me: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6199    { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the compiler's result" >&5
6200echo "$as_me: WARNING: stdlib.h: proceeding with the compiler's result" >&2;}
6201    ac_header_preproc=yes
6202    ;;
6203  no:yes:* )
6204    { echo "$as_me:$LINENO: WARNING: stdlib.h: present but cannot be compiled" >&5
6205echo "$as_me: WARNING: stdlib.h: present but cannot be compiled" >&2;}
6206    { echo "$as_me:$LINENO: WARNING: stdlib.h:     check for missing prerequisite headers?" >&5
6207echo "$as_me: WARNING: stdlib.h:     check for missing prerequisite headers?" >&2;}
6208    { echo "$as_me:$LINENO: WARNING: stdlib.h: see the Autoconf documentation" >&5
6209echo "$as_me: WARNING: stdlib.h: see the Autoconf documentation" >&2;}
6210    { echo "$as_me:$LINENO: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&5
6211echo "$as_me: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6212    { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the preprocessor's result" >&5
6213echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;}
6214    { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5
6215echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;}
6216
6217    ;;
6218esac
6219{ echo "$as_me:$LINENO: checking for stdlib.h" >&5
6220echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; }
6221if test "${ac_cv_header_stdlib_h+set}" = set; then
6222  echo $ECHO_N "(cached) $ECHO_C" >&6
6223else
6224  ac_cv_header_stdlib_h=$ac_header_preproc
6225fi
6226{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
6227echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; }
6228
6229fi
6230if test $ac_cv_header_stdlib_h = yes; then
6231  tcl_ok=1
6232else
6233  tcl_ok=0
6234fi
6235
6236
6237    cat >conftest.$ac_ext <<_ACEOF
6238/* confdefs.h.  */
6239_ACEOF
6240cat confdefs.h >>conftest.$ac_ext
6241cat >>conftest.$ac_ext <<_ACEOF
6242/* end confdefs.h.  */
6243#include <stdlib.h>
6244
6245_ACEOF
6246if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6247  $EGREP "strtol" >/dev/null 2>&1; then
6248  :
6249else
6250  tcl_ok=0
6251fi
6252rm -f -r conftest*
6253
6254    cat >conftest.$ac_ext <<_ACEOF
6255/* confdefs.h.  */
6256_ACEOF
6257cat confdefs.h >>conftest.$ac_ext
6258cat >>conftest.$ac_ext <<_ACEOF
6259/* end confdefs.h.  */
6260#include <stdlib.h>
6261
6262_ACEOF
6263if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6264  $EGREP "strtoul" >/dev/null 2>&1; then
6265  :
6266else
6267  tcl_ok=0
6268fi
6269rm -f -r conftest*
6270
6271    cat >conftest.$ac_ext <<_ACEOF
6272/* confdefs.h.  */
6273_ACEOF
6274cat confdefs.h >>conftest.$ac_ext
6275cat >>conftest.$ac_ext <<_ACEOF
6276/* end confdefs.h.  */
6277#include <stdlib.h>
6278
6279_ACEOF
6280if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6281  $EGREP "strtod" >/dev/null 2>&1; then
6282  :
6283else
6284  tcl_ok=0
6285fi
6286rm -f -r conftest*
6287
6288    if test $tcl_ok = 0; then
6289
6290cat >>confdefs.h <<\_ACEOF
6291#define NO_STDLIB_H 1
6292_ACEOF
6293
6294    fi
6295    if test "${ac_cv_header_string_h+set}" = set; then
6296  { echo "$as_me:$LINENO: checking for string.h" >&5
6297echo $ECHO_N "checking for string.h... $ECHO_C" >&6; }
6298if test "${ac_cv_header_string_h+set}" = set; then
6299  echo $ECHO_N "(cached) $ECHO_C" >&6
6300fi
6301{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
6302echo "${ECHO_T}$ac_cv_header_string_h" >&6; }
6303else
6304  # Is the header compilable?
6305{ echo "$as_me:$LINENO: checking string.h usability" >&5
6306echo $ECHO_N "checking string.h usability... $ECHO_C" >&6; }
6307cat >conftest.$ac_ext <<_ACEOF
6308/* confdefs.h.  */
6309_ACEOF
6310cat confdefs.h >>conftest.$ac_ext
6311cat >>conftest.$ac_ext <<_ACEOF
6312/* end confdefs.h.  */
6313$ac_includes_default
6314#include <string.h>
6315_ACEOF
6316rm -f conftest.$ac_objext
6317if { (ac_try="$ac_compile"
6318case "(($ac_try" in
6319  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6320  *) ac_try_echo=$ac_try;;
6321esac
6322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6323  (eval "$ac_compile") 2>conftest.er1
6324  ac_status=$?
6325  grep -v '^ *+' conftest.er1 >conftest.err
6326  rm -f conftest.er1
6327  cat conftest.err >&5
6328  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6329  (exit $ac_status); } && {
6330	 test -z "$ac_c_werror_flag" ||
6331	 test ! -s conftest.err
6332       } && test -s conftest.$ac_objext; then
6333  ac_header_compiler=yes
6334else
6335  echo "$as_me: failed program was:" >&5
6336sed 's/^/| /' conftest.$ac_ext >&5
6337
6338	ac_header_compiler=no
6339fi
6340
6341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6342{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6343echo "${ECHO_T}$ac_header_compiler" >&6; }
6344
6345# Is the header present?
6346{ echo "$as_me:$LINENO: checking string.h presence" >&5
6347echo $ECHO_N "checking string.h presence... $ECHO_C" >&6; }
6348cat >conftest.$ac_ext <<_ACEOF
6349/* confdefs.h.  */
6350_ACEOF
6351cat confdefs.h >>conftest.$ac_ext
6352cat >>conftest.$ac_ext <<_ACEOF
6353/* end confdefs.h.  */
6354#include <string.h>
6355_ACEOF
6356if { (ac_try="$ac_cpp conftest.$ac_ext"
6357case "(($ac_try" in
6358  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6359  *) ac_try_echo=$ac_try;;
6360esac
6361eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6362  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6363  ac_status=$?
6364  grep -v '^ *+' conftest.er1 >conftest.err
6365  rm -f conftest.er1
6366  cat conftest.err >&5
6367  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6368  (exit $ac_status); } >/dev/null && {
6369	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6370	 test ! -s conftest.err
6371       }; then
6372  ac_header_preproc=yes
6373else
6374  echo "$as_me: failed program was:" >&5
6375sed 's/^/| /' conftest.$ac_ext >&5
6376
6377  ac_header_preproc=no
6378fi
6379
6380rm -f conftest.err conftest.$ac_ext
6381{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6382echo "${ECHO_T}$ac_header_preproc" >&6; }
6383
6384# So?  What about this header?
6385case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6386  yes:no: )
6387    { echo "$as_me:$LINENO: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&5
6388echo "$as_me: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6389    { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the compiler's result" >&5
6390echo "$as_me: WARNING: string.h: proceeding with the compiler's result" >&2;}
6391    ac_header_preproc=yes
6392    ;;
6393  no:yes:* )
6394    { echo "$as_me:$LINENO: WARNING: string.h: present but cannot be compiled" >&5
6395echo "$as_me: WARNING: string.h: present but cannot be compiled" >&2;}
6396    { echo "$as_me:$LINENO: WARNING: string.h:     check for missing prerequisite headers?" >&5
6397echo "$as_me: WARNING: string.h:     check for missing prerequisite headers?" >&2;}
6398    { echo "$as_me:$LINENO: WARNING: string.h: see the Autoconf documentation" >&5
6399echo "$as_me: WARNING: string.h: see the Autoconf documentation" >&2;}
6400    { echo "$as_me:$LINENO: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&5
6401echo "$as_me: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6402    { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the preprocessor's result" >&5
6403echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;}
6404    { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5
6405echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;}
6406
6407    ;;
6408esac
6409{ echo "$as_me:$LINENO: checking for string.h" >&5
6410echo $ECHO_N "checking for string.h... $ECHO_C" >&6; }
6411if test "${ac_cv_header_string_h+set}" = set; then
6412  echo $ECHO_N "(cached) $ECHO_C" >&6
6413else
6414  ac_cv_header_string_h=$ac_header_preproc
6415fi
6416{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
6417echo "${ECHO_T}$ac_cv_header_string_h" >&6; }
6418
6419fi
6420if test $ac_cv_header_string_h = yes; then
6421  tcl_ok=1
6422else
6423  tcl_ok=0
6424fi
6425
6426
6427    cat >conftest.$ac_ext <<_ACEOF
6428/* confdefs.h.  */
6429_ACEOF
6430cat confdefs.h >>conftest.$ac_ext
6431cat >>conftest.$ac_ext <<_ACEOF
6432/* end confdefs.h.  */
6433#include <string.h>
6434
6435_ACEOF
6436if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6437  $EGREP "strstr" >/dev/null 2>&1; then
6438  :
6439else
6440  tcl_ok=0
6441fi
6442rm -f -r conftest*
6443
6444    cat >conftest.$ac_ext <<_ACEOF
6445/* confdefs.h.  */
6446_ACEOF
6447cat confdefs.h >>conftest.$ac_ext
6448cat >>conftest.$ac_ext <<_ACEOF
6449/* end confdefs.h.  */
6450#include <string.h>
6451
6452_ACEOF
6453if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6454  $EGREP "strerror" >/dev/null 2>&1; then
6455  :
6456else
6457  tcl_ok=0
6458fi
6459rm -f -r conftest*
6460
6461
6462    # See also memmove check below for a place where NO_STRING_H can be
6463    # set and why.
6464
6465    if test $tcl_ok = 0; then
6466
6467cat >>confdefs.h <<\_ACEOF
6468#define NO_STRING_H 1
6469_ACEOF
6470
6471    fi
6472
6473    if test "${ac_cv_header_sys_wait_h+set}" = set; then
6474  { echo "$as_me:$LINENO: checking for sys/wait.h" >&5
6475echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; }
6476if test "${ac_cv_header_sys_wait_h+set}" = set; then
6477  echo $ECHO_N "(cached) $ECHO_C" >&6
6478fi
6479{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
6480echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
6481else
6482  # Is the header compilable?
6483{ echo "$as_me:$LINENO: checking sys/wait.h usability" >&5
6484echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6; }
6485cat >conftest.$ac_ext <<_ACEOF
6486/* confdefs.h.  */
6487_ACEOF
6488cat confdefs.h >>conftest.$ac_ext
6489cat >>conftest.$ac_ext <<_ACEOF
6490/* end confdefs.h.  */
6491$ac_includes_default
6492#include <sys/wait.h>
6493_ACEOF
6494rm -f conftest.$ac_objext
6495if { (ac_try="$ac_compile"
6496case "(($ac_try" in
6497  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6498  *) ac_try_echo=$ac_try;;
6499esac
6500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6501  (eval "$ac_compile") 2>conftest.er1
6502  ac_status=$?
6503  grep -v '^ *+' conftest.er1 >conftest.err
6504  rm -f conftest.er1
6505  cat conftest.err >&5
6506  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6507  (exit $ac_status); } && {
6508	 test -z "$ac_c_werror_flag" ||
6509	 test ! -s conftest.err
6510       } && test -s conftest.$ac_objext; then
6511  ac_header_compiler=yes
6512else
6513  echo "$as_me: failed program was:" >&5
6514sed 's/^/| /' conftest.$ac_ext >&5
6515
6516	ac_header_compiler=no
6517fi
6518
6519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6520{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6521echo "${ECHO_T}$ac_header_compiler" >&6; }
6522
6523# Is the header present?
6524{ echo "$as_me:$LINENO: checking sys/wait.h presence" >&5
6525echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6; }
6526cat >conftest.$ac_ext <<_ACEOF
6527/* confdefs.h.  */
6528_ACEOF
6529cat confdefs.h >>conftest.$ac_ext
6530cat >>conftest.$ac_ext <<_ACEOF
6531/* end confdefs.h.  */
6532#include <sys/wait.h>
6533_ACEOF
6534if { (ac_try="$ac_cpp conftest.$ac_ext"
6535case "(($ac_try" in
6536  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6537  *) ac_try_echo=$ac_try;;
6538esac
6539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6540  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6541  ac_status=$?
6542  grep -v '^ *+' conftest.er1 >conftest.err
6543  rm -f conftest.er1
6544  cat conftest.err >&5
6545  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6546  (exit $ac_status); } >/dev/null && {
6547	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6548	 test ! -s conftest.err
6549       }; then
6550  ac_header_preproc=yes
6551else
6552  echo "$as_me: failed program was:" >&5
6553sed 's/^/| /' conftest.$ac_ext >&5
6554
6555  ac_header_preproc=no
6556fi
6557
6558rm -f conftest.err conftest.$ac_ext
6559{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6560echo "${ECHO_T}$ac_header_preproc" >&6; }
6561
6562# So?  What about this header?
6563case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6564  yes:no: )
6565    { echo "$as_me:$LINENO: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&5
6566echo "$as_me: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6567    { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the compiler's result" >&5
6568echo "$as_me: WARNING: sys/wait.h: proceeding with the compiler's result" >&2;}
6569    ac_header_preproc=yes
6570    ;;
6571  no:yes:* )
6572    { echo "$as_me:$LINENO: WARNING: sys/wait.h: present but cannot be compiled" >&5
6573echo "$as_me: WARNING: sys/wait.h: present but cannot be compiled" >&2;}
6574    { echo "$as_me:$LINENO: WARNING: sys/wait.h:     check for missing prerequisite headers?" >&5
6575echo "$as_me: WARNING: sys/wait.h:     check for missing prerequisite headers?" >&2;}
6576    { echo "$as_me:$LINENO: WARNING: sys/wait.h: see the Autoconf documentation" >&5
6577echo "$as_me: WARNING: sys/wait.h: see the Autoconf documentation" >&2;}
6578    { echo "$as_me:$LINENO: WARNING: sys/wait.h:     section \"Present But Cannot Be Compiled\"" >&5
6579echo "$as_me: WARNING: sys/wait.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6580    { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&5
6581echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;}
6582    { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5
6583echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;}
6584
6585    ;;
6586esac
6587{ echo "$as_me:$LINENO: checking for sys/wait.h" >&5
6588echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; }
6589if test "${ac_cv_header_sys_wait_h+set}" = set; then
6590  echo $ECHO_N "(cached) $ECHO_C" >&6
6591else
6592  ac_cv_header_sys_wait_h=$ac_header_preproc
6593fi
6594{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
6595echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
6596
6597fi
6598if test $ac_cv_header_sys_wait_h = yes; then
6599  :
6600else
6601
6602cat >>confdefs.h <<\_ACEOF
6603#define NO_SYS_WAIT_H 1
6604_ACEOF
6605
6606fi
6607
6608
6609    if test "${ac_cv_header_dlfcn_h+set}" = set; then
6610  { echo "$as_me:$LINENO: checking for dlfcn.h" >&5
6611echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; }
6612if test "${ac_cv_header_dlfcn_h+set}" = set; then
6613  echo $ECHO_N "(cached) $ECHO_C" >&6
6614fi
6615{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
6616echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; }
6617else
6618  # Is the header compilable?
6619{ echo "$as_me:$LINENO: checking dlfcn.h usability" >&5
6620echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6; }
6621cat >conftest.$ac_ext <<_ACEOF
6622/* confdefs.h.  */
6623_ACEOF
6624cat confdefs.h >>conftest.$ac_ext
6625cat >>conftest.$ac_ext <<_ACEOF
6626/* end confdefs.h.  */
6627$ac_includes_default
6628#include <dlfcn.h>
6629_ACEOF
6630rm -f conftest.$ac_objext
6631if { (ac_try="$ac_compile"
6632case "(($ac_try" in
6633  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6634  *) ac_try_echo=$ac_try;;
6635esac
6636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6637  (eval "$ac_compile") 2>conftest.er1
6638  ac_status=$?
6639  grep -v '^ *+' conftest.er1 >conftest.err
6640  rm -f conftest.er1
6641  cat conftest.err >&5
6642  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6643  (exit $ac_status); } && {
6644	 test -z "$ac_c_werror_flag" ||
6645	 test ! -s conftest.err
6646       } && test -s conftest.$ac_objext; then
6647  ac_header_compiler=yes
6648else
6649  echo "$as_me: failed program was:" >&5
6650sed 's/^/| /' conftest.$ac_ext >&5
6651
6652	ac_header_compiler=no
6653fi
6654
6655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6656{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6657echo "${ECHO_T}$ac_header_compiler" >&6; }
6658
6659# Is the header present?
6660{ echo "$as_me:$LINENO: checking dlfcn.h presence" >&5
6661echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6; }
6662cat >conftest.$ac_ext <<_ACEOF
6663/* confdefs.h.  */
6664_ACEOF
6665cat confdefs.h >>conftest.$ac_ext
6666cat >>conftest.$ac_ext <<_ACEOF
6667/* end confdefs.h.  */
6668#include <dlfcn.h>
6669_ACEOF
6670if { (ac_try="$ac_cpp conftest.$ac_ext"
6671case "(($ac_try" in
6672  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6673  *) ac_try_echo=$ac_try;;
6674esac
6675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6676  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6677  ac_status=$?
6678  grep -v '^ *+' conftest.er1 >conftest.err
6679  rm -f conftest.er1
6680  cat conftest.err >&5
6681  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6682  (exit $ac_status); } >/dev/null && {
6683	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6684	 test ! -s conftest.err
6685       }; then
6686  ac_header_preproc=yes
6687else
6688  echo "$as_me: failed program was:" >&5
6689sed 's/^/| /' conftest.$ac_ext >&5
6690
6691  ac_header_preproc=no
6692fi
6693
6694rm -f conftest.err conftest.$ac_ext
6695{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6696echo "${ECHO_T}$ac_header_preproc" >&6; }
6697
6698# So?  What about this header?
6699case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6700  yes:no: )
6701    { echo "$as_me:$LINENO: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&5
6702echo "$as_me: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6703    { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the compiler's result" >&5
6704echo "$as_me: WARNING: dlfcn.h: proceeding with the compiler's result" >&2;}
6705    ac_header_preproc=yes
6706    ;;
6707  no:yes:* )
6708    { echo "$as_me:$LINENO: WARNING: dlfcn.h: present but cannot be compiled" >&5
6709echo "$as_me: WARNING: dlfcn.h: present but cannot be compiled" >&2;}
6710    { echo "$as_me:$LINENO: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&5
6711echo "$as_me: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&2;}
6712    { echo "$as_me:$LINENO: WARNING: dlfcn.h: see the Autoconf documentation" >&5
6713echo "$as_me: WARNING: dlfcn.h: see the Autoconf documentation" >&2;}
6714    { echo "$as_me:$LINENO: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&5
6715echo "$as_me: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6716    { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5
6717echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;}
6718    { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5
6719echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;}
6720
6721    ;;
6722esac
6723{ echo "$as_me:$LINENO: checking for dlfcn.h" >&5
6724echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; }
6725if test "${ac_cv_header_dlfcn_h+set}" = set; then
6726  echo $ECHO_N "(cached) $ECHO_C" >&6
6727else
6728  ac_cv_header_dlfcn_h=$ac_header_preproc
6729fi
6730{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
6731echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; }
6732
6733fi
6734if test $ac_cv_header_dlfcn_h = yes; then
6735  :
6736else
6737
6738cat >>confdefs.h <<\_ACEOF
6739#define NO_DLFCN_H 1
6740_ACEOF
6741
6742fi
6743
6744
6745
6746    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
6747
6748for ac_header in sys/param.h
6749do
6750as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6751if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6752  { echo "$as_me:$LINENO: checking for $ac_header" >&5
6753echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6754if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6755  echo $ECHO_N "(cached) $ECHO_C" >&6
6756fi
6757ac_res=`eval echo '${'$as_ac_Header'}'`
6758	       { echo "$as_me:$LINENO: result: $ac_res" >&5
6759echo "${ECHO_T}$ac_res" >&6; }
6760else
6761  # Is the header compilable?
6762{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6763echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
6764cat >conftest.$ac_ext <<_ACEOF
6765/* confdefs.h.  */
6766_ACEOF
6767cat confdefs.h >>conftest.$ac_ext
6768cat >>conftest.$ac_ext <<_ACEOF
6769/* end confdefs.h.  */
6770$ac_includes_default
6771#include <$ac_header>
6772_ACEOF
6773rm -f conftest.$ac_objext
6774if { (ac_try="$ac_compile"
6775case "(($ac_try" in
6776  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6777  *) ac_try_echo=$ac_try;;
6778esac
6779eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6780  (eval "$ac_compile") 2>conftest.er1
6781  ac_status=$?
6782  grep -v '^ *+' conftest.er1 >conftest.err
6783  rm -f conftest.er1
6784  cat conftest.err >&5
6785  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6786  (exit $ac_status); } && {
6787	 test -z "$ac_c_werror_flag" ||
6788	 test ! -s conftest.err
6789       } && test -s conftest.$ac_objext; then
6790  ac_header_compiler=yes
6791else
6792  echo "$as_me: failed program was:" >&5
6793sed 's/^/| /' conftest.$ac_ext >&5
6794
6795	ac_header_compiler=no
6796fi
6797
6798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6799{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6800echo "${ECHO_T}$ac_header_compiler" >&6; }
6801
6802# Is the header present?
6803{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6804echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
6805cat >conftest.$ac_ext <<_ACEOF
6806/* confdefs.h.  */
6807_ACEOF
6808cat confdefs.h >>conftest.$ac_ext
6809cat >>conftest.$ac_ext <<_ACEOF
6810/* end confdefs.h.  */
6811#include <$ac_header>
6812_ACEOF
6813if { (ac_try="$ac_cpp conftest.$ac_ext"
6814case "(($ac_try" in
6815  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6816  *) ac_try_echo=$ac_try;;
6817esac
6818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6819  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6820  ac_status=$?
6821  grep -v '^ *+' conftest.er1 >conftest.err
6822  rm -f conftest.er1
6823  cat conftest.err >&5
6824  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6825  (exit $ac_status); } >/dev/null && {
6826	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6827	 test ! -s conftest.err
6828       }; then
6829  ac_header_preproc=yes
6830else
6831  echo "$as_me: failed program was:" >&5
6832sed 's/^/| /' conftest.$ac_ext >&5
6833
6834  ac_header_preproc=no
6835fi
6836
6837rm -f conftest.err conftest.$ac_ext
6838{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6839echo "${ECHO_T}$ac_header_preproc" >&6; }
6840
6841# So?  What about this header?
6842case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6843  yes:no: )
6844    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6845echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6846    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6847echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6848    ac_header_preproc=yes
6849    ;;
6850  no:yes:* )
6851    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6852echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6853    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
6854echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
6855    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6856echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6857    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
6858echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
6859    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6860echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6861    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6862echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6863
6864    ;;
6865esac
6866{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6867echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6868if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6869  echo $ECHO_N "(cached) $ECHO_C" >&6
6870else
6871  eval "$as_ac_Header=\$ac_header_preproc"
6872fi
6873ac_res=`eval echo '${'$as_ac_Header'}'`
6874	       { echo "$as_me:$LINENO: result: $ac_res" >&5
6875echo "${ECHO_T}$ac_res" >&6; }
6876
6877fi
6878if test `eval echo '${'$as_ac_Header'}'` = yes; then
6879  cat >>confdefs.h <<_ACEOF
6880#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6881_ACEOF
6882
6883fi
6884
6885done
6886
6887
6888	# Let the user call this, because if it triggers, they will
6889	# need a compat/strtod.c that is correct.  Users can also
6890	# use Tcl_GetDouble(FromObj) instead.
6891	#TEA_BUGGY_STRTOD
6892    fi
6893
6894
6895
6896    #
6897    # Ok, lets find the tkimg configuration
6898    # First, look for one uninstalled.
6899    # the alternative search directory is invoked by --with-tkimg
6900    #
6901
6902    if test x"${no_tkimg}" = x ; then
6903	# we reset no_tkimg in case something fails here
6904	no_tkimg=true
6905
6906# Check whether --with-tkimg was given.
6907if test "${with_tkimg+set}" = set; then
6908  withval=$with_tkimg; with_tkimgconfig=${withval}
6909fi
6910
6911	{ echo "$as_me:$LINENO: checking for tkimg configuration" >&5
6912echo $ECHO_N "checking for tkimg configuration... $ECHO_C" >&6; }
6913	if test "${ac_cv_c_tkimgconfig+set}" = set; then
6914  echo $ECHO_N "(cached) $ECHO_C" >&6
6915else
6916
6917
6918	    # First check to see if --with-tkimg was specified.
6919	    if test x"${with_tkimgconfig}" != x ; then
6920		case ${with_tkimgconfig} in
6921		    */tkimgConfig.sh )
6922			if test -f ${with_tkimgconfig}; then
6923			    { echo "$as_me:$LINENO: WARNING: --with-tkimg argument should refer to directory containing tkimgConfig.sh, not to tkimgConfig.sh itself" >&5
6924echo "$as_me: WARNING: --with-tkimg argument should refer to directory containing tkimgConfig.sh, not to tkimgConfig.sh itself" >&2;}
6925			    with_tkimgconfig=`echo ${with_tkimgconfig} | sed 's!/tkimgConfig\.sh$!!'`
6926			fi;;
6927		esac
6928		if test -f "${with_tkimgconfig}/tkimgConfig.sh" ; then
6929		    ac_cv_c_tkimgconfig=`(cd ${with_tkimgconfig}; pwd)`
6930		else
6931		    { { echo "$as_me:$LINENO: error: ${with_tkimgconfig} directory doesn't contain tkimgConfig.sh" >&5
6932echo "$as_me: error: ${with_tkimgconfig} directory doesn't contain tkimgConfig.sh" >&2;}
6933   { (exit 1); exit 1; }; }
6934		fi
6935	    fi
6936
6937	    # then check for a private tkimg installation
6938	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
6939		for i in \
6940			../tkimg \
6941			`ls -dr ../tkimg*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
6942			`ls -dr ../tkimg*[0-9].[0-9][0-9] 2>/dev/null` \
6943			`ls -dr ../tkimg*[0-9].[0-9] 2>/dev/null` \
6944			`ls -dr ../tkimg*[0-9].[0-9]* 2>/dev/null` \
6945			../../tkimg \
6946			`ls -dr ../../tkimg*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
6947			`ls -dr ../../tkimg*[0-9].[0-9][0-9] 2>/dev/null` \
6948			`ls -dr ../../tkimg*[0-9].[0-9] 2>/dev/null` \
6949			`ls -dr ../../tkimg*[0-9].[0-9]* 2>/dev/null` \
6950			../../../tkimg \
6951			`ls -dr ../../../tkimg*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
6952			`ls -dr ../../../tkimg*[0-9].[0-9][0-9] 2>/dev/null` \
6953			`ls -dr ../../../tkimg*[0-9].[0-9] 2>/dev/null` \
6954			`ls -dr ../../../tkimg*[0-9].[0-9]* 2>/dev/null` \
6955			${srcdir}/../tkimg \
6956			`ls -dr ${srcdir}/../tkimg*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
6957			`ls -dr ${srcdir}/../tkimg*[0-9].[0-9][0-9] 2>/dev/null` \
6958			`ls -dr ${srcdir}/../tkimg*[0-9].[0-9] 2>/dev/null` \
6959			`ls -dr ${srcdir}/../tkimg*[0-9].[0-9]* 2>/dev/null` \
6960			; do
6961		    if test -f "$i/tkimgConfig.sh" ; then
6962			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
6963			break
6964		    fi
6965		    if test -f "$i/unix/tkimgConfig.sh" ; then
6966			ac_cv_c_tkimgconfig=`(cd $i/unix; pwd)`
6967			break
6968		    fi
6969		done
6970	    fi
6971
6972	    # check in a few common install locations
6973	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
6974		for i in `ls -d ${libdir} 2>/dev/null` \
6975			`ls -d ${exec_prefix}/lib 2>/dev/null` \
6976			`ls -d ${prefix}/lib 2>/dev/null` \
6977			`ls -d /usr/local/lib 2>/dev/null` \
6978			`ls -d /usr/contrib/lib 2>/dev/null` \
6979			`ls -d /usr/lib 2>/dev/null` \
6980			`ls -d /usr/lib64 2>/dev/null` \
6981			; do
6982		    if test -f "$i/tkimgConfig.sh" ; then
6983			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
6984			break
6985		    fi
6986		done
6987	    fi
6988
6989fi
6990
6991
6992	if test x"${ac_cv_c_tkimgconfig}" = x ; then
6993	    tkimg_BIN_DIR="# no tkimg configs found"
6994	    { echo "$as_me:$LINENO: WARNING: Cannot find tkimg configuration definitions" >&5
6995echo "$as_me: WARNING: Cannot find tkimg configuration definitions" >&2;}
6996	    exit 0
6997	else
6998	    no_tkimg=
6999	    tkimg_BIN_DIR=${ac_cv_c_tkimgconfig}
7000	    { echo "$as_me:$LINENO: result: found $tkimg_BIN_DIR/tkimgConfig.sh" >&5
7001echo "${ECHO_T}found $tkimg_BIN_DIR/tkimgConfig.sh" >&6; }
7002	fi
7003    fi
7004
7005
7006    { echo "$as_me:$LINENO: checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh" >&5
7007echo $ECHO_N "checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh... $ECHO_C" >&6; }
7008
7009    if test -f "${tkimg_BIN_DIR}/tkimgConfig.sh" ; then
7010        { echo "$as_me:$LINENO: result: loading" >&5
7011echo "${ECHO_T}loading" >&6; }
7012	. "${tkimg_BIN_DIR}/tkimgConfig.sh"
7013    else
7014        { echo "$as_me:$LINENO: result: file not found" >&5
7015echo "${ECHO_T}file not found" >&6; }
7016    fi
7017
7018    #
7019    # If the tkimg_BIN_DIR is the build directory (not the install directory),
7020    # then set the common variable name to the value of the build variables.
7021    # For example, the variable tkimg_LIB_SPEC will be set to the value
7022    # of tkimg_BUILD_LIB_SPEC. An extension should make use of tkimg_LIB_SPEC
7023    # instead of tkimg_BUILD_LIB_SPEC since it will work with both an
7024    # installed and uninstalled version of Tcl.
7025    #
7026
7027    if test -f "${tkimg_BIN_DIR}/Makefile" ; then
7028	{ echo "$as_me:$LINENO: WARNING: Found Makefile - using build library specs for tkimg" >&5
7029echo "$as_me: WARNING: Found Makefile - using build library specs for tkimg" >&2;}
7030        tkimg_LIB_SPEC=${tkimg_BUILD_LIB_SPEC}
7031        tkimg_STUB_LIB_SPEC=${tkimg_BUILD_STUB_LIB_SPEC}
7032        tkimg_STUB_LIB_PATH=${tkimg_BUILD_STUB_LIB_PATH}
7033    fi
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046    # Allow the caller to prevent this auto-check by specifying any 2nd arg
7047    if test "x" = x; then
7048
7049	# Check both upper and lower-case variants
7050	# If a dev wanted non-stubs libs, this function could take an option
7051	# to not use _STUB in the paths below
7052	if test "x${tkimg_STUB_LIB_SPEC}" = x; then
7053
7054    { echo "$as_me:$LINENO: checking For TKIMG_STUB library for LIBS" >&5
7055echo $ECHO_N "checking For TKIMG_STUB library for LIBS... $ECHO_C" >&6; }
7056    # This simplifies the use of stub libraries by automatically adding
7057    # the stub lib to your path.  Normally this would add to SHLIB_LD_LIBS,
7058    # but this is called before CONFIG_CFLAGS.  More importantly, this adds
7059    # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD.
7060    if test "x${TKIMG_STUB_LIB_SPEC}" != "x" ; then
7061	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
7062
7063    vars="\"`${CYGPATH} ${TKIMG_STUB_LIB_PATH}`\""
7064    for i in $vars; do
7065	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
7066	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
7067	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
7068	fi
7069	PKG_LIBS="$PKG_LIBS $i"
7070    done
7071
7072
7073	    { echo "$as_me:$LINENO: result: using TKIMG_STUB_LIB_PATH ${TKIMG_STUB_LIB_PATH}" >&5
7074echo "${ECHO_T}using TKIMG_STUB_LIB_PATH ${TKIMG_STUB_LIB_PATH}" >&6; }
7075	else
7076
7077    vars="${TKIMG_STUB_LIB_SPEC}"
7078    for i in $vars; do
7079	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
7080	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
7081	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
7082	fi
7083	PKG_LIBS="$PKG_LIBS $i"
7084    done
7085
7086
7087	    { echo "$as_me:$LINENO: result: using TKIMG_STUB_LIB_SPEC ${TKIMG_STUB_LIB_SPEC}" >&5
7088echo "${ECHO_T}using TKIMG_STUB_LIB_SPEC ${TKIMG_STUB_LIB_SPEC}" >&6; }
7089	fi
7090    else
7091	{ echo "$as_me:$LINENO: result: file not found" >&5
7092echo "${ECHO_T}file not found" >&6; }
7093    fi
7094
7095else
7096
7097    { echo "$as_me:$LINENO: checking For tkimg_STUB library for LIBS" >&5
7098echo $ECHO_N "checking For tkimg_STUB library for LIBS... $ECHO_C" >&6; }
7099    # This simplifies the use of stub libraries by automatically adding
7100    # the stub lib to your path.  Normally this would add to SHLIB_LD_LIBS,
7101    # but this is called before CONFIG_CFLAGS.  More importantly, this adds
7102    # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD.
7103    if test "x${tkimg_STUB_LIB_SPEC}" != "x" ; then
7104	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
7105
7106    vars="\"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
7107    for i in $vars; do
7108	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
7109	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
7110	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
7111	fi
7112	PKG_LIBS="$PKG_LIBS $i"
7113    done
7114
7115
7116	    { echo "$as_me:$LINENO: result: using tkimg_STUB_LIB_PATH ${tkimg_STUB_LIB_PATH}" >&5
7117echo "${ECHO_T}using tkimg_STUB_LIB_PATH ${tkimg_STUB_LIB_PATH}" >&6; }
7118	else
7119
7120    vars="${tkimg_STUB_LIB_SPEC}"
7121    for i in $vars; do
7122	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
7123	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
7124	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
7125	fi
7126	PKG_LIBS="$PKG_LIBS $i"
7127    done
7128
7129
7130	    { echo "$as_me:$LINENO: result: using tkimg_STUB_LIB_SPEC ${tkimg_STUB_LIB_SPEC}" >&5
7131echo "${ECHO_T}using tkimg_STUB_LIB_SPEC ${tkimg_STUB_LIB_SPEC}" >&6; }
7132	fi
7133    else
7134	{ echo "$as_me:$LINENO: result: file not found" >&5
7135echo "${ECHO_T}file not found" >&6; }
7136    fi
7137
7138fi
7139
7140
7141fi
7142
7143
7144
7145
7146    #
7147    # Ok, lets find the pngtcl configuration
7148    # First, look for one uninstalled.
7149    # the alternative search directory is invoked by --with-pngtcl
7150    #
7151
7152    if test x"${no_pngtcl}" = x ; then
7153	# we reset no_pngtcl in case something fails here
7154	no_pngtcl=true
7155
7156# Check whether --with-pngtcl was given.
7157if test "${with_pngtcl+set}" = set; then
7158  withval=$with_pngtcl; with_pngtclconfig=${withval}
7159fi
7160
7161	{ echo "$as_me:$LINENO: checking for pngtcl configuration" >&5
7162echo $ECHO_N "checking for pngtcl configuration... $ECHO_C" >&6; }
7163	if test "${ac_cv_c_pngtclconfig+set}" = set; then
7164  echo $ECHO_N "(cached) $ECHO_C" >&6
7165else
7166
7167
7168	    # First check to see if --with-pngtcl was specified.
7169	    if test x"${with_pngtclconfig}" != x ; then
7170		case ${with_pngtclconfig} in
7171		    */pngtclConfig.sh )
7172			if test -f ${with_pngtclconfig}; then
7173			    { echo "$as_me:$LINENO: WARNING: --with-pngtcl argument should refer to directory containing pngtclConfig.sh, not to pngtclConfig.sh itself" >&5
7174echo "$as_me: WARNING: --with-pngtcl argument should refer to directory containing pngtclConfig.sh, not to pngtclConfig.sh itself" >&2;}
7175			    with_pngtclconfig=`echo ${with_pngtclconfig} | sed 's!/pngtclConfig\.sh$!!'`
7176			fi;;
7177		esac
7178		if test -f "${with_pngtclconfig}/pngtclConfig.sh" ; then
7179		    ac_cv_c_pngtclconfig=`(cd ${with_pngtclconfig}; pwd)`
7180		else
7181		    { { echo "$as_me:$LINENO: error: ${with_pngtclconfig} directory doesn't contain pngtclConfig.sh" >&5
7182echo "$as_me: error: ${with_pngtclconfig} directory doesn't contain pngtclConfig.sh" >&2;}
7183   { (exit 1); exit 1; }; }
7184		fi
7185	    fi
7186
7187	    # then check for a private pngtcl installation
7188	    if test x"${ac_cv_c_pngtclconfig}" = x ; then
7189		for i in \
7190			../pngtcl \
7191			`ls -dr ../pngtcl*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
7192			`ls -dr ../pngtcl*[0-9].[0-9][0-9] 2>/dev/null` \
7193			`ls -dr ../pngtcl*[0-9].[0-9] 2>/dev/null` \
7194			`ls -dr ../pngtcl*[0-9].[0-9]* 2>/dev/null` \
7195			../../pngtcl \
7196			`ls -dr ../../pngtcl*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
7197			`ls -dr ../../pngtcl*[0-9].[0-9][0-9] 2>/dev/null` \
7198			`ls -dr ../../pngtcl*[0-9].[0-9] 2>/dev/null` \
7199			`ls -dr ../../pngtcl*[0-9].[0-9]* 2>/dev/null` \
7200			../../../pngtcl \
7201			`ls -dr ../../../pngtcl*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
7202			`ls -dr ../../../pngtcl*[0-9].[0-9][0-9] 2>/dev/null` \
7203			`ls -dr ../../../pngtcl*[0-9].[0-9] 2>/dev/null` \
7204			`ls -dr ../../../pngtcl*[0-9].[0-9]* 2>/dev/null` \
7205			${srcdir}/../pngtcl \
7206			`ls -dr ${srcdir}/../pngtcl*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
7207			`ls -dr ${srcdir}/../pngtcl*[0-9].[0-9][0-9] 2>/dev/null` \
7208			`ls -dr ${srcdir}/../pngtcl*[0-9].[0-9] 2>/dev/null` \
7209			`ls -dr ${srcdir}/../pngtcl*[0-9].[0-9]* 2>/dev/null` \
7210			; do
7211		    if test -f "$i/pngtclConfig.sh" ; then
7212			ac_cv_c_pngtclconfig=`(cd $i; pwd)`
7213			break
7214		    fi
7215		    if test -f "$i/unix/pngtclConfig.sh" ; then
7216			ac_cv_c_pngtclconfig=`(cd $i/unix; pwd)`
7217			break
7218		    fi
7219		done
7220	    fi
7221
7222	    # check in a few common install locations
7223	    if test x"${ac_cv_c_pngtclconfig}" = x ; then
7224		for i in `ls -d ${libdir} 2>/dev/null` \
7225			`ls -d ${exec_prefix}/lib 2>/dev/null` \
7226			`ls -d ${prefix}/lib 2>/dev/null` \
7227			`ls -d /usr/local/lib 2>/dev/null` \
7228			`ls -d /usr/contrib/lib 2>/dev/null` \
7229			`ls -d /usr/lib 2>/dev/null` \
7230			`ls -d /usr/lib64 2>/dev/null` \
7231			; do
7232		    if test -f "$i/pngtclConfig.sh" ; then
7233			ac_cv_c_pngtclconfig=`(cd $i; pwd)`
7234			break
7235		    fi
7236		done
7237	    fi
7238
7239fi
7240
7241
7242	if test x"${ac_cv_c_pngtclconfig}" = x ; then
7243	    pngtcl_BIN_DIR="# no pngtcl configs found"
7244	    { echo "$as_me:$LINENO: WARNING: Cannot find pngtcl configuration definitions" >&5
7245echo "$as_me: WARNING: Cannot find pngtcl configuration definitions" >&2;}
7246	    exit 0
7247	else
7248	    no_pngtcl=
7249	    pngtcl_BIN_DIR=${ac_cv_c_pngtclconfig}
7250	    { echo "$as_me:$LINENO: result: found $pngtcl_BIN_DIR/pngtclConfig.sh" >&5
7251echo "${ECHO_T}found $pngtcl_BIN_DIR/pngtclConfig.sh" >&6; }
7252	fi
7253    fi
7254
7255
7256    { echo "$as_me:$LINENO: checking for existence of ${pngtcl_BIN_DIR}/pngtclConfig.sh" >&5
7257echo $ECHO_N "checking for existence of ${pngtcl_BIN_DIR}/pngtclConfig.sh... $ECHO_C" >&6; }
7258
7259    if test -f "${pngtcl_BIN_DIR}/pngtclConfig.sh" ; then
7260        { echo "$as_me:$LINENO: result: loading" >&5
7261echo "${ECHO_T}loading" >&6; }
7262	. "${pngtcl_BIN_DIR}/pngtclConfig.sh"
7263    else
7264        { echo "$as_me:$LINENO: result: file not found" >&5
7265echo "${ECHO_T}file not found" >&6; }
7266    fi
7267
7268    #
7269    # If the pngtcl_BIN_DIR is the build directory (not the install directory),
7270    # then set the common variable name to the value of the build variables.
7271    # For example, the variable pngtcl_LIB_SPEC will be set to the value
7272    # of pngtcl_BUILD_LIB_SPEC. An extension should make use of pngtcl_LIB_SPEC
7273    # instead of pngtcl_BUILD_LIB_SPEC since it will work with both an
7274    # installed and uninstalled version of Tcl.
7275    #
7276
7277    if test -f "${pngtcl_BIN_DIR}/Makefile" ; then
7278	{ echo "$as_me:$LINENO: WARNING: Found Makefile - using build library specs for pngtcl" >&5
7279echo "$as_me: WARNING: Found Makefile - using build library specs for pngtcl" >&2;}
7280        pngtcl_LIB_SPEC=${pngtcl_BUILD_LIB_SPEC}
7281        pngtcl_STUB_LIB_SPEC=${pngtcl_BUILD_STUB_LIB_SPEC}
7282        pngtcl_STUB_LIB_PATH=${pngtcl_BUILD_STUB_LIB_PATH}
7283    fi
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296    # Allow the caller to prevent this auto-check by specifying any 2nd arg
7297    if test "x" = x; then
7298
7299	# Check both upper and lower-case variants
7300	# If a dev wanted non-stubs libs, this function could take an option
7301	# to not use _STUB in the paths below
7302	if test "x${pngtcl_STUB_LIB_SPEC}" = x; then
7303
7304    { echo "$as_me:$LINENO: checking For PNGTCL_STUB library for LIBS" >&5
7305echo $ECHO_N "checking For PNGTCL_STUB library for LIBS... $ECHO_C" >&6; }
7306    # This simplifies the use of stub libraries by automatically adding
7307    # the stub lib to your path.  Normally this would add to SHLIB_LD_LIBS,
7308    # but this is called before CONFIG_CFLAGS.  More importantly, this adds
7309    # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD.
7310    if test "x${PNGTCL_STUB_LIB_SPEC}" != "x" ; then
7311	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
7312
7313    vars="\"`${CYGPATH} ${PNGTCL_STUB_LIB_PATH}`\""
7314    for i in $vars; do
7315	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
7316	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
7317	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
7318	fi
7319	PKG_LIBS="$PKG_LIBS $i"
7320    done
7321
7322
7323	    { echo "$as_me:$LINENO: result: using PNGTCL_STUB_LIB_PATH ${PNGTCL_STUB_LIB_PATH}" >&5
7324echo "${ECHO_T}using PNGTCL_STUB_LIB_PATH ${PNGTCL_STUB_LIB_PATH}" >&6; }
7325	else
7326
7327    vars="${PNGTCL_STUB_LIB_SPEC}"
7328    for i in $vars; do
7329	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
7330	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
7331	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
7332	fi
7333	PKG_LIBS="$PKG_LIBS $i"
7334    done
7335
7336
7337	    { echo "$as_me:$LINENO: result: using PNGTCL_STUB_LIB_SPEC ${PNGTCL_STUB_LIB_SPEC}" >&5
7338echo "${ECHO_T}using PNGTCL_STUB_LIB_SPEC ${PNGTCL_STUB_LIB_SPEC}" >&6; }
7339	fi
7340    else
7341	{ echo "$as_me:$LINENO: result: file not found" >&5
7342echo "${ECHO_T}file not found" >&6; }
7343    fi
7344
7345else
7346
7347    { echo "$as_me:$LINENO: checking For pngtcl_STUB library for LIBS" >&5
7348echo $ECHO_N "checking For pngtcl_STUB library for LIBS... $ECHO_C" >&6; }
7349    # This simplifies the use of stub libraries by automatically adding
7350    # the stub lib to your path.  Normally this would add to SHLIB_LD_LIBS,
7351    # but this is called before CONFIG_CFLAGS.  More importantly, this adds
7352    # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD.
7353    if test "x${pngtcl_STUB_LIB_SPEC}" != "x" ; then
7354	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
7355
7356    vars="\"`${CYGPATH} ${pngtcl_STUB_LIB_PATH}`\""
7357    for i in $vars; do
7358	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
7359	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
7360	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
7361	fi
7362	PKG_LIBS="$PKG_LIBS $i"
7363    done
7364
7365
7366	    { echo "$as_me:$LINENO: result: using pngtcl_STUB_LIB_PATH ${pngtcl_STUB_LIB_PATH}" >&5
7367echo "${ECHO_T}using pngtcl_STUB_LIB_PATH ${pngtcl_STUB_LIB_PATH}" >&6; }
7368	else
7369
7370    vars="${pngtcl_STUB_LIB_SPEC}"
7371    for i in $vars; do
7372	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
7373	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
7374	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
7375	fi
7376	PKG_LIBS="$PKG_LIBS $i"
7377    done
7378
7379
7380	    { echo "$as_me:$LINENO: result: using pngtcl_STUB_LIB_SPEC ${pngtcl_STUB_LIB_SPEC}" >&5
7381echo "${ECHO_T}using pngtcl_STUB_LIB_SPEC ${pngtcl_STUB_LIB_SPEC}" >&6; }
7382	fi
7383    else
7384	{ echo "$as_me:$LINENO: result: file not found" >&5
7385echo "${ECHO_T}file not found" >&6; }
7386    fi
7387
7388fi
7389
7390
7391fi
7392
7393
7394
7395
7396
7397    #
7398    # Ok, lets find the zlibtcl configuration
7399    # First, look for one uninstalled.
7400    # the alternative search directory is invoked by --with-zlibtcl
7401    #
7402
7403    if test x"${no_zlibtcl}" = x ; then
7404	# we reset no_zlibtcl in case something fails here
7405	no_zlibtcl=true
7406
7407# Check whether --with-zlibtcl was given.
7408if test "${with_zlibtcl+set}" = set; then
7409  withval=$with_zlibtcl; with_zlibtclconfig=${withval}
7410fi
7411
7412	{ echo "$as_me:$LINENO: checking for zlibtcl configuration" >&5
7413echo $ECHO_N "checking for zlibtcl configuration... $ECHO_C" >&6; }
7414	if test "${ac_cv_c_zlibtclconfig+set}" = set; then
7415  echo $ECHO_N "(cached) $ECHO_C" >&6
7416else
7417
7418
7419	    # First check to see if --with-zlibtcl was specified.
7420	    if test x"${with_zlibtclconfig}" != x ; then
7421		case ${with_zlibtclconfig} in
7422		    */zlibtclConfig.sh )
7423			if test -f ${with_zlibtclconfig}; then
7424			    { echo "$as_me:$LINENO: WARNING: --with-zlibtcl argument should refer to directory containing zlibtclConfig.sh, not to zlibtclConfig.sh itself" >&5
7425echo "$as_me: WARNING: --with-zlibtcl argument should refer to directory containing zlibtclConfig.sh, not to zlibtclConfig.sh itself" >&2;}
7426			    with_zlibtclconfig=`echo ${with_zlibtclconfig} | sed 's!/zlibtclConfig\.sh$!!'`
7427			fi;;
7428		esac
7429		if test -f "${with_zlibtclconfig}/zlibtclConfig.sh" ; then
7430		    ac_cv_c_zlibtclconfig=`(cd ${with_zlibtclconfig}; pwd)`
7431		else
7432		    { { echo "$as_me:$LINENO: error: ${with_zlibtclconfig} directory doesn't contain zlibtclConfig.sh" >&5
7433echo "$as_me: error: ${with_zlibtclconfig} directory doesn't contain zlibtclConfig.sh" >&2;}
7434   { (exit 1); exit 1; }; }
7435		fi
7436	    fi
7437
7438	    # then check for a private zlibtcl installation
7439	    if test x"${ac_cv_c_zlibtclconfig}" = x ; then
7440		for i in \
7441			../zlibtcl \
7442			`ls -dr ../zlibtcl*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
7443			`ls -dr ../zlibtcl*[0-9].[0-9][0-9] 2>/dev/null` \
7444			`ls -dr ../zlibtcl*[0-9].[0-9] 2>/dev/null` \
7445			`ls -dr ../zlibtcl*[0-9].[0-9]* 2>/dev/null` \
7446			../../zlibtcl \
7447			`ls -dr ../../zlibtcl*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
7448			`ls -dr ../../zlibtcl*[0-9].[0-9][0-9] 2>/dev/null` \
7449			`ls -dr ../../zlibtcl*[0-9].[0-9] 2>/dev/null` \
7450			`ls -dr ../../zlibtcl*[0-9].[0-9]* 2>/dev/null` \
7451			../../../zlibtcl \
7452			`ls -dr ../../../zlibtcl*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
7453			`ls -dr ../../../zlibtcl*[0-9].[0-9][0-9] 2>/dev/null` \
7454			`ls -dr ../../../zlibtcl*[0-9].[0-9] 2>/dev/null` \
7455			`ls -dr ../../../zlibtcl*[0-9].[0-9]* 2>/dev/null` \
7456			${srcdir}/../zlibtcl \
7457			`ls -dr ${srcdir}/../zlibtcl*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
7458			`ls -dr ${srcdir}/../zlibtcl*[0-9].[0-9][0-9] 2>/dev/null` \
7459			`ls -dr ${srcdir}/../zlibtcl*[0-9].[0-9] 2>/dev/null` \
7460			`ls -dr ${srcdir}/../zlibtcl*[0-9].[0-9]* 2>/dev/null` \
7461			; do
7462		    if test -f "$i/zlibtclConfig.sh" ; then
7463			ac_cv_c_zlibtclconfig=`(cd $i; pwd)`
7464			break
7465		    fi
7466		    if test -f "$i/unix/zlibtclConfig.sh" ; then
7467			ac_cv_c_zlibtclconfig=`(cd $i/unix; pwd)`
7468			break
7469		    fi
7470		done
7471	    fi
7472
7473	    # check in a few common install locations
7474	    if test x"${ac_cv_c_zlibtclconfig}" = x ; then
7475		for i in `ls -d ${libdir} 2>/dev/null` \
7476			`ls -d ${exec_prefix}/lib 2>/dev/null` \
7477			`ls -d ${prefix}/lib 2>/dev/null` \
7478			`ls -d /usr/local/lib 2>/dev/null` \
7479			`ls -d /usr/contrib/lib 2>/dev/null` \
7480			`ls -d /usr/lib 2>/dev/null` \
7481			`ls -d /usr/lib64 2>/dev/null` \
7482			; do
7483		    if test -f "$i/zlibtclConfig.sh" ; then
7484			ac_cv_c_zlibtclconfig=`(cd $i; pwd)`
7485			break
7486		    fi
7487		done
7488	    fi
7489
7490fi
7491
7492
7493	if test x"${ac_cv_c_zlibtclconfig}" = x ; then
7494	    zlibtcl_BIN_DIR="# no zlibtcl configs found"
7495	    { echo "$as_me:$LINENO: WARNING: Cannot find zlibtcl configuration definitions" >&5
7496echo "$as_me: WARNING: Cannot find zlibtcl configuration definitions" >&2;}
7497	    exit 0
7498	else
7499	    no_zlibtcl=
7500	    zlibtcl_BIN_DIR=${ac_cv_c_zlibtclconfig}
7501	    { echo "$as_me:$LINENO: result: found $zlibtcl_BIN_DIR/zlibtclConfig.sh" >&5
7502echo "${ECHO_T}found $zlibtcl_BIN_DIR/zlibtclConfig.sh" >&6; }
7503	fi
7504    fi
7505
7506
7507    { echo "$as_me:$LINENO: checking for existence of ${zlibtcl_BIN_DIR}/zlibtclConfig.sh" >&5
7508echo $ECHO_N "checking for existence of ${zlibtcl_BIN_DIR}/zlibtclConfig.sh... $ECHO_C" >&6; }
7509
7510    if test -f "${zlibtcl_BIN_DIR}/zlibtclConfig.sh" ; then
7511        { echo "$as_me:$LINENO: result: loading" >&5
7512echo "${ECHO_T}loading" >&6; }
7513	. "${zlibtcl_BIN_DIR}/zlibtclConfig.sh"
7514    else
7515        { echo "$as_me:$LINENO: result: file not found" >&5
7516echo "${ECHO_T}file not found" >&6; }
7517    fi
7518
7519    #
7520    # If the zlibtcl_BIN_DIR is the build directory (not the install directory),
7521    # then set the common variable name to the value of the build variables.
7522    # For example, the variable zlibtcl_LIB_SPEC will be set to the value
7523    # of zlibtcl_BUILD_LIB_SPEC. An extension should make use of zlibtcl_LIB_SPEC
7524    # instead of zlibtcl_BUILD_LIB_SPEC since it will work with both an
7525    # installed and uninstalled version of Tcl.
7526    #
7527
7528    if test -f "${zlibtcl_BIN_DIR}/Makefile" ; then
7529	{ echo "$as_me:$LINENO: WARNING: Found Makefile - using build library specs for zlibtcl" >&5
7530echo "$as_me: WARNING: Found Makefile - using build library specs for zlibtcl" >&2;}
7531        zlibtcl_LIB_SPEC=${zlibtcl_BUILD_LIB_SPEC}
7532        zlibtcl_STUB_LIB_SPEC=${zlibtcl_BUILD_STUB_LIB_SPEC}
7533        zlibtcl_STUB_LIB_PATH=${zlibtcl_BUILD_STUB_LIB_PATH}
7534    fi
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547    # Allow the caller to prevent this auto-check by specifying any 2nd arg
7548    if test "x" = x; then
7549
7550	# Check both upper and lower-case variants
7551	# If a dev wanted non-stubs libs, this function could take an option
7552	# to not use _STUB in the paths below
7553	if test "x${zlibtcl_STUB_LIB_SPEC}" = x; then
7554
7555    { echo "$as_me:$LINENO: checking For ZLIBTCL_STUB library for LIBS" >&5
7556echo $ECHO_N "checking For ZLIBTCL_STUB library for LIBS... $ECHO_C" >&6; }
7557    # This simplifies the use of stub libraries by automatically adding
7558    # the stub lib to your path.  Normally this would add to SHLIB_LD_LIBS,
7559    # but this is called before CONFIG_CFLAGS.  More importantly, this adds
7560    # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD.
7561    if test "x${ZLIBTCL_STUB_LIB_SPEC}" != "x" ; then
7562	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
7563
7564    vars="\"`${CYGPATH} ${ZLIBTCL_STUB_LIB_PATH}`\""
7565    for i in $vars; do
7566	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
7567	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
7568	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
7569	fi
7570	PKG_LIBS="$PKG_LIBS $i"
7571    done
7572
7573
7574	    { echo "$as_me:$LINENO: result: using ZLIBTCL_STUB_LIB_PATH ${ZLIBTCL_STUB_LIB_PATH}" >&5
7575echo "${ECHO_T}using ZLIBTCL_STUB_LIB_PATH ${ZLIBTCL_STUB_LIB_PATH}" >&6; }
7576	else
7577
7578    vars="${ZLIBTCL_STUB_LIB_SPEC}"
7579    for i in $vars; do
7580	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
7581	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
7582	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
7583	fi
7584	PKG_LIBS="$PKG_LIBS $i"
7585    done
7586
7587
7588	    { echo "$as_me:$LINENO: result: using ZLIBTCL_STUB_LIB_SPEC ${ZLIBTCL_STUB_LIB_SPEC}" >&5
7589echo "${ECHO_T}using ZLIBTCL_STUB_LIB_SPEC ${ZLIBTCL_STUB_LIB_SPEC}" >&6; }
7590	fi
7591    else
7592	{ echo "$as_me:$LINENO: result: file not found" >&5
7593echo "${ECHO_T}file not found" >&6; }
7594    fi
7595
7596else
7597
7598    { echo "$as_me:$LINENO: checking For zlibtcl_STUB library for LIBS" >&5
7599echo $ECHO_N "checking For zlibtcl_STUB library for LIBS... $ECHO_C" >&6; }
7600    # This simplifies the use of stub libraries by automatically adding
7601    # the stub lib to your path.  Normally this would add to SHLIB_LD_LIBS,
7602    # but this is called before CONFIG_CFLAGS.  More importantly, this adds
7603    # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD.
7604    if test "x${zlibtcl_STUB_LIB_SPEC}" != "x" ; then
7605	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
7606
7607    vars="\"`${CYGPATH} ${zlibtcl_STUB_LIB_PATH}`\""
7608    for i in $vars; do
7609	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
7610	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
7611	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
7612	fi
7613	PKG_LIBS="$PKG_LIBS $i"
7614    done
7615
7616
7617	    { echo "$as_me:$LINENO: result: using zlibtcl_STUB_LIB_PATH ${zlibtcl_STUB_LIB_PATH}" >&5
7618echo "${ECHO_T}using zlibtcl_STUB_LIB_PATH ${zlibtcl_STUB_LIB_PATH}" >&6; }
7619	else
7620
7621    vars="${zlibtcl_STUB_LIB_SPEC}"
7622    for i in $vars; do
7623	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
7624	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
7625	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
7626	fi
7627	PKG_LIBS="$PKG_LIBS $i"
7628    done
7629
7630
7631	    { echo "$as_me:$LINENO: result: using zlibtcl_STUB_LIB_SPEC ${zlibtcl_STUB_LIB_SPEC}" >&5
7632echo "${ECHO_T}using zlibtcl_STUB_LIB_SPEC ${zlibtcl_STUB_LIB_SPEC}" >&6; }
7633	fi
7634    else
7635	{ echo "$as_me:$LINENO: result: file not found" >&5
7636echo "${ECHO_T}file not found" >&6; }
7637    fi
7638
7639fi
7640
7641
7642fi
7643
7644
7645
7646
7647
7648#--------------------------------------------------------------------
7649# Compute an absolute path to the src directory of module 'tkimg' so
7650# that we are able to find its headers even if they are not installed.
7651#--------------------------------------------------------------------
7652
7653case $tkimg_SRC_DIR in
7654/*)	tkimg_SRC_PATH=$tkimg_SRC_DIR
7655	;;
7656*)	# SRC_DIR relative, splice with BUILD_PATH
7657	tkimg_SRC_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`/$tkimg_SRC_DIR"
7658esac
7659
7660tkimg_BUILD_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`"
7661
7662if test "${TEA_PLATFORM}" = "windows" ; then
7663    tkimg_SRC_PATH="`$CYGPATH $tkimg_SRC_PATH`"
7664    tkimg_BUILD_PATH="`$CYGPATH $tkimg_BUILD_PATH`"
7665fi
7666
7667
7668
7669
7670
7671#--------------------------------------------------------------------
7672# Compute an absolute path to the src directory of module 'pngtcl' so
7673# that we are able to find its headers even if they are not installed.
7674#--------------------------------------------------------------------
7675
7676case $pngtcl_SRC_DIR in
7677/*)	pngtcl_SRC_PATH=$pngtcl_SRC_DIR
7678	;;
7679*)	# SRC_DIR relative, splice with BUILD_PATH
7680	pngtcl_SRC_PATH="`dirname $pngtcl_BUILD_STUB_LIB_PATH`/$pngtcl_SRC_DIR"
7681esac
7682
7683pngtcl_BUILD_PATH="`dirname $pngtcl_BUILD_STUB_LIB_PATH`"
7684
7685if test "${TEA_PLATFORM}" = "windows" ; then
7686    pngtcl_SRC_PATH="`$CYGPATH $pngtcl_SRC_PATH`"
7687    pngtcl_BUILD_PATH="`$CYGPATH $pngtcl_BUILD_PATH`"
7688fi
7689
7690
7691
7692
7693
7694#--------------------------------------------------------------------
7695# Compute an absolute path to the src directory of module 'zlibtcl' so
7696# that we are able to find its headers even if they are not installed.
7697#--------------------------------------------------------------------
7698
7699case $zlibtcl_SRC_DIR in
7700/*)	zlibtcl_SRC_PATH=$zlibtcl_SRC_DIR
7701	;;
7702*)	# SRC_DIR relative, splice with BUILD_PATH
7703	zlibtcl_SRC_PATH="`dirname $zlibtcl_BUILD_STUB_LIB_PATH`/$zlibtcl_SRC_DIR"
7704esac
7705
7706zlibtcl_BUILD_PATH="`dirname $zlibtcl_BUILD_STUB_LIB_PATH`"
7707
7708if test "${TEA_PLATFORM}" = "windows" ; then
7709    zlibtcl_SRC_PATH="`$CYGPATH $zlibtcl_SRC_PATH`"
7710    zlibtcl_BUILD_PATH="`$CYGPATH $zlibtcl_BUILD_PATH`"
7711fi
7712
7713
7714
7715
7716
7717#-----------------------------------------------------------------------
7718# Specify the C source files to compile in TEA_ADD_SOURCES,
7719# public headers that need to be installed in TEA_ADD_HEADERS,
7720# stub library C source files to compile in TEA_ADD_STUB_SOURCES,
7721# and runtime Tcl library files in TEA_ADD_TCL_SOURCES.
7722# This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS
7723# and PKG_TCL_SOURCES.
7724#-----------------------------------------------------------------------
7725
7726
7727    vars="png.c"
7728    for i in $vars; do
7729	case $i in
7730	    \$*)
7731		# allow $-var names
7732		PKG_SOURCES="$PKG_SOURCES $i"
7733		PKG_OBJECTS="$PKG_OBJECTS $i"
7734		;;
7735	    *)
7736		# check for existence - allows for generic/win/unix VPATH
7737		# To add more dirs here (like 'src'), you have to update VPATH
7738		# in Makefile.in as well
7739		if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
7740		    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
7741		    -a ! -f "${srcdir}/macosx/$i" \
7742		    ; then
7743		    { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
7744echo "$as_me: error: could not find source file '$i'" >&2;}
7745   { (exit 1); exit 1; }; }
7746		fi
7747		PKG_SOURCES="$PKG_SOURCES $i"
7748		# this assumes it is in a VPATH dir
7749		i=`basename $i`
7750		# handle user calling this before or after TEA_SETUP_COMPILER
7751		if test x"${OBJEXT}" != x ; then
7752		    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
7753		else
7754		    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
7755		fi
7756		PKG_OBJECTS="$PKG_OBJECTS $j"
7757		;;
7758	esac
7759    done
7760
7761
7762
7763
7764    vars=""
7765    for i in $vars; do
7766	# check for existence, be strict because it is installed
7767	if test ! -f "${srcdir}/$i" ; then
7768	    { { echo "$as_me:$LINENO: error: could not find header file '${srcdir}/$i'" >&5
7769echo "$as_me: error: could not find header file '${srcdir}/$i'" >&2;}
7770   { (exit 1); exit 1; }; }
7771	fi
7772	PKG_HEADERS="$PKG_HEADERS $i"
7773    done
7774
7775
7776
7777    vars="-I\"`\${CYGPATH} \${tkimg_SRC_PATH}`\""
7778    for i in $vars; do
7779	PKG_INCLUDES="$PKG_INCLUDES $i"
7780    done
7781
7782
7783
7784    vars="-I\"`\${CYGPATH} \${pngtcl_SRC_PATH}`\""
7785    for i in $vars; do
7786	PKG_INCLUDES="$PKG_INCLUDES $i"
7787    done
7788
7789
7790
7791    vars="-I\"`\${CYGPATH} \${pngtcl_BUILD_PATH}`\""
7792    for i in $vars; do
7793	PKG_INCLUDES="$PKG_INCLUDES $i"
7794    done
7795
7796
7797
7798    vars="-I\"`\${CYGPATH} \${zlibtcl_SRC_PATH}`\""
7799    for i in $vars; do
7800	PKG_INCLUDES="$PKG_INCLUDES $i"
7801    done
7802
7803
7804
7805    vars="-I\"`\${CYGPATH} \${zlibtcl_BUILD_PATH}`\""
7806    for i in $vars; do
7807	PKG_INCLUDES="$PKG_INCLUDES $i"
7808    done
7809
7810
7811
7812    vars="-I."
7813    for i in $vars; do
7814	PKG_INCLUDES="$PKG_INCLUDES $i"
7815    done
7816
7817
7818
7819    vars=""
7820    for i in $vars; do
7821	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
7822	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
7823	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
7824	fi
7825	PKG_LIBS="$PKG_LIBS $i"
7826    done
7827
7828
7829
7830    PKG_CFLAGS="$PKG_CFLAGS -DTKIMG_VERSION=\\\"\${tkimg_VERSION}\\\""
7831
7832
7833
7834    PKG_CFLAGS="$PKG_CFLAGS -DPNGTCL_VERSION=\\\"\${pngtcl_VERSION}\\\""
7835
7836
7837
7838    PKG_CFLAGS="$PKG_CFLAGS -DZLIBTCL_VERSION=\\\"\${zlibtcl_VERSION}\\\""
7839
7840
7841
7842    vars=""
7843    for i in $vars; do
7844	# check for existence - allows for generic/win/unix VPATH
7845	if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
7846	    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
7847	    -a ! -f "${srcdir}/macosx/$i" \
7848	    ; then
7849	    { { echo "$as_me:$LINENO: error: could not find stub source file '$i'" >&5
7850echo "$as_me: error: could not find stub source file '$i'" >&2;}
7851   { (exit 1); exit 1; }; }
7852	fi
7853	PKG_STUB_SOURCES="$PKG_STUB_SOURCES $i"
7854	# this assumes it is in a VPATH dir
7855	i=`basename $i`
7856	# handle user calling this before or after TEA_SETUP_COMPILER
7857	if test x"${OBJEXT}" != x ; then
7858	    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
7859	else
7860	    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
7861	fi
7862	PKG_STUB_OBJECTS="$PKG_STUB_OBJECTS $j"
7863    done
7864
7865
7866
7867
7868    vars=""
7869    for i in $vars; do
7870	# check for existence, be strict because it is installed
7871	if test ! -f "${srcdir}/$i" ; then
7872	    { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
7873echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
7874   { (exit 1); exit 1; }; }
7875	fi
7876	PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
7877    done
7878
7879
7880
7881PUP="`echo ${PACKAGE_NAME}| tr 'a-z' 'A-Z'`"
7882
7883sed < "`${CYGPATH} ${srcdir}/../init.c`" > "init.c"	\
7884	-e	"s/@CPACKAGE@/${CPACKAGE}/"		\
7885	-e	"s/%PACKAGE%/${PACKAGE_NAME}/"		\
7886	-e	"s/%PACKAGE_UP%/${PUP}/"		\
7887	-e	"s/%PHIMGTYPE%/${PHIMGTYPE}/"
7888
7889# init.c is an included source file, not a source by itself
7890# FUTURE: Do this through AC_OUTPUT!!
7891
7892#--------------------------------------------------------------------
7893# __CHANGE__
7894# Choose which headers you need.  Extension authors should try very
7895# hard to only rely on the Tcl public header files.  Internal headers
7896# contain private data structures and are subject to change without
7897# notice.
7898# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
7899#--------------------------------------------------------------------
7900
7901
7902    { echo "$as_me:$LINENO: checking for Tcl public headers" >&5
7903echo $ECHO_N "checking for Tcl public headers... $ECHO_C" >&6; }
7904
7905
7906# Check whether --with-tclinclude was given.
7907if test "${with_tclinclude+set}" = set; then
7908  withval=$with_tclinclude; with_tclinclude=${withval}
7909fi
7910
7911
7912    if test "${ac_cv_c_tclh+set}" = set; then
7913  echo $ECHO_N "(cached) $ECHO_C" >&6
7914else
7915
7916	# Use the value from --with-tclinclude, if it was given
7917
7918	if test x"${with_tclinclude}" != x ; then
7919	    if test -f "${with_tclinclude}/tcl.h" ; then
7920		ac_cv_c_tclh=${with_tclinclude}
7921	    else
7922		{ { echo "$as_me:$LINENO: error: ${with_tclinclude} directory does not contain tcl.h" >&5
7923echo "$as_me: error: ${with_tclinclude} directory does not contain tcl.h" >&2;}
7924   { (exit 1); exit 1; }; }
7925	    fi
7926	else
7927	    list=""
7928	    if test "`uname -s`" = "Darwin"; then
7929		# If Tcl was built as a framework, attempt to use
7930		# the framework's Headers directory
7931		case ${TCL_DEFS} in
7932		    *TCL_FRAMEWORK*)
7933			list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
7934			;;
7935		esac
7936	    fi
7937
7938	    # Look in the source dir only if Tcl is not installed,
7939	    # and in that situation, look there before installed locations.
7940	    if test -f "${TCL_BIN_DIR}/Makefile" ; then
7941		list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
7942	    fi
7943
7944	    # Check order: pkg --prefix location, Tcl's --prefix location,
7945	    # relative to directory of tclConfig.sh.
7946
7947	    eval "temp_includedir=${includedir}"
7948	    list="$list \
7949		`ls -d ${temp_includedir}        2>/dev/null` \
7950		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
7951		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
7952	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
7953		list="$list /usr/local/include /usr/include"
7954		if test x"${TCL_INCLUDE_SPEC}" != x ; then
7955		    d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
7956		    list="$list `ls -d ${d} 2>/dev/null`"
7957		fi
7958	    fi
7959	    for i in $list ; do
7960		if test -f "$i/tcl.h" ; then
7961		    ac_cv_c_tclh=$i
7962		    break
7963		fi
7964	    done
7965	fi
7966
7967fi
7968
7969
7970    # Print a message based on how we determined the include path
7971
7972    if test x"${ac_cv_c_tclh}" = x ; then
7973	{ { echo "$as_me:$LINENO: error: tcl.h not found.  Please specify its location with --with-tclinclude" >&5
7974echo "$as_me: error: tcl.h not found.  Please specify its location with --with-tclinclude" >&2;}
7975   { (exit 1); exit 1; }; }
7976    else
7977	{ echo "$as_me:$LINENO: result: ${ac_cv_c_tclh}" >&5
7978echo "${ECHO_T}${ac_cv_c_tclh}" >&6; }
7979    fi
7980
7981    # Convert to a native path and substitute into the output files.
7982
7983    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
7984
7985    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
7986
7987
7988
7989
7990    { echo "$as_me:$LINENO: checking for Tk public headers" >&5
7991echo $ECHO_N "checking for Tk public headers... $ECHO_C" >&6; }
7992
7993
7994# Check whether --with-tkinclude was given.
7995if test "${with_tkinclude+set}" = set; then
7996  withval=$with_tkinclude; with_tkinclude=${withval}
7997fi
7998
7999
8000    if test "${ac_cv_c_tkh+set}" = set; then
8001  echo $ECHO_N "(cached) $ECHO_C" >&6
8002else
8003
8004	# Use the value from --with-tkinclude, if it was given
8005
8006	if test x"${with_tkinclude}" != x ; then
8007	    if test -f "${with_tkinclude}/tk.h" ; then
8008		ac_cv_c_tkh=${with_tkinclude}
8009	    else
8010		{ { echo "$as_me:$LINENO: error: ${with_tkinclude} directory does not contain tk.h" >&5
8011echo "$as_me: error: ${with_tkinclude} directory does not contain tk.h" >&2;}
8012   { (exit 1); exit 1; }; }
8013	    fi
8014	else
8015	    list=""
8016	    if test "`uname -s`" = "Darwin"; then
8017		# If Tk was built as a framework, attempt to use
8018		# the framework's Headers directory.
8019		case ${TK_DEFS} in
8020		    *TK_FRAMEWORK*)
8021			list="`ls -d ${TK_BIN_DIR}/Headers 2>/dev/null`"
8022			;;
8023		esac
8024	    fi
8025
8026	    # Look in the source dir only if Tk is not installed,
8027	    # and in that situation, look there before installed locations.
8028	    if test -f "${TK_BIN_DIR}/Makefile" ; then
8029		list="$list `ls -d ${TK_SRC_DIR}/generic 2>/dev/null`"
8030	    fi
8031
8032	    # Check order: pkg --prefix location, Tk's --prefix location,
8033	    # relative to directory of tkConfig.sh, Tcl's --prefix location,
8034	    # relative to directory of tclConfig.sh.
8035
8036	    eval "temp_includedir=${includedir}"
8037	    list="$list \
8038		`ls -d ${temp_includedir}        2>/dev/null` \
8039		`ls -d ${TK_PREFIX}/include      2>/dev/null` \
8040		`ls -d ${TK_BIN_DIR}/../include  2>/dev/null` \
8041		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
8042		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
8043	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
8044		list="$list /usr/local/include /usr/include"
8045		if test x"${TK_INCLUDE_SPEC}" != x ; then
8046		    d=`echo "${TK_INCLUDE_SPEC}" | sed -e 's/^-I//'`
8047		    list="$list `ls -d ${d} 2>/dev/null`"
8048		fi
8049	    fi
8050	    for i in $list ; do
8051		if test -f "$i/tk.h" ; then
8052		    ac_cv_c_tkh=$i
8053		    break
8054		fi
8055	    done
8056	fi
8057
8058fi
8059
8060
8061    # Print a message based on how we determined the include path
8062
8063    if test x"${ac_cv_c_tkh}" = x ; then
8064	{ { echo "$as_me:$LINENO: error: tk.h not found.  Please specify its location with --with-tkinclude" >&5
8065echo "$as_me: error: tk.h not found.  Please specify its location with --with-tkinclude" >&2;}
8066   { (exit 1); exit 1; }; }
8067    else
8068	{ echo "$as_me:$LINENO: result: ${ac_cv_c_tkh}" >&5
8069echo "${ECHO_T}${ac_cv_c_tkh}" >&6; }
8070    fi
8071
8072    # Convert to a native path and substitute into the output files.
8073
8074    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}`
8075
8076    TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
8077
8078
8079
8080    if test "${TEA_WINDOWINGSYSTEM}" != "x11"; then
8081	# On Windows and Aqua, we need the X compat headers
8082	{ echo "$as_me:$LINENO: checking for X11 header files" >&5
8083echo $ECHO_N "checking for X11 header files... $ECHO_C" >&6; }
8084	if test ! -r "${INCLUDE_DIR_NATIVE}/X11/Xlib.h"; then
8085	    INCLUDE_DIR_NATIVE="`${CYGPATH} ${TK_SRC_DIR}/xlib`"
8086	    TK_XINCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
8087
8088	fi
8089	{ echo "$as_me:$LINENO: result: ${INCLUDE_DIR_NATIVE}" >&5
8090echo "${ECHO_T}${INCLUDE_DIR_NATIVE}" >&6; }
8091    fi
8092
8093
8094#--------------------------------------------------------------------
8095# A few miscellaneous platform-specific items:
8096#
8097# Windows creates a few extra files that need to be cleaned up.
8098# We can add more files to clean if our extension creates any extra
8099# files in the future.
8100#
8101# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
8102# These will be appended to the current set of compiler flags for
8103# your system.
8104#--------------------------------------------------------------------
8105
8106if test "${TEA_PLATFORM}" = "windows" ; then
8107    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch init.c"
8108else
8109    CLEANFILES="init.c"
8110fi
8111
8112
8113#--------------------------------------------------------------------
8114# Check whether --enable-threads or --disable-threads was given.
8115# So far only Tcl responds to this one.
8116#--------------------------------------------------------------------
8117
8118
8119    # Check whether --enable-threads was given.
8120if test "${enable_threads+set}" = set; then
8121  enableval=$enable_threads; tcl_ok=$enableval
8122else
8123  tcl_ok=yes
8124fi
8125
8126
8127    if test "${enable_threads+set}" = set; then
8128	enableval="$enable_threads"
8129	tcl_ok=$enableval
8130    else
8131	tcl_ok=yes
8132    fi
8133
8134    if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
8135	TCL_THREADS=1
8136
8137	if test "${TEA_PLATFORM}" != "windows" ; then
8138	    # We are always OK on Windows, so check what this platform wants:
8139
8140	    # USE_THREAD_ALLOC tells us to try the special thread-based
8141	    # allocator that significantly reduces lock contention
8142
8143cat >>confdefs.h <<\_ACEOF
8144#define USE_THREAD_ALLOC 1
8145_ACEOF
8146
8147
8148cat >>confdefs.h <<\_ACEOF
8149#define _REENTRANT 1
8150_ACEOF
8151
8152	    if test "`uname -s`" = "SunOS" ; then
8153
8154cat >>confdefs.h <<\_ACEOF
8155#define _POSIX_PTHREAD_SEMANTICS 1
8156_ACEOF
8157
8158	    fi
8159
8160cat >>confdefs.h <<\_ACEOF
8161#define _THREAD_SAFE 1
8162_ACEOF
8163
8164	    { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5
8165echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6; }
8166if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then
8167  echo $ECHO_N "(cached) $ECHO_C" >&6
8168else
8169  ac_check_lib_save_LIBS=$LIBS
8170LIBS="-lpthread  $LIBS"
8171cat >conftest.$ac_ext <<_ACEOF
8172/* confdefs.h.  */
8173_ACEOF
8174cat confdefs.h >>conftest.$ac_ext
8175cat >>conftest.$ac_ext <<_ACEOF
8176/* end confdefs.h.  */
8177
8178/* Override any GCC internal prototype to avoid an error.
8179   Use char because int might match the return type of a GCC
8180   builtin and then its argument prototype would still apply.  */
8181#ifdef __cplusplus
8182extern "C"
8183#endif
8184char pthread_mutex_init ();
8185int
8186main ()
8187{
8188return pthread_mutex_init ();
8189  ;
8190  return 0;
8191}
8192_ACEOF
8193rm -f conftest.$ac_objext conftest$ac_exeext
8194if { (ac_try="$ac_link"
8195case "(($ac_try" in
8196  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8197  *) ac_try_echo=$ac_try;;
8198esac
8199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8200  (eval "$ac_link") 2>conftest.er1
8201  ac_status=$?
8202  grep -v '^ *+' conftest.er1 >conftest.err
8203  rm -f conftest.er1
8204  cat conftest.err >&5
8205  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8206  (exit $ac_status); } && {
8207	 test -z "$ac_c_werror_flag" ||
8208	 test ! -s conftest.err
8209       } && test -s conftest$ac_exeext &&
8210       $as_test_x conftest$ac_exeext; then
8211  ac_cv_lib_pthread_pthread_mutex_init=yes
8212else
8213  echo "$as_me: failed program was:" >&5
8214sed 's/^/| /' conftest.$ac_ext >&5
8215
8216	ac_cv_lib_pthread_pthread_mutex_init=no
8217fi
8218
8219rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8220      conftest$ac_exeext conftest.$ac_ext
8221LIBS=$ac_check_lib_save_LIBS
8222fi
8223{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5
8224echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6; }
8225if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then
8226  tcl_ok=yes
8227else
8228  tcl_ok=no
8229fi
8230
8231	    if test "$tcl_ok" = "no"; then
8232		# Check a little harder for __pthread_mutex_init in the same
8233		# library, as some systems hide it there until pthread.h is
8234		# defined.  We could alternatively do an AC_TRY_COMPILE with
8235		# pthread.h, but that will work with libpthread really doesn't
8236		# exist, like AIX 4.2.  [Bug: 4359]
8237		{ echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5
8238echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6; }
8239if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then
8240  echo $ECHO_N "(cached) $ECHO_C" >&6
8241else
8242  ac_check_lib_save_LIBS=$LIBS
8243LIBS="-lpthread  $LIBS"
8244cat >conftest.$ac_ext <<_ACEOF
8245/* confdefs.h.  */
8246_ACEOF
8247cat confdefs.h >>conftest.$ac_ext
8248cat >>conftest.$ac_ext <<_ACEOF
8249/* end confdefs.h.  */
8250
8251/* Override any GCC internal prototype to avoid an error.
8252   Use char because int might match the return type of a GCC
8253   builtin and then its argument prototype would still apply.  */
8254#ifdef __cplusplus
8255extern "C"
8256#endif
8257char __pthread_mutex_init ();
8258int
8259main ()
8260{
8261return __pthread_mutex_init ();
8262  ;
8263  return 0;
8264}
8265_ACEOF
8266rm -f conftest.$ac_objext conftest$ac_exeext
8267if { (ac_try="$ac_link"
8268case "(($ac_try" in
8269  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8270  *) ac_try_echo=$ac_try;;
8271esac
8272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8273  (eval "$ac_link") 2>conftest.er1
8274  ac_status=$?
8275  grep -v '^ *+' conftest.er1 >conftest.err
8276  rm -f conftest.er1
8277  cat conftest.err >&5
8278  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8279  (exit $ac_status); } && {
8280	 test -z "$ac_c_werror_flag" ||
8281	 test ! -s conftest.err
8282       } && test -s conftest$ac_exeext &&
8283       $as_test_x conftest$ac_exeext; then
8284  ac_cv_lib_pthread___pthread_mutex_init=yes
8285else
8286  echo "$as_me: failed program was:" >&5
8287sed 's/^/| /' conftest.$ac_ext >&5
8288
8289	ac_cv_lib_pthread___pthread_mutex_init=no
8290fi
8291
8292rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8293      conftest$ac_exeext conftest.$ac_ext
8294LIBS=$ac_check_lib_save_LIBS
8295fi
8296{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5
8297echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6; }
8298if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then
8299  tcl_ok=yes
8300else
8301  tcl_ok=no
8302fi
8303
8304	    fi
8305
8306	    if test "$tcl_ok" = "yes"; then
8307		# The space is needed
8308		THREADS_LIBS=" -lpthread"
8309	    else
8310		{ echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5
8311echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6; }
8312if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then
8313  echo $ECHO_N "(cached) $ECHO_C" >&6
8314else
8315  ac_check_lib_save_LIBS=$LIBS
8316LIBS="-lpthreads  $LIBS"
8317cat >conftest.$ac_ext <<_ACEOF
8318/* confdefs.h.  */
8319_ACEOF
8320cat confdefs.h >>conftest.$ac_ext
8321cat >>conftest.$ac_ext <<_ACEOF
8322/* end confdefs.h.  */
8323
8324/* Override any GCC internal prototype to avoid an error.
8325   Use char because int might match the return type of a GCC
8326   builtin and then its argument prototype would still apply.  */
8327#ifdef __cplusplus
8328extern "C"
8329#endif
8330char pthread_mutex_init ();
8331int
8332main ()
8333{
8334return pthread_mutex_init ();
8335  ;
8336  return 0;
8337}
8338_ACEOF
8339rm -f conftest.$ac_objext conftest$ac_exeext
8340if { (ac_try="$ac_link"
8341case "(($ac_try" in
8342  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8343  *) ac_try_echo=$ac_try;;
8344esac
8345eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8346  (eval "$ac_link") 2>conftest.er1
8347  ac_status=$?
8348  grep -v '^ *+' conftest.er1 >conftest.err
8349  rm -f conftest.er1
8350  cat conftest.err >&5
8351  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8352  (exit $ac_status); } && {
8353	 test -z "$ac_c_werror_flag" ||
8354	 test ! -s conftest.err
8355       } && test -s conftest$ac_exeext &&
8356       $as_test_x conftest$ac_exeext; then
8357  ac_cv_lib_pthreads_pthread_mutex_init=yes
8358else
8359  echo "$as_me: failed program was:" >&5
8360sed 's/^/| /' conftest.$ac_ext >&5
8361
8362	ac_cv_lib_pthreads_pthread_mutex_init=no
8363fi
8364
8365rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8366      conftest$ac_exeext conftest.$ac_ext
8367LIBS=$ac_check_lib_save_LIBS
8368fi
8369{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5
8370echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6; }
8371if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then
8372  tcl_ok=yes
8373else
8374  tcl_ok=no
8375fi
8376
8377		if test "$tcl_ok" = "yes"; then
8378		    # The space is needed
8379		    THREADS_LIBS=" -lpthreads"
8380		else
8381		    { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5
8382echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6; }
8383if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then
8384  echo $ECHO_N "(cached) $ECHO_C" >&6
8385else
8386  ac_check_lib_save_LIBS=$LIBS
8387LIBS="-lc  $LIBS"
8388cat >conftest.$ac_ext <<_ACEOF
8389/* confdefs.h.  */
8390_ACEOF
8391cat confdefs.h >>conftest.$ac_ext
8392cat >>conftest.$ac_ext <<_ACEOF
8393/* end confdefs.h.  */
8394
8395/* Override any GCC internal prototype to avoid an error.
8396   Use char because int might match the return type of a GCC
8397   builtin and then its argument prototype would still apply.  */
8398#ifdef __cplusplus
8399extern "C"
8400#endif
8401char pthread_mutex_init ();
8402int
8403main ()
8404{
8405return pthread_mutex_init ();
8406  ;
8407  return 0;
8408}
8409_ACEOF
8410rm -f conftest.$ac_objext conftest$ac_exeext
8411if { (ac_try="$ac_link"
8412case "(($ac_try" in
8413  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8414  *) ac_try_echo=$ac_try;;
8415esac
8416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8417  (eval "$ac_link") 2>conftest.er1
8418  ac_status=$?
8419  grep -v '^ *+' conftest.er1 >conftest.err
8420  rm -f conftest.er1
8421  cat conftest.err >&5
8422  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8423  (exit $ac_status); } && {
8424	 test -z "$ac_c_werror_flag" ||
8425	 test ! -s conftest.err
8426       } && test -s conftest$ac_exeext &&
8427       $as_test_x conftest$ac_exeext; then
8428  ac_cv_lib_c_pthread_mutex_init=yes
8429else
8430  echo "$as_me: failed program was:" >&5
8431sed 's/^/| /' conftest.$ac_ext >&5
8432
8433	ac_cv_lib_c_pthread_mutex_init=no
8434fi
8435
8436rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8437      conftest$ac_exeext conftest.$ac_ext
8438LIBS=$ac_check_lib_save_LIBS
8439fi
8440{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5
8441echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6; }
8442if test $ac_cv_lib_c_pthread_mutex_init = yes; then
8443  tcl_ok=yes
8444else
8445  tcl_ok=no
8446fi
8447
8448		    if test "$tcl_ok" = "no"; then
8449			{ echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5
8450echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6; }
8451if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then
8452  echo $ECHO_N "(cached) $ECHO_C" >&6
8453else
8454  ac_check_lib_save_LIBS=$LIBS
8455LIBS="-lc_r  $LIBS"
8456cat >conftest.$ac_ext <<_ACEOF
8457/* confdefs.h.  */
8458_ACEOF
8459cat confdefs.h >>conftest.$ac_ext
8460cat >>conftest.$ac_ext <<_ACEOF
8461/* end confdefs.h.  */
8462
8463/* Override any GCC internal prototype to avoid an error.
8464   Use char because int might match the return type of a GCC
8465   builtin and then its argument prototype would still apply.  */
8466#ifdef __cplusplus
8467extern "C"
8468#endif
8469char pthread_mutex_init ();
8470int
8471main ()
8472{
8473return pthread_mutex_init ();
8474  ;
8475  return 0;
8476}
8477_ACEOF
8478rm -f conftest.$ac_objext conftest$ac_exeext
8479if { (ac_try="$ac_link"
8480case "(($ac_try" in
8481  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8482  *) ac_try_echo=$ac_try;;
8483esac
8484eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8485  (eval "$ac_link") 2>conftest.er1
8486  ac_status=$?
8487  grep -v '^ *+' conftest.er1 >conftest.err
8488  rm -f conftest.er1
8489  cat conftest.err >&5
8490  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8491  (exit $ac_status); } && {
8492	 test -z "$ac_c_werror_flag" ||
8493	 test ! -s conftest.err
8494       } && test -s conftest$ac_exeext &&
8495       $as_test_x conftest$ac_exeext; then
8496  ac_cv_lib_c_r_pthread_mutex_init=yes
8497else
8498  echo "$as_me: failed program was:" >&5
8499sed 's/^/| /' conftest.$ac_ext >&5
8500
8501	ac_cv_lib_c_r_pthread_mutex_init=no
8502fi
8503
8504rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8505      conftest$ac_exeext conftest.$ac_ext
8506LIBS=$ac_check_lib_save_LIBS
8507fi
8508{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5
8509echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6; }
8510if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then
8511  tcl_ok=yes
8512else
8513  tcl_ok=no
8514fi
8515
8516			if test "$tcl_ok" = "yes"; then
8517			    # The space is needed
8518			    THREADS_LIBS=" -pthread"
8519			else
8520			    TCL_THREADS=0
8521			    { echo "$as_me:$LINENO: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&5
8522echo "$as_me: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&2;}
8523			fi
8524		    fi
8525		fi
8526	    fi
8527	fi
8528    else
8529	TCL_THREADS=0
8530    fi
8531    # Do checking message here to not mess up interleaved configure output
8532    { echo "$as_me:$LINENO: checking for building with threads" >&5
8533echo $ECHO_N "checking for building with threads... $ECHO_C" >&6; }
8534    if test "${TCL_THREADS}" = 1; then
8535
8536cat >>confdefs.h <<\_ACEOF
8537#define TCL_THREADS 1
8538_ACEOF
8539
8540	{ echo "$as_me:$LINENO: result: yes (default)" >&5
8541echo "${ECHO_T}yes (default)" >&6; }
8542    else
8543	{ echo "$as_me:$LINENO: result: no" >&5
8544echo "${ECHO_T}no" >&6; }
8545    fi
8546    # TCL_THREADS sanity checking.  See if our request for building with
8547    # threads is the same as the way Tcl was built.  If not, warn the user.
8548    case ${TCL_DEFS} in
8549	*THREADS=1*)
8550	    if test "${TCL_THREADS}" = "0"; then
8551		{ echo "$as_me:$LINENO: WARNING:
8552    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
8553    that IS thread-enabled.  It is recommended to use --enable-threads." >&5
8554echo "$as_me: WARNING:
8555    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
8556    that IS thread-enabled.  It is recommended to use --enable-threads." >&2;}
8557	    fi
8558	    ;;
8559	*)
8560	    if test "${TCL_THREADS}" = "1"; then
8561		{ echo "$as_me:$LINENO: WARNING:
8562    --enable-threads requested, but building against a Tcl that is NOT
8563    thread-enabled.  This is an OK configuration that will also run in
8564    a thread-enabled core." >&5
8565echo "$as_me: WARNING:
8566    --enable-threads requested, but building against a Tcl that is NOT
8567    thread-enabled.  This is an OK configuration that will also run in
8568    a thread-enabled core." >&2;}
8569	    fi
8570	    ;;
8571    esac
8572
8573
8574
8575#--------------------------------------------------------------------
8576# The statement below defines a collection of symbols related to
8577# building as a shared library instead of a static library.
8578#--------------------------------------------------------------------
8579
8580
8581    { echo "$as_me:$LINENO: checking how to build libraries" >&5
8582echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6; }
8583    # Check whether --enable-shared was given.
8584if test "${enable_shared+set}" = set; then
8585  enableval=$enable_shared; tcl_ok=$enableval
8586else
8587  tcl_ok=yes
8588fi
8589
8590
8591    if test "${enable_shared+set}" = set; then
8592	enableval="$enable_shared"
8593	tcl_ok=$enableval
8594    else
8595	tcl_ok=yes
8596    fi
8597
8598    if test "$tcl_ok" = "yes" ; then
8599	{ echo "$as_me:$LINENO: result: shared" >&5
8600echo "${ECHO_T}shared" >&6; }
8601	SHARED_BUILD=1
8602    else
8603	{ echo "$as_me:$LINENO: result: static" >&5
8604echo "${ECHO_T}static" >&6; }
8605	SHARED_BUILD=0
8606
8607cat >>confdefs.h <<\_ACEOF
8608#define STATIC_BUILD 1
8609_ACEOF
8610
8611    fi
8612
8613
8614
8615#--------------------------------------------------------------------
8616# This macro figures out what flags to use with the compiler/linker
8617# when building shared/static debug/optimized objects.  This information
8618# can be taken from the tclConfig.sh file, but this figures it all out.
8619#--------------------------------------------------------------------
8620
8621
8622
8623
8624    # Step 0.a: Enable 64 bit support?
8625
8626    { echo "$as_me:$LINENO: checking if 64bit support is requested" >&5
8627echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6; }
8628    # Check whether --enable-64bit was given.
8629if test "${enable_64bit+set}" = set; then
8630  enableval=$enable_64bit; do64bit=$enableval
8631else
8632  do64bit=no
8633fi
8634
8635    { echo "$as_me:$LINENO: result: $do64bit" >&5
8636echo "${ECHO_T}$do64bit" >&6; }
8637
8638    # Step 0.b: Enable Solaris 64 bit VIS support?
8639
8640    { echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5
8641echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6; }
8642    # Check whether --enable-64bit-vis was given.
8643if test "${enable_64bit_vis+set}" = set; then
8644  enableval=$enable_64bit_vis; do64bitVIS=$enableval
8645else
8646  do64bitVIS=no
8647fi
8648
8649    { echo "$as_me:$LINENO: result: $do64bitVIS" >&5
8650echo "${ECHO_T}$do64bitVIS" >&6; }
8651    # Force 64bit on with VIS
8652    if test "$do64bitVIS" = "yes"; then
8653  do64bit=yes
8654fi
8655
8656
8657    # Step 0.c: Check if visibility support is available. Do this here so
8658    # that platform specific alternatives can be used below if this fails.
8659
8660    { echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5
8661echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6; }
8662if test "${tcl_cv_cc_visibility_hidden+set}" = set; then
8663  echo $ECHO_N "(cached) $ECHO_C" >&6
8664else
8665
8666	hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
8667	cat >conftest.$ac_ext <<_ACEOF
8668/* confdefs.h.  */
8669_ACEOF
8670cat confdefs.h >>conftest.$ac_ext
8671cat >>conftest.$ac_ext <<_ACEOF
8672/* end confdefs.h.  */
8673
8674	    extern __attribute__((__visibility__("hidden"))) void f(void);
8675	    void f(void) {}
8676int
8677main ()
8678{
8679f();
8680  ;
8681  return 0;
8682}
8683_ACEOF
8684rm -f conftest.$ac_objext conftest$ac_exeext
8685if { (ac_try="$ac_link"
8686case "(($ac_try" in
8687  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8688  *) ac_try_echo=$ac_try;;
8689esac
8690eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8691  (eval "$ac_link") 2>conftest.er1
8692  ac_status=$?
8693  grep -v '^ *+' conftest.er1 >conftest.err
8694  rm -f conftest.er1
8695  cat conftest.err >&5
8696  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8697  (exit $ac_status); } && {
8698	 test -z "$ac_c_werror_flag" ||
8699	 test ! -s conftest.err
8700       } && test -s conftest$ac_exeext &&
8701       $as_test_x conftest$ac_exeext; then
8702  tcl_cv_cc_visibility_hidden=yes
8703else
8704  echo "$as_me: failed program was:" >&5
8705sed 's/^/| /' conftest.$ac_ext >&5
8706
8707	tcl_cv_cc_visibility_hidden=no
8708fi
8709
8710rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8711      conftest$ac_exeext conftest.$ac_ext
8712	CFLAGS=$hold_cflags
8713fi
8714{ echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5
8715echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6; }
8716    if test $tcl_cv_cc_visibility_hidden = yes; then
8717
8718
8719cat >>confdefs.h <<\_ACEOF
8720#define MODULE_SCOPE extern __attribute__((__visibility__("hidden")))
8721_ACEOF
8722
8723
8724fi
8725
8726
8727    # Step 0.d: Disable -rpath support?
8728
8729    { echo "$as_me:$LINENO: checking if rpath support is requested" >&5
8730echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6; }
8731    # Check whether --enable-rpath was given.
8732if test "${enable_rpath+set}" = set; then
8733  enableval=$enable_rpath; doRpath=$enableval
8734else
8735  doRpath=yes
8736fi
8737
8738    { echo "$as_me:$LINENO: result: $doRpath" >&5
8739echo "${ECHO_T}$doRpath" >&6; }
8740
8741    # TEA specific: Cross-compiling options for Windows/CE builds?
8742
8743    if test "${TEA_PLATFORM}" = windows; then
8744
8745	{ echo "$as_me:$LINENO: checking if Windows/CE build is requested" >&5
8746echo $ECHO_N "checking if Windows/CE build is requested... $ECHO_C" >&6; }
8747	# Check whether --enable-wince was given.
8748if test "${enable_wince+set}" = set; then
8749  enableval=$enable_wince; doWince=$enableval
8750else
8751  doWince=no
8752fi
8753
8754	{ echo "$as_me:$LINENO: result: $doWince" >&5
8755echo "${ECHO_T}$doWince" >&6; }
8756
8757fi
8758
8759
8760    # Set the variable "system" to hold the name and version number
8761    # for the system.
8762
8763
8764    { echo "$as_me:$LINENO: checking system version" >&5
8765echo $ECHO_N "checking system version... $ECHO_C" >&6; }
8766if test "${tcl_cv_sys_version+set}" = set; then
8767  echo $ECHO_N "(cached) $ECHO_C" >&6
8768else
8769
8770	# TEA specific:
8771	if test "${TEA_PLATFORM}" = "windows" ; then
8772	    tcl_cv_sys_version=windows
8773	else
8774	    tcl_cv_sys_version=`uname -s`-`uname -r`
8775	    if test "$?" -ne 0 ; then
8776		{ echo "$as_me:$LINENO: WARNING: can't find uname command" >&5
8777echo "$as_me: WARNING: can't find uname command" >&2;}
8778		tcl_cv_sys_version=unknown
8779	    else
8780		if test "`uname -s`" = "AIX" ; then
8781		    tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
8782		fi
8783	    fi
8784	fi
8785
8786fi
8787{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5
8788echo "${ECHO_T}$tcl_cv_sys_version" >&6; }
8789    system=$tcl_cv_sys_version
8790
8791
8792    # Require ranlib early so we can override it in special cases below.
8793
8794
8795
8796    # Set configuration options based on system name and version.
8797    # This is similar to Tcl's unix/tcl.m4 except that we've added a
8798    # "windows" case and removed some core-only vars.
8799
8800    do64bit_ok=no
8801    # default to '{$LIBS}' and set to "" on per-platform necessary basis
8802    SHLIB_LD_LIBS='${LIBS}'
8803    # When ld needs options to work in 64-bit mode, put them in
8804    # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
8805    # is disabled by the user. [Bug 1016796]
8806    LDFLAGS_ARCH=""
8807    UNSHARED_LIB_SUFFIX=""
8808    # TEA specific: use PACKAGE_VERSION instead of VERSION
8809    TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
8810    ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
8811    TCL_LIB_VERSIONS_OK=ok
8812    CFLAGS_DEBUG=-g
8813    CFLAGS_OPTIMIZE=-O
8814    if test "$GCC" = yes; then
8815
8816	# TEA specific:
8817	CFLAGS_OPTIMIZE=-O2
8818	CFLAGS_WARNING="-Wall"
8819
8820else
8821  CFLAGS_WARNING=""
8822fi
8823
8824    # Extract the first word of "ar", so it can be a program name with args.
8825set dummy ar; ac_word=$2
8826{ echo "$as_me:$LINENO: checking for $ac_word" >&5
8827echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
8828if test "${ac_cv_prog_AR+set}" = set; then
8829  echo $ECHO_N "(cached) $ECHO_C" >&6
8830else
8831  if test -n "$AR"; then
8832  ac_cv_prog_AR="$AR" # Let the user override the test.
8833else
8834as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8835for as_dir in $PATH
8836do
8837  IFS=$as_save_IFS
8838  test -z "$as_dir" && as_dir=.
8839  for ac_exec_ext in '' $ac_executable_extensions; do
8840  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8841    ac_cv_prog_AR="ar"
8842    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8843    break 2
8844  fi
8845done
8846done
8847IFS=$as_save_IFS
8848
8849fi
8850fi
8851AR=$ac_cv_prog_AR
8852if test -n "$AR"; then
8853  { echo "$as_me:$LINENO: result: $AR" >&5
8854echo "${ECHO_T}$AR" >&6; }
8855else
8856  { echo "$as_me:$LINENO: result: no" >&5
8857echo "${ECHO_T}no" >&6; }
8858fi
8859
8860
8861    STLIB_LD='${AR} cr'
8862    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
8863    if test "x$SHLIB_VERSION" = x; then
8864  SHLIB_VERSION="1.0"
8865fi
8866
8867    case $system in
8868	# TEA specific:
8869	windows)
8870	    # This is a 2-stage check to make sure we have the 64-bit SDK
8871	    # We have to know where the SDK is installed.
8872	    # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
8873	    # MACHINE is IX86 for LINK, but this is used by the manifest,
8874	    # which requires x86|amd64|ia64.
8875	    MACHINE="X86"
8876	    if test "$do64bit" != "no" ; then
8877		if test "x${MSSDK}x" = "xx" ; then
8878		    MSSDK="C:/Progra~1/Microsoft Platform SDK"
8879		fi
8880		MSSDK=`echo "$MSSDK" | sed -e  's!\\\!/!g'`
8881		PATH64=""
8882		case "$do64bit" in
8883		    amd64|x64|yes)
8884			MACHINE="AMD64" ; # default to AMD64 64-bit build
8885			PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
8886			;;
8887		    ia64)
8888			MACHINE="IA64"
8889			PATH64="${MSSDK}/Bin/Win64"
8890			;;
8891		esac
8892		if test ! -d "${PATH64}" ; then
8893		    { echo "$as_me:$LINENO: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&5
8894echo "$as_me: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&2;}
8895		    { echo "$as_me:$LINENO: WARNING: Ensure latest Platform SDK is installed" >&5
8896echo "$as_me: WARNING: Ensure latest Platform SDK is installed" >&2;}
8897		    do64bit="no"
8898		else
8899		    { echo "$as_me:$LINENO: result:    Using 64-bit $MACHINE mode" >&5
8900echo "${ECHO_T}   Using 64-bit $MACHINE mode" >&6; }
8901		    do64bit_ok="yes"
8902		fi
8903	    fi
8904
8905	    if test "$doWince" != "no" ; then
8906		if test "$do64bit" != "no" ; then
8907		    { { echo "$as_me:$LINENO: error: Windows/CE and 64-bit builds incompatible" >&5
8908echo "$as_me: error: Windows/CE and 64-bit builds incompatible" >&2;}
8909   { (exit 1); exit 1; }; }
8910		fi
8911		if test "$GCC" = "yes" ; then
8912		    { { echo "$as_me:$LINENO: error: Windows/CE and GCC builds incompatible" >&5
8913echo "$as_me: error: Windows/CE and GCC builds incompatible" >&2;}
8914   { (exit 1); exit 1; }; }
8915		fi
8916
8917    # First, look for one uninstalled.
8918    # the alternative search directory is invoked by --with-celib
8919
8920    if test x"${no_celib}" = x ; then
8921	# we reset no_celib in case something fails here
8922	no_celib=true
8923
8924# Check whether --with-celib was given.
8925if test "${with_celib+set}" = set; then
8926  withval=$with_celib; with_celibconfig=${withval}
8927fi
8928
8929	{ echo "$as_me:$LINENO: checking for Windows/CE celib directory" >&5
8930echo $ECHO_N "checking for Windows/CE celib directory... $ECHO_C" >&6; }
8931	if test "${ac_cv_c_celibconfig+set}" = set; then
8932  echo $ECHO_N "(cached) $ECHO_C" >&6
8933else
8934
8935	    # First check to see if --with-celibconfig was specified.
8936	    if test x"${with_celibconfig}" != x ; then
8937		if test -d "${with_celibconfig}/inc" ; then
8938		    ac_cv_c_celibconfig=`(cd ${with_celibconfig}; pwd)`
8939		else
8940		    { { echo "$as_me:$LINENO: error: ${with_celibconfig} directory doesn't contain inc directory" >&5
8941echo "$as_me: error: ${with_celibconfig} directory doesn't contain inc directory" >&2;}
8942   { (exit 1); exit 1; }; }
8943		fi
8944	    fi
8945
8946	    # then check for a celib library
8947	    if test x"${ac_cv_c_celibconfig}" = x ; then
8948		for i in \
8949			../celib-palm-3.0 \
8950			../celib \
8951			../../celib-palm-3.0 \
8952			../../celib \
8953			`ls -dr ../celib-*3.[0-9]* 2>/dev/null` \
8954			${srcdir}/../celib-palm-3.0 \
8955			${srcdir}/../celib \
8956			`ls -dr ${srcdir}/../celib-*3.[0-9]* 2>/dev/null` \
8957			; do
8958		    if test -d "$i/inc" ; then
8959			ac_cv_c_celibconfig=`(cd $i; pwd)`
8960			break
8961		    fi
8962		done
8963	    fi
8964
8965fi
8966
8967	if test x"${ac_cv_c_celibconfig}" = x ; then
8968	    { { echo "$as_me:$LINENO: error: Cannot find celib support library directory" >&5
8969echo "$as_me: error: Cannot find celib support library directory" >&2;}
8970   { (exit 1); exit 1; }; }
8971	else
8972	    no_celib=
8973	    CELIB_DIR=${ac_cv_c_celibconfig}
8974	    CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
8975	    { echo "$as_me:$LINENO: result: found $CELIB_DIR" >&5
8976echo "${ECHO_T}found $CELIB_DIR" >&6; }
8977	fi
8978    fi
8979
8980		# Set defaults for common evc4/PPC2003 setup
8981		# Currently Tcl requires 300+, possibly 420+ for sockets
8982		CEVERSION=420; 		# could be 211 300 301 400 420 ...
8983		TARGETCPU=ARMV4;	# could be ARMV4 ARM MIPS SH3 X86 ...
8984		ARCH=ARM;		# could be ARM MIPS X86EM ...
8985		PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002"
8986		if test "$doWince" != "yes"; then
8987		    # If !yes then the user specified something
8988		    # Reset ARCH to allow user to skip specifying it
8989		    ARCH=
8990		    eval `echo $doWince | awk -F, '{ \
8991	    if (length($1)) { printf "CEVERSION=\"%s\"\n", $1; \
8992	    if ($1 < 400)   { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \
8993	    if (length($2)) { printf "TARGETCPU=\"%s\"\n", toupper($2) }; \
8994	    if (length($3)) { printf "ARCH=\"%s\"\n", toupper($3) }; \
8995	    if (length($4)) { printf "PLATFORM=\"%s\"\n", $4 }; \
8996		    }'`
8997		    if test "x${ARCH}" = "x" ; then
8998			ARCH=$TARGETCPU;
8999		    fi
9000		fi
9001		OSVERSION=WCE$CEVERSION;
9002	    	if test "x${WCEROOT}" = "x" ; then
9003			WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0"
9004		    if test ! -d "${WCEROOT}" ; then
9005			WCEROOT="C:/Program Files/Microsoft eMbedded Tools"
9006		    fi
9007		fi
9008		if test "x${SDKROOT}" = "x" ; then
9009		    SDKROOT="C:/Program Files/Windows CE Tools"
9010		    if test ! -d "${SDKROOT}" ; then
9011			SDKROOT="C:/Windows CE Tools"
9012		    fi
9013		fi
9014		WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'`
9015		SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
9016		if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \
9017		    -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then
9018		    { { echo "$as_me:$LINENO: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&5
9019echo "$as_me: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&2;}
9020   { (exit 1); exit 1; }; }
9021		    doWince="no"
9022		else
9023		    # We could PATH_NOSPACE these, but that's not important,
9024		    # as long as we quote them when used.
9025		    CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include"
9026		    if test -d "${CEINCLUDE}/${TARGETCPU}" ; then
9027			CEINCLUDE="${CEINCLUDE}/${TARGETCPU}"
9028		    fi
9029		    CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}"
9030    		fi
9031	    fi
9032
9033	    if test "$GCC" != "yes" ; then
9034	        if test "${SHARED_BUILD}" = "0" ; then
9035		    runtime=-MT
9036	        else
9037		    runtime=-MD
9038	        fi
9039
9040                if test "$do64bit" != "no" ; then
9041		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
9042		    CC="\"${PATH64}/cl.exe\""
9043		    CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
9044		    RC="\"${MSSDK}/bin/rc.exe\""
9045		    lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
9046		    LINKBIN="\"${PATH64}/link.exe\""
9047		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
9048		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
9049		    # Avoid 'unresolved external symbol __security_cookie'
9050		    # errors, c.f. http://support.microsoft.com/?id=894573
9051
9052    vars="bufferoverflowU.lib"
9053    for i in $vars; do
9054	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
9055	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
9056	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
9057	fi
9058	PKG_LIBS="$PKG_LIBS $i"
9059    done
9060
9061
9062		elif test "$doWince" != "no" ; then
9063		    CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin"
9064		    if test "${TARGETCPU}" = "X86"; then
9065			CC="\"${CEBINROOT}/cl.exe\""
9066		    else
9067			CC="\"${CEBINROOT}/cl${ARCH}.exe\""
9068		    fi
9069		    CFLAGS="$CFLAGS -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\""
9070		    RC="\"${WCEROOT}/Common/EVC/bin/rc.exe\""
9071		    arch=`echo ${ARCH} | awk '{print tolower($0)}'`
9072		    defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _WINDOWS"
9073		    if test "${SHARED_BUILD}" = "1" ; then
9074			# Static CE builds require static celib as well
9075		    	defs="${defs} _DLL"
9076		    fi
9077		    for i in $defs ; do
9078
9079cat >>confdefs.h <<_ACEOF
9080#define $i 1
9081_ACEOF
9082
9083		    done
9084
9085cat >>confdefs.h <<_ACEOF
9086#define _WIN32_WCE $CEVERSION
9087_ACEOF
9088
9089
9090cat >>confdefs.h <<_ACEOF
9091#define UNDER_CE $CEVERSION
9092_ACEOF
9093
9094		    CFLAGS_DEBUG="-nologo -Zi -Od"
9095		    CFLAGS_OPTIMIZE="-nologo -Ox"
9096		    lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'`
9097		    lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
9098		    LINKBIN="\"${CEBINROOT}/link.exe\""
9099
9100		else
9101		    RC="rc"
9102		    lflags="-nologo"
9103    		    LINKBIN="link"
9104		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
9105		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
9106		fi
9107	    fi
9108
9109	    if test "$GCC" = "yes"; then
9110		# mingw gcc mode
9111		RC="windres"
9112		CFLAGS_DEBUG="-g"
9113		CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
9114		SHLIB_LD="$CC -shared"
9115		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
9116		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
9117		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
9118	    else
9119		SHLIB_LD="${LINKBIN} -dll ${lflags}"
9120		# link -lib only works when -lib is the first arg
9121		STLIB_LD="${LINKBIN} -lib ${lflags}"
9122		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib'
9123		PATHTYPE=-w
9124		# For information on what debugtype is most useful, see:
9125		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
9126		# and also
9127		# http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx
9128		# This essentially turns it all on.
9129		LDFLAGS_DEBUG="-debug -debugtype:cv"
9130		LDFLAGS_OPTIMIZE="-release"
9131		if test "$doWince" != "no" ; then
9132		    LDFLAGS_CONSOLE="-link ${lflags}"
9133		    LDFLAGS_WINDOW=${LDFLAGS_CONSOLE}
9134		else
9135		    LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
9136		    LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
9137		fi
9138	    fi
9139
9140	    SHLIB_SUFFIX=".dll"
9141	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
9142
9143	    TCL_LIB_VERSIONS_OK=nodots
9144    	    ;;
9145	AIX-*)
9146	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"; then
9147
9148		# AIX requires the _r compiler when gcc isn't being used
9149		case "${CC}" in
9150		    *_r|*_r\ *)
9151			# ok ...
9152			;;
9153		    *)
9154			# Make sure only first arg gets _r
9155		    	CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'`
9156			;;
9157		esac
9158		{ echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5
9159echo "${ECHO_T}Using $CC for compiling with threads" >&6; }
9160
9161fi
9162
9163	    LIBS="$LIBS -lc"
9164	    SHLIB_CFLAGS=""
9165	    SHLIB_SUFFIX=".so"
9166
9167	    LD_LIBRARY_PATH_VAR="LIBPATH"
9168
9169	    # Check to enable 64-bit flags for compiler/linker
9170	    if test "$do64bit" = yes; then
9171
9172		if test "$GCC" = yes; then
9173
9174		    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
9175echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
9176
9177else
9178
9179		    do64bit_ok=yes
9180		    CFLAGS="$CFLAGS -q64"
9181		    LDFLAGS_ARCH="-q64"
9182		    RANLIB="${RANLIB} -X64"
9183		    AR="${AR} -X64"
9184		    SHLIB_LD_FLAGS="-b64"
9185
9186fi
9187
9188
9189fi
9190
9191
9192	    if test "`uname -m`" = ia64; then
9193
9194		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
9195		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
9196		if test "$GCC" = yes; then
9197
9198		    CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
9199
9200else
9201
9202		    CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
9203
9204fi
9205
9206		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
9207
9208else
9209
9210		if test "$GCC" = yes; then
9211
9212		    SHLIB_LD='${CC} -shared -Wl,-bexpall'
9213
9214else
9215
9216		    SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bexpall -H512 -T512 -bnoentry"
9217		    LDFLAGS="$LDFLAGS -brtl"
9218
9219fi
9220
9221		SHLIB_LD="${SHLIB_LD} ${SHLIB_LD_FLAGS}"
9222		CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
9223		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9224
9225fi
9226
9227	    ;;
9228	BeOS*)
9229	    SHLIB_CFLAGS="-fPIC"
9230	    SHLIB_LD='${CC} -nostart'
9231	    SHLIB_SUFFIX=".so"
9232
9233	    #-----------------------------------------------------------
9234	    # Check for inet_ntoa in -lbind, for BeOS (which also needs
9235	    # -lsocket, even if the network functions are in -lnet which
9236	    # is always linked to, for compatibility.
9237	    #-----------------------------------------------------------
9238	    { echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5
9239echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6; }
9240if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then
9241  echo $ECHO_N "(cached) $ECHO_C" >&6
9242else
9243  ac_check_lib_save_LIBS=$LIBS
9244LIBS="-lbind  $LIBS"
9245cat >conftest.$ac_ext <<_ACEOF
9246/* confdefs.h.  */
9247_ACEOF
9248cat confdefs.h >>conftest.$ac_ext
9249cat >>conftest.$ac_ext <<_ACEOF
9250/* end confdefs.h.  */
9251
9252/* Override any GCC internal prototype to avoid an error.
9253   Use char because int might match the return type of a GCC
9254   builtin and then its argument prototype would still apply.  */
9255#ifdef __cplusplus
9256extern "C"
9257#endif
9258char inet_ntoa ();
9259int
9260main ()
9261{
9262return inet_ntoa ();
9263  ;
9264  return 0;
9265}
9266_ACEOF
9267rm -f conftest.$ac_objext conftest$ac_exeext
9268if { (ac_try="$ac_link"
9269case "(($ac_try" in
9270  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9271  *) ac_try_echo=$ac_try;;
9272esac
9273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9274  (eval "$ac_link") 2>conftest.er1
9275  ac_status=$?
9276  grep -v '^ *+' conftest.er1 >conftest.err
9277  rm -f conftest.er1
9278  cat conftest.err >&5
9279  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9280  (exit $ac_status); } && {
9281	 test -z "$ac_c_werror_flag" ||
9282	 test ! -s conftest.err
9283       } && test -s conftest$ac_exeext &&
9284       $as_test_x conftest$ac_exeext; then
9285  ac_cv_lib_bind_inet_ntoa=yes
9286else
9287  echo "$as_me: failed program was:" >&5
9288sed 's/^/| /' conftest.$ac_ext >&5
9289
9290	ac_cv_lib_bind_inet_ntoa=no
9291fi
9292
9293rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9294      conftest$ac_exeext conftest.$ac_ext
9295LIBS=$ac_check_lib_save_LIBS
9296fi
9297{ echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5
9298echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6; }
9299if test $ac_cv_lib_bind_inet_ntoa = yes; then
9300  LIBS="$LIBS -lbind -lsocket"
9301fi
9302
9303	    ;;
9304	BSD/OS-4.*)
9305	    SHLIB_CFLAGS="-export-dynamic -fPIC"
9306	    SHLIB_LD='${CC} -shared'
9307	    SHLIB_SUFFIX=".so"
9308	    LDFLAGS="$LDFLAGS -export-dynamic"
9309	    CC_SEARCH_FLAGS=""
9310	    LD_SEARCH_FLAGS=""
9311	    ;;
9312	CYGWIN_*)
9313	    SHLIB_CFLAGS=""
9314	    SHLIB_LD='${CC} -shared'
9315	    SHLIB_SUFFIX=".dll"
9316	    EXE_SUFFIX=".exe"
9317	    CC_SEARCH_FLAGS=""
9318	    LD_SEARCH_FLAGS=""
9319	    ;;
9320	Haiku*)
9321	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
9322	    SHLIB_CFLAGS="-fPIC"
9323	    SHLIB_SUFFIX=".so"
9324	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
9325	    { echo "$as_me:$LINENO: checking for inet_ntoa in -lnetwork" >&5
9326echo $ECHO_N "checking for inet_ntoa in -lnetwork... $ECHO_C" >&6; }
9327if test "${ac_cv_lib_network_inet_ntoa+set}" = set; then
9328  echo $ECHO_N "(cached) $ECHO_C" >&6
9329else
9330  ac_check_lib_save_LIBS=$LIBS
9331LIBS="-lnetwork  $LIBS"
9332cat >conftest.$ac_ext <<_ACEOF
9333/* confdefs.h.  */
9334_ACEOF
9335cat confdefs.h >>conftest.$ac_ext
9336cat >>conftest.$ac_ext <<_ACEOF
9337/* end confdefs.h.  */
9338
9339/* Override any GCC internal prototype to avoid an error.
9340   Use char because int might match the return type of a GCC
9341   builtin and then its argument prototype would still apply.  */
9342#ifdef __cplusplus
9343extern "C"
9344#endif
9345char inet_ntoa ();
9346int
9347main ()
9348{
9349return inet_ntoa ();
9350  ;
9351  return 0;
9352}
9353_ACEOF
9354rm -f conftest.$ac_objext conftest$ac_exeext
9355if { (ac_try="$ac_link"
9356case "(($ac_try" in
9357  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9358  *) ac_try_echo=$ac_try;;
9359esac
9360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9361  (eval "$ac_link") 2>conftest.er1
9362  ac_status=$?
9363  grep -v '^ *+' conftest.er1 >conftest.err
9364  rm -f conftest.er1
9365  cat conftest.err >&5
9366  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9367  (exit $ac_status); } && {
9368	 test -z "$ac_c_werror_flag" ||
9369	 test ! -s conftest.err
9370       } && test -s conftest$ac_exeext &&
9371       $as_test_x conftest$ac_exeext; then
9372  ac_cv_lib_network_inet_ntoa=yes
9373else
9374  echo "$as_me: failed program was:" >&5
9375sed 's/^/| /' conftest.$ac_ext >&5
9376
9377	ac_cv_lib_network_inet_ntoa=no
9378fi
9379
9380rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9381      conftest$ac_exeext conftest.$ac_ext
9382LIBS=$ac_check_lib_save_LIBS
9383fi
9384{ echo "$as_me:$LINENO: result: $ac_cv_lib_network_inet_ntoa" >&5
9385echo "${ECHO_T}$ac_cv_lib_network_inet_ntoa" >&6; }
9386if test $ac_cv_lib_network_inet_ntoa = yes; then
9387  LIBS="$LIBS -lnetwork"
9388fi
9389
9390	    ;;
9391	HP-UX-*.11.*)
9392	    # Use updated header definitions where possible
9393
9394cat >>confdefs.h <<\_ACEOF
9395#define _XOPEN_SOURCE_EXTENDED 1
9396_ACEOF
9397
9398	    # TEA specific: Needed by Tcl, but not most extensions
9399	    #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
9400	    #LIBS="$LIBS -lxnet"               # Use the XOPEN network library
9401
9402	    if test "`uname -m`" = ia64; then
9403
9404		SHLIB_SUFFIX=".so"
9405		# Use newer C++ library for C++ extensions
9406		#if test "$GCC" != "yes" ; then
9407		#   CPPFLAGS="-AA"
9408		#fi
9409
9410else
9411
9412		SHLIB_SUFFIX=".sl"
9413
9414fi
9415
9416	    { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9417echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
9418if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9419  echo $ECHO_N "(cached) $ECHO_C" >&6
9420else
9421  ac_check_lib_save_LIBS=$LIBS
9422LIBS="-ldld  $LIBS"
9423cat >conftest.$ac_ext <<_ACEOF
9424/* confdefs.h.  */
9425_ACEOF
9426cat confdefs.h >>conftest.$ac_ext
9427cat >>conftest.$ac_ext <<_ACEOF
9428/* end confdefs.h.  */
9429
9430/* Override any GCC internal prototype to avoid an error.
9431   Use char because int might match the return type of a GCC
9432   builtin and then its argument prototype would still apply.  */
9433#ifdef __cplusplus
9434extern "C"
9435#endif
9436char shl_load ();
9437int
9438main ()
9439{
9440return shl_load ();
9441  ;
9442  return 0;
9443}
9444_ACEOF
9445rm -f conftest.$ac_objext conftest$ac_exeext
9446if { (ac_try="$ac_link"
9447case "(($ac_try" in
9448  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9449  *) ac_try_echo=$ac_try;;
9450esac
9451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9452  (eval "$ac_link") 2>conftest.er1
9453  ac_status=$?
9454  grep -v '^ *+' conftest.er1 >conftest.err
9455  rm -f conftest.er1
9456  cat conftest.err >&5
9457  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9458  (exit $ac_status); } && {
9459	 test -z "$ac_c_werror_flag" ||
9460	 test ! -s conftest.err
9461       } && test -s conftest$ac_exeext &&
9462       $as_test_x conftest$ac_exeext; then
9463  ac_cv_lib_dld_shl_load=yes
9464else
9465  echo "$as_me: failed program was:" >&5
9466sed 's/^/| /' conftest.$ac_ext >&5
9467
9468	ac_cv_lib_dld_shl_load=no
9469fi
9470
9471rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9472      conftest$ac_exeext conftest.$ac_ext
9473LIBS=$ac_check_lib_save_LIBS
9474fi
9475{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9476echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
9477if test $ac_cv_lib_dld_shl_load = yes; then
9478  tcl_ok=yes
9479else
9480  tcl_ok=no
9481fi
9482
9483	    if test "$tcl_ok" = yes; then
9484
9485		LDFLAGS="$LDFLAGS -E"
9486		CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
9487		LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
9488		LD_LIBRARY_PATH_VAR="SHLIB_PATH"
9489
9490fi
9491
9492	    if test "$GCC" = yes; then
9493
9494		SHLIB_LD='${CC} -shared'
9495		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9496
9497else
9498
9499		CFLAGS="$CFLAGS -z"
9500		# Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
9501		#CFLAGS="$CFLAGS +DAportable"
9502		SHLIB_CFLAGS="+z"
9503		SHLIB_LD="ld -b"
9504
9505fi
9506
9507
9508	    # Check to enable 64-bit flags for compiler/linker
9509	    if test "$do64bit" = "yes"; then
9510
9511		if test "$GCC" = yes; then
9512
9513		    case `${CC} -dumpmachine` in
9514			hppa64*)
9515			    # 64-bit gcc in use.  Fix flags for GNU ld.
9516			    do64bit_ok=yes
9517			    SHLIB_LD='${CC} -shared'
9518			    if test $doRpath = yes; then
9519
9520				CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9521fi
9522
9523			    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9524			    ;;
9525			*)
9526			    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
9527echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
9528			    ;;
9529		    esac
9530
9531else
9532
9533		    do64bit_ok=yes
9534		    CFLAGS="$CFLAGS +DD64"
9535		    LDFLAGS_ARCH="+DD64"
9536
9537fi
9538
9539
9540fi
9541 ;;
9542	IRIX-6.*)
9543	    SHLIB_CFLAGS=""
9544	    SHLIB_LD="ld -n32 -shared -rdata_shared"
9545	    SHLIB_SUFFIX=".so"
9546	    if test $doRpath = yes; then
9547
9548		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9549		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
9550fi
9551
9552	    if test "$GCC" = yes; then
9553
9554		CFLAGS="$CFLAGS -mabi=n32"
9555		LDFLAGS="$LDFLAGS -mabi=n32"
9556
9557else
9558
9559		case $system in
9560		    IRIX-6.3)
9561			# Use to build 6.2 compatible binaries on 6.3.
9562			CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
9563			;;
9564		    *)
9565			CFLAGS="$CFLAGS -n32"
9566			;;
9567		esac
9568		LDFLAGS="$LDFLAGS -n32"
9569
9570fi
9571
9572	    ;;
9573	IRIX64-6.*)
9574	    SHLIB_CFLAGS=""
9575	    SHLIB_LD="ld -n32 -shared -rdata_shared"
9576	    SHLIB_SUFFIX=".so"
9577	    if test $doRpath = yes; then
9578
9579		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9580		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
9581fi
9582
9583
9584	    # Check to enable 64-bit flags for compiler/linker
9585
9586	    if test "$do64bit" = yes; then
9587
9588	        if test "$GCC" = yes; then
9589
9590	            { echo "$as_me:$LINENO: WARNING: 64bit mode not supported by gcc" >&5
9591echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;}
9592
9593else
9594
9595	            do64bit_ok=yes
9596	            SHLIB_LD="ld -64 -shared -rdata_shared"
9597	            CFLAGS="$CFLAGS -64"
9598	            LDFLAGS_ARCH="-64"
9599
9600fi
9601
9602
9603fi
9604
9605	    ;;
9606	Linux*)
9607	    SHLIB_CFLAGS="-fPIC"
9608	    SHLIB_SUFFIX=".so"
9609
9610	    # TEA specific:
9611	    CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
9612
9613	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
9614	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}'
9615	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
9616	    if test $doRpath = yes; then
9617
9618		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9619fi
9620
9621	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9622	    if test "`uname -m`" = "alpha"; then
9623  CFLAGS="$CFLAGS -mieee"
9624fi
9625
9626	    if test $do64bit = yes; then
9627
9628		{ echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5
9629echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6; }
9630if test "${tcl_cv_cc_m64+set}" = set; then
9631  echo $ECHO_N "(cached) $ECHO_C" >&6
9632else
9633
9634		    hold_cflags=$CFLAGS
9635		    CFLAGS="$CFLAGS -m64"
9636		    cat >conftest.$ac_ext <<_ACEOF
9637/* confdefs.h.  */
9638_ACEOF
9639cat confdefs.h >>conftest.$ac_ext
9640cat >>conftest.$ac_ext <<_ACEOF
9641/* end confdefs.h.  */
9642
9643int
9644main ()
9645{
9646
9647  ;
9648  return 0;
9649}
9650_ACEOF
9651rm -f conftest.$ac_objext conftest$ac_exeext
9652if { (ac_try="$ac_link"
9653case "(($ac_try" in
9654  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9655  *) ac_try_echo=$ac_try;;
9656esac
9657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9658  (eval "$ac_link") 2>conftest.er1
9659  ac_status=$?
9660  grep -v '^ *+' conftest.er1 >conftest.err
9661  rm -f conftest.er1
9662  cat conftest.err >&5
9663  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9664  (exit $ac_status); } && {
9665	 test -z "$ac_c_werror_flag" ||
9666	 test ! -s conftest.err
9667       } && test -s conftest$ac_exeext &&
9668       $as_test_x conftest$ac_exeext; then
9669  tcl_cv_cc_m64=yes
9670else
9671  echo "$as_me: failed program was:" >&5
9672sed 's/^/| /' conftest.$ac_ext >&5
9673
9674	tcl_cv_cc_m64=no
9675fi
9676
9677rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9678      conftest$ac_exeext conftest.$ac_ext
9679		    CFLAGS=$hold_cflags
9680fi
9681{ echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5
9682echo "${ECHO_T}$tcl_cv_cc_m64" >&6; }
9683		if test $tcl_cv_cc_m64 = yes; then
9684
9685		    CFLAGS="$CFLAGS -m64"
9686		    do64bit_ok=yes
9687
9688fi
9689
9690
9691fi
9692
9693
9694	    # The combo of gcc + glibc has a bug related to inlining of
9695	    # functions like strtod(). The -fno-builtin flag should address
9696	    # this problem but it does not work. The -fno-inline flag is kind
9697	    # of overkill but it works. Disable inlining only when one of the
9698	    # files in compat/*.c is being linked in.
9699
9700	    if test x"${USE_COMPAT}" != x; then
9701  CFLAGS="$CFLAGS -fno-inline"
9702fi
9703
9704
9705	    ;;
9706	GNU*)
9707	    SHLIB_CFLAGS="-fPIC"
9708	    SHLIB_SUFFIX=".so"
9709
9710	    SHLIB_LD='${CC} -shared'
9711	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
9712	    CC_SEARCH_FLAGS=""
9713	    LD_SEARCH_FLAGS=""
9714	    if test "`uname -m`" = "alpha"; then
9715  CFLAGS="$CFLAGS -mieee"
9716fi
9717
9718	    ;;
9719	Lynx*)
9720	    SHLIB_CFLAGS="-fPIC"
9721	    SHLIB_SUFFIX=".so"
9722	    CFLAGS_OPTIMIZE=-02
9723	    SHLIB_LD='${CC} -shared'
9724	    LD_FLAGS="-Wl,--export-dynamic"
9725	    if test $doRpath = yes; then
9726
9727		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9728		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9729fi
9730
9731	    ;;
9732	OpenBSD-*)
9733	    SHLIB_CFLAGS="-fPIC"
9734	    SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
9735	    SHLIB_SUFFIX=".so"
9736	    if test $doRpath = yes; then
9737
9738		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9739fi
9740
9741	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9742	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
9743	    { echo "$as_me:$LINENO: checking for ELF" >&5
9744echo $ECHO_N "checking for ELF... $ECHO_C" >&6; }
9745if test "${tcl_cv_ld_elf+set}" = set; then
9746  echo $ECHO_N "(cached) $ECHO_C" >&6
9747else
9748
9749		cat >conftest.$ac_ext <<_ACEOF
9750/* confdefs.h.  */
9751_ACEOF
9752cat confdefs.h >>conftest.$ac_ext
9753cat >>conftest.$ac_ext <<_ACEOF
9754/* end confdefs.h.  */
9755
9756#ifdef __ELF__
9757	yes
9758#endif
9759
9760_ACEOF
9761if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9762  $EGREP "yes" >/dev/null 2>&1; then
9763  tcl_cv_ld_elf=yes
9764else
9765  tcl_cv_ld_elf=no
9766fi
9767rm -f -r conftest*
9768
9769fi
9770{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5
9771echo "${ECHO_T}$tcl_cv_ld_elf" >&6; }
9772	    if test $tcl_cv_ld_elf = yes; then
9773
9774		LDFLAGS=-Wl,-export-dynamic
9775
9776else
9777  LDFLAGS=""
9778fi
9779
9780	    if test "${TCL_THREADS}" = "1"; then
9781
9782		# OpenBSD builds and links with -pthread, never -lpthread.
9783		LIBS=`echo $LIBS | sed s/-lpthread//`
9784		CFLAGS="$CFLAGS -pthread"
9785		SHLIB_CFLAGS="$SHLIB_CFLAGS -pthread"
9786
9787fi
9788
9789	    # OpenBSD doesn't do version numbers with dots.
9790	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
9791	    TCL_LIB_VERSIONS_OK=nodots
9792	    ;;
9793	NetBSD-*|FreeBSD-[3-4].*)
9794	    # FreeBSD 3.* and greater have ELF.
9795	    # NetBSD 2.* has ELF and can use 'cc -shared' to build shared libs
9796	    SHLIB_CFLAGS="-fPIC"
9797	    SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
9798	    SHLIB_SUFFIX=".so"
9799	    LDFLAGS="$LDFLAGS -export-dynamic"
9800	    if test $doRpath = yes; then
9801
9802		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9803fi
9804
9805	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9806	    if test "${TCL_THREADS}" = "1"; then
9807
9808		# The -pthread needs to go in the CFLAGS, not LIBS
9809		LIBS=`echo $LIBS | sed s/-pthread//`
9810		CFLAGS="$CFLAGS -pthread"
9811	    	LDFLAGS="$LDFLAGS -pthread"
9812
9813fi
9814
9815	    case $system in
9816	    FreeBSD-3.*)
9817	    	# FreeBSD-3 doesn't handle version numbers with dots.
9818	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
9819	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
9820	    	TCL_LIB_VERSIONS_OK=nodots
9821		;;
9822	    esac
9823	    ;;
9824	FreeBSD-*)
9825	    # This configuration from FreeBSD Ports.
9826	    SHLIB_CFLAGS="-fPIC"
9827	    SHLIB_LD="${CC} -shared"
9828	    TCL_SHLIB_LD_EXTRAS="-soname \$@"
9829	    SHLIB_SUFFIX=".so"
9830	    LDFLAGS=""
9831	    if test $doRpath = yes; then
9832
9833		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9834		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
9835fi
9836
9837	    if test "${TCL_THREADS}" = "1"; then
9838
9839		# The -pthread needs to go in the LDFLAGS, not LIBS
9840		LIBS=`echo $LIBS | sed s/-pthread//`
9841		CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
9842		LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
9843fi
9844
9845	    # Version numbers are dot-stripped by system policy.
9846	    TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .`
9847	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
9848	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
9849	    TCL_LIB_VERSIONS_OK=nodots
9850	    ;;
9851	Darwin-*)
9852	    CFLAGS_OPTIMIZE="-Os"
9853	    SHLIB_CFLAGS="-fno-common"
9854	    # To avoid discrepancies between what headers configure sees during
9855	    # preprocessing tests and compiling tests, move any -isysroot and
9856	    # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
9857	    CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
9858		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
9859		if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`"
9860	    CFLAGS="`echo " ${CFLAGS}" | \
9861		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
9862		if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`"
9863	    if test $do64bit = yes; then
9864
9865		case `arch` in
9866		    ppc)
9867			{ echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5
9868echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6; }
9869if test "${tcl_cv_cc_arch_ppc64+set}" = set; then
9870  echo $ECHO_N "(cached) $ECHO_C" >&6
9871else
9872
9873			    hold_cflags=$CFLAGS
9874			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
9875			    cat >conftest.$ac_ext <<_ACEOF
9876/* confdefs.h.  */
9877_ACEOF
9878cat confdefs.h >>conftest.$ac_ext
9879cat >>conftest.$ac_ext <<_ACEOF
9880/* end confdefs.h.  */
9881
9882int
9883main ()
9884{
9885
9886  ;
9887  return 0;
9888}
9889_ACEOF
9890rm -f conftest.$ac_objext conftest$ac_exeext
9891if { (ac_try="$ac_link"
9892case "(($ac_try" in
9893  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9894  *) ac_try_echo=$ac_try;;
9895esac
9896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9897  (eval "$ac_link") 2>conftest.er1
9898  ac_status=$?
9899  grep -v '^ *+' conftest.er1 >conftest.err
9900  rm -f conftest.er1
9901  cat conftest.err >&5
9902  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9903  (exit $ac_status); } && {
9904	 test -z "$ac_c_werror_flag" ||
9905	 test ! -s conftest.err
9906       } && test -s conftest$ac_exeext &&
9907       $as_test_x conftest$ac_exeext; then
9908  tcl_cv_cc_arch_ppc64=yes
9909else
9910  echo "$as_me: failed program was:" >&5
9911sed 's/^/| /' conftest.$ac_ext >&5
9912
9913	tcl_cv_cc_arch_ppc64=no
9914fi
9915
9916rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9917      conftest$ac_exeext conftest.$ac_ext
9918			    CFLAGS=$hold_cflags
9919fi
9920{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5
9921echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6; }
9922			if test $tcl_cv_cc_arch_ppc64 = yes; then
9923
9924			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
9925			    do64bit_ok=yes
9926
9927fi
9928;;
9929		    i386)
9930			{ echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5
9931echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6; }
9932if test "${tcl_cv_cc_arch_x86_64+set}" = set; then
9933  echo $ECHO_N "(cached) $ECHO_C" >&6
9934else
9935
9936			    hold_cflags=$CFLAGS
9937			    CFLAGS="$CFLAGS -arch x86_64"
9938			    cat >conftest.$ac_ext <<_ACEOF
9939/* confdefs.h.  */
9940_ACEOF
9941cat confdefs.h >>conftest.$ac_ext
9942cat >>conftest.$ac_ext <<_ACEOF
9943/* end confdefs.h.  */
9944
9945int
9946main ()
9947{
9948
9949  ;
9950  return 0;
9951}
9952_ACEOF
9953rm -f conftest.$ac_objext conftest$ac_exeext
9954if { (ac_try="$ac_link"
9955case "(($ac_try" in
9956  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9957  *) ac_try_echo=$ac_try;;
9958esac
9959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9960  (eval "$ac_link") 2>conftest.er1
9961  ac_status=$?
9962  grep -v '^ *+' conftest.er1 >conftest.err
9963  rm -f conftest.er1
9964  cat conftest.err >&5
9965  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9966  (exit $ac_status); } && {
9967	 test -z "$ac_c_werror_flag" ||
9968	 test ! -s conftest.err
9969       } && test -s conftest$ac_exeext &&
9970       $as_test_x conftest$ac_exeext; then
9971  tcl_cv_cc_arch_x86_64=yes
9972else
9973  echo "$as_me: failed program was:" >&5
9974sed 's/^/| /' conftest.$ac_ext >&5
9975
9976	tcl_cv_cc_arch_x86_64=no
9977fi
9978
9979rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9980      conftest$ac_exeext conftest.$ac_ext
9981			    CFLAGS=$hold_cflags
9982fi
9983{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5
9984echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6; }
9985			if test $tcl_cv_cc_arch_x86_64 = yes; then
9986
9987			    CFLAGS="$CFLAGS -arch x86_64"
9988			    do64bit_ok=yes
9989
9990fi
9991;;
9992		    *)
9993			{ echo "$as_me:$LINENO: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5
9994echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};;
9995		esac
9996
9997else
9998
9999		# Check for combined 32-bit and 64-bit fat build
10000		if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
10001		    && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '; then
10002
10003		    fat_32_64=yes
10004fi
10005
10006
10007fi
10008
10009	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
10010	    SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
10011	    { echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5
10012echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6; }
10013if test "${tcl_cv_ld_single_module+set}" = set; then
10014  echo $ECHO_N "(cached) $ECHO_C" >&6
10015else
10016
10017		hold_ldflags=$LDFLAGS
10018		LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
10019		cat >conftest.$ac_ext <<_ACEOF
10020/* confdefs.h.  */
10021_ACEOF
10022cat confdefs.h >>conftest.$ac_ext
10023cat >>conftest.$ac_ext <<_ACEOF
10024/* end confdefs.h.  */
10025
10026int
10027main ()
10028{
10029int i;
10030  ;
10031  return 0;
10032}
10033_ACEOF
10034rm -f conftest.$ac_objext conftest$ac_exeext
10035if { (ac_try="$ac_link"
10036case "(($ac_try" in
10037  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10038  *) ac_try_echo=$ac_try;;
10039esac
10040eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10041  (eval "$ac_link") 2>conftest.er1
10042  ac_status=$?
10043  grep -v '^ *+' conftest.er1 >conftest.err
10044  rm -f conftest.er1
10045  cat conftest.err >&5
10046  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10047  (exit $ac_status); } && {
10048	 test -z "$ac_c_werror_flag" ||
10049	 test ! -s conftest.err
10050       } && test -s conftest$ac_exeext &&
10051       $as_test_x conftest$ac_exeext; then
10052  tcl_cv_ld_single_module=yes
10053else
10054  echo "$as_me: failed program was:" >&5
10055sed 's/^/| /' conftest.$ac_ext >&5
10056
10057	tcl_cv_ld_single_module=no
10058fi
10059
10060rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10061      conftest$ac_exeext conftest.$ac_ext
10062		LDFLAGS=$hold_ldflags
10063fi
10064{ echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5
10065echo "${ECHO_T}$tcl_cv_ld_single_module" >&6; }
10066	    if test $tcl_cv_ld_single_module = yes; then
10067
10068		SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
10069
10070fi
10071
10072	    # TEA specific: link shlib with current and compatiblity version flags
10073	    vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([0-9]\{1,5\}\)\(\(\.[0-9]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d`
10074	    SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}"
10075	    SHLIB_SUFFIX=".dylib"
10076	    # Don't use -prebind when building for Mac OS X 10.4 or later only:
10077	    if test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \
10078		"`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4; then
10079
10080		LDFLAGS="$LDFLAGS -prebind"
10081fi
10082
10083	    LDFLAGS="$LDFLAGS -headerpad_max_install_names"
10084	    { echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5
10085echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6; }
10086if test "${tcl_cv_ld_search_paths_first+set}" = set; then
10087  echo $ECHO_N "(cached) $ECHO_C" >&6
10088else
10089
10090		hold_ldflags=$LDFLAGS
10091		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
10092		cat >conftest.$ac_ext <<_ACEOF
10093/* confdefs.h.  */
10094_ACEOF
10095cat confdefs.h >>conftest.$ac_ext
10096cat >>conftest.$ac_ext <<_ACEOF
10097/* end confdefs.h.  */
10098
10099int
10100main ()
10101{
10102int i;
10103  ;
10104  return 0;
10105}
10106_ACEOF
10107rm -f conftest.$ac_objext conftest$ac_exeext
10108if { (ac_try="$ac_link"
10109case "(($ac_try" in
10110  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10111  *) ac_try_echo=$ac_try;;
10112esac
10113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10114  (eval "$ac_link") 2>conftest.er1
10115  ac_status=$?
10116  grep -v '^ *+' conftest.er1 >conftest.err
10117  rm -f conftest.er1
10118  cat conftest.err >&5
10119  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10120  (exit $ac_status); } && {
10121	 test -z "$ac_c_werror_flag" ||
10122	 test ! -s conftest.err
10123       } && test -s conftest$ac_exeext &&
10124       $as_test_x conftest$ac_exeext; then
10125  tcl_cv_ld_search_paths_first=yes
10126else
10127  echo "$as_me: failed program was:" >&5
10128sed 's/^/| /' conftest.$ac_ext >&5
10129
10130	tcl_cv_ld_search_paths_first=no
10131fi
10132
10133rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10134      conftest$ac_exeext conftest.$ac_ext
10135		LDFLAGS=$hold_ldflags
10136fi
10137{ echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5
10138echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6; }
10139	    if test $tcl_cv_ld_search_paths_first = yes; then
10140
10141		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
10142
10143fi
10144
10145	    if test "$tcl_cv_cc_visibility_hidden" != yes; then
10146
10147
10148cat >>confdefs.h <<\_ACEOF
10149#define MODULE_SCOPE __private_extern__
10150_ACEOF
10151
10152		tcl_cv_cc_visibility_hidden=yes
10153
10154fi
10155
10156	    CC_SEARCH_FLAGS=""
10157	    LD_SEARCH_FLAGS=""
10158	    LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
10159	    # TEA specific: for combined 32 & 64 bit fat builds of Tk
10160	    # extensions, verify that 64-bit build is possible.
10161	    if test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"; then
10162
10163		if test "${TEA_WINDOWINGSYSTEM}" = x11; then
10164
10165		    { echo "$as_me:$LINENO: checking for 64-bit X11" >&5
10166echo $ECHO_N "checking for 64-bit X11... $ECHO_C" >&6; }
10167if test "${tcl_cv_lib_x11_64+set}" = set; then
10168  echo $ECHO_N "(cached) $ECHO_C" >&6
10169else
10170
10171			for v in CFLAGS CPPFLAGS LDFLAGS; do
10172			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
10173			done
10174			CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
10175			LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
10176			cat >conftest.$ac_ext <<_ACEOF
10177/* confdefs.h.  */
10178_ACEOF
10179cat confdefs.h >>conftest.$ac_ext
10180cat >>conftest.$ac_ext <<_ACEOF
10181/* end confdefs.h.  */
10182#include <X11/Xlib.h>
10183int
10184main ()
10185{
10186XrmInitialize();
10187  ;
10188  return 0;
10189}
10190_ACEOF
10191rm -f conftest.$ac_objext conftest$ac_exeext
10192if { (ac_try="$ac_link"
10193case "(($ac_try" in
10194  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10195  *) ac_try_echo=$ac_try;;
10196esac
10197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10198  (eval "$ac_link") 2>conftest.er1
10199  ac_status=$?
10200  grep -v '^ *+' conftest.er1 >conftest.err
10201  rm -f conftest.er1
10202  cat conftest.err >&5
10203  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10204  (exit $ac_status); } && {
10205	 test -z "$ac_c_werror_flag" ||
10206	 test ! -s conftest.err
10207       } && test -s conftest$ac_exeext &&
10208       $as_test_x conftest$ac_exeext; then
10209  tcl_cv_lib_x11_64=yes
10210else
10211  echo "$as_me: failed program was:" >&5
10212sed 's/^/| /' conftest.$ac_ext >&5
10213
10214	tcl_cv_lib_x11_64=no
10215fi
10216
10217rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10218      conftest$ac_exeext conftest.$ac_ext
10219			for v in CFLAGS CPPFLAGS LDFLAGS; do
10220			    eval $v'="$hold_'$v'"'
10221			done
10222fi
10223{ echo "$as_me:$LINENO: result: $tcl_cv_lib_x11_64" >&5
10224echo "${ECHO_T}$tcl_cv_lib_x11_64" >&6; }
10225
10226fi
10227
10228		if test "${TEA_WINDOWINGSYSTEM}" = aqua; then
10229
10230		    { echo "$as_me:$LINENO: checking for 64-bit Tk" >&5
10231echo $ECHO_N "checking for 64-bit Tk... $ECHO_C" >&6; }
10232if test "${tcl_cv_lib_tk_64+set}" = set; then
10233  echo $ECHO_N "(cached) $ECHO_C" >&6
10234else
10235
10236			for v in CFLAGS CPPFLAGS LDFLAGS; do
10237			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
10238			done
10239			CPPFLAGS="$CPPFLAGS -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 `eval "echo ${TCL_INCLUDES} ${TK_INCLUDES}"`"
10240			LDFLAGS="$LDFLAGS ${TCL_STUB_LIB_SPEC} ${TK_STUB_LIB_SPEC}"
10241			cat >conftest.$ac_ext <<_ACEOF
10242/* confdefs.h.  */
10243_ACEOF
10244cat confdefs.h >>conftest.$ac_ext
10245cat >>conftest.$ac_ext <<_ACEOF
10246/* end confdefs.h.  */
10247#include <tk.h>
10248int
10249main ()
10250{
10251Tk_InitStubs(NULL, "", 0);
10252  ;
10253  return 0;
10254}
10255_ACEOF
10256rm -f conftest.$ac_objext conftest$ac_exeext
10257if { (ac_try="$ac_link"
10258case "(($ac_try" in
10259  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10260  *) ac_try_echo=$ac_try;;
10261esac
10262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10263  (eval "$ac_link") 2>conftest.er1
10264  ac_status=$?
10265  grep -v '^ *+' conftest.er1 >conftest.err
10266  rm -f conftest.er1
10267  cat conftest.err >&5
10268  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10269  (exit $ac_status); } && {
10270	 test -z "$ac_c_werror_flag" ||
10271	 test ! -s conftest.err
10272       } && test -s conftest$ac_exeext &&
10273       $as_test_x conftest$ac_exeext; then
10274  tcl_cv_lib_tk_64=yes
10275else
10276  echo "$as_me: failed program was:" >&5
10277sed 's/^/| /' conftest.$ac_ext >&5
10278
10279	tcl_cv_lib_tk_64=no
10280fi
10281
10282rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10283      conftest$ac_exeext conftest.$ac_ext
10284			for v in CFLAGS CPPFLAGS LDFLAGS; do
10285			    eval $v'="$hold_'$v'"'
10286			done
10287fi
10288{ echo "$as_me:$LINENO: result: $tcl_cv_lib_tk_64" >&5
10289echo "${ECHO_T}$tcl_cv_lib_tk_64" >&6; }
10290
10291fi
10292
10293		# remove 64-bit arch flags from CFLAGS et al. if configuration
10294		# does not support 64-bit.
10295		if test "$tcl_cv_lib_tk_64" = no -o "$tcl_cv_lib_x11_64" = no; then
10296
10297		    { echo "$as_me:$LINENO: Removing 64-bit architectures from compiler & linker flags" >&5
10298echo "$as_me: Removing 64-bit architectures from compiler & linker flags" >&6;}
10299		    for v in CFLAGS CPPFLAGS LDFLAGS; do
10300			eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
10301		    done
10302fi
10303
10304
10305fi
10306
10307	    ;;
10308	OS/390-*)
10309	    CFLAGS_OPTIMIZE=""		# Optimizer is buggy
10310
10311cat >>confdefs.h <<\_ACEOF
10312#define _OE_SOCKETS 1
10313_ACEOF
10314
10315	    ;;
10316	OSF1-V*)
10317	    # Digital OSF/1
10318	    SHLIB_CFLAGS=""
10319	    if test "$SHARED_BUILD" = 1; then
10320
10321	        SHLIB_LD='ld -shared -expect_unresolved "*"'
10322
10323else
10324
10325	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
10326
10327fi
10328
10329	    SHLIB_SUFFIX=".so"
10330	    if test $doRpath = yes; then
10331
10332		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
10333		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
10334fi
10335
10336	    if test "$GCC" = yes; then
10337  CFLAGS="$CFLAGS -mieee"
10338else
10339
10340		CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
10341fi
10342
10343	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
10344	    if test "${TCL_THREADS}" = 1; then
10345
10346		CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
10347		CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
10348		LIBS=`echo $LIBS | sed s/-lpthreads//`
10349		if test "$GCC" = yes; then
10350
10351		    LIBS="$LIBS -lpthread -lmach -lexc"
10352
10353else
10354
10355		    CFLAGS="$CFLAGS -pthread"
10356		    LDFLAGS="$LDFLAGS -pthread"
10357
10358fi
10359
10360
10361fi
10362
10363	    ;;
10364	QNX-6*)
10365	    # QNX RTP
10366	    # This may work for all QNX, but it was only reported for v6.
10367	    SHLIB_CFLAGS="-fPIC"
10368	    SHLIB_LD="ld -Bshareable -x"
10369	    SHLIB_LD_LIBS=""
10370	    SHLIB_SUFFIX=".so"
10371	    CC_SEARCH_FLAGS=""
10372	    LD_SEARCH_FLAGS=""
10373	    ;;
10374	SCO_SV-3.2*)
10375	    if test "$GCC" = yes; then
10376
10377		SHLIB_CFLAGS="-fPIC -melf"
10378		LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
10379
10380else
10381
10382	       SHLIB_CFLAGS="-Kpic -belf"
10383	       LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
10384
10385fi
10386
10387	    SHLIB_LD="ld -G"
10388	    SHLIB_LD_LIBS=""
10389	    SHLIB_SUFFIX=".so"
10390	    CC_SEARCH_FLAGS=""
10391	    LD_SEARCH_FLAGS=""
10392	    ;;
10393	SunOS-5.[0-6])
10394	    # Careful to not let 5.10+ fall into this case
10395
10396	    # Note: If _REENTRANT isn't defined, then Solaris
10397	    # won't define thread-safe library routines.
10398
10399
10400cat >>confdefs.h <<\_ACEOF
10401#define _REENTRANT 1
10402_ACEOF
10403
10404
10405cat >>confdefs.h <<\_ACEOF
10406#define _POSIX_PTHREAD_SEMANTICS 1
10407_ACEOF
10408
10409
10410	    SHLIB_CFLAGS="-KPIC"
10411	    SHLIB_SUFFIX=".so"
10412	    if test "$GCC" = yes; then
10413
10414		SHLIB_LD='${CC} -shared'
10415		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
10416		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
10417
10418else
10419
10420		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
10421		CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
10422		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
10423
10424fi
10425
10426	    ;;
10427	SunOS-5*)
10428	    # Note: If _REENTRANT isn't defined, then Solaris
10429	    # won't define thread-safe library routines.
10430
10431
10432cat >>confdefs.h <<\_ACEOF
10433#define _REENTRANT 1
10434_ACEOF
10435
10436
10437cat >>confdefs.h <<\_ACEOF
10438#define _POSIX_PTHREAD_SEMANTICS 1
10439_ACEOF
10440
10441
10442	    SHLIB_CFLAGS="-KPIC"
10443
10444	    # Check to enable 64-bit flags for compiler/linker
10445	    if test "$do64bit" = yes; then
10446
10447		arch=`isainfo`
10448		if test "$arch" = "sparcv9 sparc"; then
10449
10450		    if test "$GCC" = yes; then
10451
10452			if test "`${CC} -dumpversion | awk -F. '{print $1}'`" -lt 3; then
10453
10454			    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5
10455echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;}
10456
10457else
10458
10459			    do64bit_ok=yes
10460			    CFLAGS="$CFLAGS -m64 -mcpu=v9"
10461			    LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
10462			    SHLIB_CFLAGS="-fPIC"
10463
10464fi
10465
10466
10467else
10468
10469			do64bit_ok=yes
10470			if test "$do64bitVIS" = yes; then
10471
10472			    CFLAGS="$CFLAGS -xarch=v9a"
10473			    LDFLAGS_ARCH="-xarch=v9a"
10474
10475else
10476
10477			    CFLAGS="$CFLAGS -xarch=v9"
10478			    LDFLAGS_ARCH="-xarch=v9"
10479
10480fi
10481
10482			# Solaris 64 uses this as well
10483			#LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
10484
10485fi
10486
10487
10488else
10489  if test "$arch" = "amd64 i386"; then
10490
10491		    if test "$GCC" = yes; then
10492
10493			case $system in
10494			    SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
10495				do64bit_ok=yes
10496				CFLAGS="$CFLAGS -m64"
10497				LDFLAGS="$LDFLAGS -m64";;
10498			    *)
10499				{ echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
10500echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;};;
10501			esac
10502
10503else
10504
10505			do64bit_ok=yes
10506			case $system in
10507			    SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
10508				CFLAGS="$CFLAGS -m64"
10509				LDFLAGS="$LDFLAGS -m64";;
10510			    *)
10511				CFLAGS="$CFLAGS -xarch=amd64"
10512				LDFLAGS="$LDFLAGS -xarch=amd64";;
10513			esac
10514
10515fi
10516
10517
10518else
10519  { echo "$as_me:$LINENO: WARNING: 64bit mode not supported for $arch" >&5
10520echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;}
10521fi
10522
10523fi
10524
10525
10526fi
10527
10528
10529	    SHLIB_SUFFIX=".so"
10530	    if test "$GCC" = yes; then
10531
10532		SHLIB_LD='${CC} -shared'
10533		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
10534		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
10535		if test "$do64bit_ok" = yes; then
10536
10537		    if test "$arch" = "sparcv9 sparc"; then
10538
10539			# We need to specify -static-libgcc or we need to
10540			# add the path to the sparv9 libgcc.
10541			# JH: static-libgcc is necessary for core Tcl, but may
10542			# not be necessary for extensions.
10543			SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
10544			# for finding sparcv9 libgcc, get the regular libgcc
10545			# path, remove so name and append 'sparcv9'
10546			#v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
10547			#CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
10548
10549else
10550  if test "$arch" = "amd64 i386"; then
10551
10552			# JH: static-libgcc is necessary for core Tcl, but may
10553			# not be necessary for extensions.
10554			SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
10555
10556fi
10557
10558fi
10559
10560
10561fi
10562
10563
10564else
10565
10566		case $system in
10567		    SunOS-5.[1-9][0-9]*)
10568			# TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
10569			SHLIB_LD='${CC} -G -z text ${LDFLAGS_DEFAULT}';;
10570		    *)
10571			SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
10572		esac
10573		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
10574		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
10575
10576fi
10577
10578	    ;;
10579    esac
10580
10581    if test "$do64bit" = yes -a "$do64bit_ok" = no; then
10582
10583	{ echo "$as_me:$LINENO: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5
10584echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;}
10585
10586fi
10587
10588
10589
10590
10591    # Add in the arch flags late to ensure it wasn't removed.
10592    # Not necessary in TEA, but this is aligned with core
10593    LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
10594
10595    # If we're running gcc, then change the C flags for compiling shared
10596    # libraries to the right flags for gcc, instead of those for the
10597    # standard manufacturer compiler.
10598
10599    if test "$GCC" = yes; then
10600
10601	case $system in
10602	    AIX-*) ;;
10603	    BSD/OS*) ;;
10604	    CYGWIN_*) ;;
10605	    IRIX*) ;;
10606	    NetBSD-*|FreeBSD-*|OpenBSD-*) ;;
10607	    Darwin-*) ;;
10608	    SCO_SV-3.2*) ;;
10609	    windows) ;;
10610	    *) SHLIB_CFLAGS="-fPIC" ;;
10611	esac
10612fi
10613
10614
10615    if test "$tcl_cv_cc_visibility_hidden" != yes; then
10616
10617
10618cat >>confdefs.h <<\_ACEOF
10619#define MODULE_SCOPE extern
10620_ACEOF
10621
10622
10623cat >>confdefs.h <<\_ACEOF
10624#define NO_VIZ
10625_ACEOF
10626
10627
10628fi
10629
10630
10631    if test "$SHARED_LIB_SUFFIX" = ""; then
10632
10633	# TEA specific: use PACKAGE_VERSION instead of VERSION
10634	SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'
10635fi
10636
10637    if test "$UNSHARED_LIB_SUFFIX" = ""; then
10638
10639	# TEA specific: use PACKAGE_VERSION instead of VERSION
10640	UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
10641fi
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656    # These must be called after we do the basic CFLAGS checks and
10657    # verify any possible 64-bit or similar switches are necessary
10658
10659    { echo "$as_me:$LINENO: checking for required early compiler flags" >&5
10660echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6; }
10661    tcl_flags=""
10662
10663    if test "${tcl_cv_flag__isoc99_source+set}" = set; then
10664  echo $ECHO_N "(cached) $ECHO_C" >&6
10665else
10666  cat >conftest.$ac_ext <<_ACEOF
10667/* confdefs.h.  */
10668_ACEOF
10669cat confdefs.h >>conftest.$ac_ext
10670cat >>conftest.$ac_ext <<_ACEOF
10671/* end confdefs.h.  */
10672#include <stdlib.h>
10673int
10674main ()
10675{
10676char *p = (char *)strtoll; char *q = (char *)strtoull;
10677  ;
10678  return 0;
10679}
10680_ACEOF
10681rm -f conftest.$ac_objext
10682if { (ac_try="$ac_compile"
10683case "(($ac_try" in
10684  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10685  *) ac_try_echo=$ac_try;;
10686esac
10687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10688  (eval "$ac_compile") 2>conftest.er1
10689  ac_status=$?
10690  grep -v '^ *+' conftest.er1 >conftest.err
10691  rm -f conftest.er1
10692  cat conftest.err >&5
10693  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10694  (exit $ac_status); } && {
10695	 test -z "$ac_c_werror_flag" ||
10696	 test ! -s conftest.err
10697       } && test -s conftest.$ac_objext; then
10698  tcl_cv_flag__isoc99_source=no
10699else
10700  echo "$as_me: failed program was:" >&5
10701sed 's/^/| /' conftest.$ac_ext >&5
10702
10703	cat >conftest.$ac_ext <<_ACEOF
10704/* confdefs.h.  */
10705_ACEOF
10706cat confdefs.h >>conftest.$ac_ext
10707cat >>conftest.$ac_ext <<_ACEOF
10708/* end confdefs.h.  */
10709#define _ISOC99_SOURCE 1
10710#include <stdlib.h>
10711int
10712main ()
10713{
10714char *p = (char *)strtoll; char *q = (char *)strtoull;
10715  ;
10716  return 0;
10717}
10718_ACEOF
10719rm -f conftest.$ac_objext
10720if { (ac_try="$ac_compile"
10721case "(($ac_try" in
10722  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10723  *) ac_try_echo=$ac_try;;
10724esac
10725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10726  (eval "$ac_compile") 2>conftest.er1
10727  ac_status=$?
10728  grep -v '^ *+' conftest.er1 >conftest.err
10729  rm -f conftest.er1
10730  cat conftest.err >&5
10731  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10732  (exit $ac_status); } && {
10733	 test -z "$ac_c_werror_flag" ||
10734	 test ! -s conftest.err
10735       } && test -s conftest.$ac_objext; then
10736  tcl_cv_flag__isoc99_source=yes
10737else
10738  echo "$as_me: failed program was:" >&5
10739sed 's/^/| /' conftest.$ac_ext >&5
10740
10741	tcl_cv_flag__isoc99_source=no
10742fi
10743
10744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10745fi
10746
10747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10748fi
10749
10750    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
10751
10752cat >>confdefs.h <<\_ACEOF
10753#define _ISOC99_SOURCE 1
10754_ACEOF
10755
10756	tcl_flags="$tcl_flags _ISOC99_SOURCE"
10757    fi
10758
10759
10760    if test "${tcl_cv_flag__largefile64_source+set}" = set; then
10761  echo $ECHO_N "(cached) $ECHO_C" >&6
10762else
10763  cat >conftest.$ac_ext <<_ACEOF
10764/* confdefs.h.  */
10765_ACEOF
10766cat confdefs.h >>conftest.$ac_ext
10767cat >>conftest.$ac_ext <<_ACEOF
10768/* end confdefs.h.  */
10769#include <sys/stat.h>
10770int
10771main ()
10772{
10773struct stat64 buf; int i = stat64("/", &buf);
10774  ;
10775  return 0;
10776}
10777_ACEOF
10778rm -f conftest.$ac_objext
10779if { (ac_try="$ac_compile"
10780case "(($ac_try" in
10781  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10782  *) ac_try_echo=$ac_try;;
10783esac
10784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10785  (eval "$ac_compile") 2>conftest.er1
10786  ac_status=$?
10787  grep -v '^ *+' conftest.er1 >conftest.err
10788  rm -f conftest.er1
10789  cat conftest.err >&5
10790  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10791  (exit $ac_status); } && {
10792	 test -z "$ac_c_werror_flag" ||
10793	 test ! -s conftest.err
10794       } && test -s conftest.$ac_objext; then
10795  tcl_cv_flag__largefile64_source=no
10796else
10797  echo "$as_me: failed program was:" >&5
10798sed 's/^/| /' conftest.$ac_ext >&5
10799
10800	cat >conftest.$ac_ext <<_ACEOF
10801/* confdefs.h.  */
10802_ACEOF
10803cat confdefs.h >>conftest.$ac_ext
10804cat >>conftest.$ac_ext <<_ACEOF
10805/* end confdefs.h.  */
10806#define _LARGEFILE64_SOURCE 1
10807#include <sys/stat.h>
10808int
10809main ()
10810{
10811struct stat64 buf; int i = stat64("/", &buf);
10812  ;
10813  return 0;
10814}
10815_ACEOF
10816rm -f conftest.$ac_objext
10817if { (ac_try="$ac_compile"
10818case "(($ac_try" in
10819  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10820  *) ac_try_echo=$ac_try;;
10821esac
10822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10823  (eval "$ac_compile") 2>conftest.er1
10824  ac_status=$?
10825  grep -v '^ *+' conftest.er1 >conftest.err
10826  rm -f conftest.er1
10827  cat conftest.err >&5
10828  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10829  (exit $ac_status); } && {
10830	 test -z "$ac_c_werror_flag" ||
10831	 test ! -s conftest.err
10832       } && test -s conftest.$ac_objext; then
10833  tcl_cv_flag__largefile64_source=yes
10834else
10835  echo "$as_me: failed program was:" >&5
10836sed 's/^/| /' conftest.$ac_ext >&5
10837
10838	tcl_cv_flag__largefile64_source=no
10839fi
10840
10841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10842fi
10843
10844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10845fi
10846
10847    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
10848
10849cat >>confdefs.h <<\_ACEOF
10850#define _LARGEFILE64_SOURCE 1
10851_ACEOF
10852
10853	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
10854    fi
10855
10856
10857    if test "${tcl_cv_flag__largefile_source64+set}" = set; then
10858  echo $ECHO_N "(cached) $ECHO_C" >&6
10859else
10860  cat >conftest.$ac_ext <<_ACEOF
10861/* confdefs.h.  */
10862_ACEOF
10863cat confdefs.h >>conftest.$ac_ext
10864cat >>conftest.$ac_ext <<_ACEOF
10865/* end confdefs.h.  */
10866#include <sys/stat.h>
10867int
10868main ()
10869{
10870char *p = (char *)open64;
10871  ;
10872  return 0;
10873}
10874_ACEOF
10875rm -f conftest.$ac_objext
10876if { (ac_try="$ac_compile"
10877case "(($ac_try" in
10878  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10879  *) ac_try_echo=$ac_try;;
10880esac
10881eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10882  (eval "$ac_compile") 2>conftest.er1
10883  ac_status=$?
10884  grep -v '^ *+' conftest.er1 >conftest.err
10885  rm -f conftest.er1
10886  cat conftest.err >&5
10887  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10888  (exit $ac_status); } && {
10889	 test -z "$ac_c_werror_flag" ||
10890	 test ! -s conftest.err
10891       } && test -s conftest.$ac_objext; then
10892  tcl_cv_flag__largefile_source64=no
10893else
10894  echo "$as_me: failed program was:" >&5
10895sed 's/^/| /' conftest.$ac_ext >&5
10896
10897	cat >conftest.$ac_ext <<_ACEOF
10898/* confdefs.h.  */
10899_ACEOF
10900cat confdefs.h >>conftest.$ac_ext
10901cat >>conftest.$ac_ext <<_ACEOF
10902/* end confdefs.h.  */
10903#define _LARGEFILE_SOURCE64 1
10904#include <sys/stat.h>
10905int
10906main ()
10907{
10908char *p = (char *)open64;
10909  ;
10910  return 0;
10911}
10912_ACEOF
10913rm -f conftest.$ac_objext
10914if { (ac_try="$ac_compile"
10915case "(($ac_try" in
10916  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10917  *) ac_try_echo=$ac_try;;
10918esac
10919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10920  (eval "$ac_compile") 2>conftest.er1
10921  ac_status=$?
10922  grep -v '^ *+' conftest.er1 >conftest.err
10923  rm -f conftest.er1
10924  cat conftest.err >&5
10925  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10926  (exit $ac_status); } && {
10927	 test -z "$ac_c_werror_flag" ||
10928	 test ! -s conftest.err
10929       } && test -s conftest.$ac_objext; then
10930  tcl_cv_flag__largefile_source64=yes
10931else
10932  echo "$as_me: failed program was:" >&5
10933sed 's/^/| /' conftest.$ac_ext >&5
10934
10935	tcl_cv_flag__largefile_source64=no
10936fi
10937
10938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10939fi
10940
10941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10942fi
10943
10944    if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then
10945
10946cat >>confdefs.h <<\_ACEOF
10947#define _LARGEFILE_SOURCE64 1
10948_ACEOF
10949
10950	tcl_flags="$tcl_flags _LARGEFILE_SOURCE64"
10951    fi
10952
10953    if test "x${tcl_flags}" = "x" ; then
10954	{ echo "$as_me:$LINENO: result: none" >&5
10955echo "${ECHO_T}none" >&6; }
10956    else
10957	{ echo "$as_me:$LINENO: result: ${tcl_flags}" >&5
10958echo "${ECHO_T}${tcl_flags}" >&6; }
10959    fi
10960
10961
10962    { echo "$as_me:$LINENO: checking for 64-bit integer type" >&5
10963echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6; }
10964    if test "${tcl_cv_type_64bit+set}" = set; then
10965  echo $ECHO_N "(cached) $ECHO_C" >&6
10966else
10967
10968	tcl_cv_type_64bit=none
10969	# See if the compiler knows natively about __int64
10970	cat >conftest.$ac_ext <<_ACEOF
10971/* confdefs.h.  */
10972_ACEOF
10973cat confdefs.h >>conftest.$ac_ext
10974cat >>conftest.$ac_ext <<_ACEOF
10975/* end confdefs.h.  */
10976
10977int
10978main ()
10979{
10980__int64 value = (__int64) 0;
10981  ;
10982  return 0;
10983}
10984_ACEOF
10985rm -f conftest.$ac_objext
10986if { (ac_try="$ac_compile"
10987case "(($ac_try" in
10988  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10989  *) ac_try_echo=$ac_try;;
10990esac
10991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10992  (eval "$ac_compile") 2>conftest.er1
10993  ac_status=$?
10994  grep -v '^ *+' conftest.er1 >conftest.err
10995  rm -f conftest.er1
10996  cat conftest.err >&5
10997  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10998  (exit $ac_status); } && {
10999	 test -z "$ac_c_werror_flag" ||
11000	 test ! -s conftest.err
11001       } && test -s conftest.$ac_objext; then
11002  tcl_type_64bit=__int64
11003else
11004  echo "$as_me: failed program was:" >&5
11005sed 's/^/| /' conftest.$ac_ext >&5
11006
11007	tcl_type_64bit="long long"
11008fi
11009
11010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11011	# See if we should use long anyway  Note that we substitute in the
11012	# type that is our current guess for a 64-bit type inside this check
11013	# program, so it should be modified only carefully...
11014        cat >conftest.$ac_ext <<_ACEOF
11015/* confdefs.h.  */
11016_ACEOF
11017cat confdefs.h >>conftest.$ac_ext
11018cat >>conftest.$ac_ext <<_ACEOF
11019/* end confdefs.h.  */
11020
11021int
11022main ()
11023{
11024switch (0) {
11025            case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
11026        }
11027  ;
11028  return 0;
11029}
11030_ACEOF
11031rm -f conftest.$ac_objext
11032if { (ac_try="$ac_compile"
11033case "(($ac_try" in
11034  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11035  *) ac_try_echo=$ac_try;;
11036esac
11037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11038  (eval "$ac_compile") 2>conftest.er1
11039  ac_status=$?
11040  grep -v '^ *+' conftest.er1 >conftest.err
11041  rm -f conftest.er1
11042  cat conftest.err >&5
11043  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11044  (exit $ac_status); } && {
11045	 test -z "$ac_c_werror_flag" ||
11046	 test ! -s conftest.err
11047       } && test -s conftest.$ac_objext; then
11048  tcl_cv_type_64bit=${tcl_type_64bit}
11049else
11050  echo "$as_me: failed program was:" >&5
11051sed 's/^/| /' conftest.$ac_ext >&5
11052
11053
11054fi
11055
11056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11057fi
11058
11059    if test "${tcl_cv_type_64bit}" = none ; then
11060
11061cat >>confdefs.h <<\_ACEOF
11062#define TCL_WIDE_INT_IS_LONG 1
11063_ACEOF
11064
11065	{ echo "$as_me:$LINENO: result: using long" >&5
11066echo "${ECHO_T}using long" >&6; }
11067    elif test "${tcl_cv_type_64bit}" = "__int64" \
11068		-a "${TEA_PLATFORM}" = "windows" ; then
11069	# TEA specific: We actually want to use the default tcl.h checks in
11070	# this case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER*
11071	{ echo "$as_me:$LINENO: result: using Tcl header defaults" >&5
11072echo "${ECHO_T}using Tcl header defaults" >&6; }
11073    else
11074
11075cat >>confdefs.h <<_ACEOF
11076#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
11077_ACEOF
11078
11079	{ echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5
11080echo "${ECHO_T}${tcl_cv_type_64bit}" >&6; }
11081
11082	# Now check for auxiliary declarations
11083	{ echo "$as_me:$LINENO: checking for struct dirent64" >&5
11084echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6; }
11085if test "${tcl_cv_struct_dirent64+set}" = set; then
11086  echo $ECHO_N "(cached) $ECHO_C" >&6
11087else
11088
11089	    cat >conftest.$ac_ext <<_ACEOF
11090/* confdefs.h.  */
11091_ACEOF
11092cat confdefs.h >>conftest.$ac_ext
11093cat >>conftest.$ac_ext <<_ACEOF
11094/* end confdefs.h.  */
11095#include <sys/types.h>
11096#include <sys/dirent.h>
11097int
11098main ()
11099{
11100struct dirent64 p;
11101  ;
11102  return 0;
11103}
11104_ACEOF
11105rm -f conftest.$ac_objext
11106if { (ac_try="$ac_compile"
11107case "(($ac_try" in
11108  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11109  *) ac_try_echo=$ac_try;;
11110esac
11111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11112  (eval "$ac_compile") 2>conftest.er1
11113  ac_status=$?
11114  grep -v '^ *+' conftest.er1 >conftest.err
11115  rm -f conftest.er1
11116  cat conftest.err >&5
11117  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11118  (exit $ac_status); } && {
11119	 test -z "$ac_c_werror_flag" ||
11120	 test ! -s conftest.err
11121       } && test -s conftest.$ac_objext; then
11122  tcl_cv_struct_dirent64=yes
11123else
11124  echo "$as_me: failed program was:" >&5
11125sed 's/^/| /' conftest.$ac_ext >&5
11126
11127	tcl_cv_struct_dirent64=no
11128fi
11129
11130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11131fi
11132{ echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5
11133echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6; }
11134	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
11135
11136cat >>confdefs.h <<\_ACEOF
11137#define HAVE_STRUCT_DIRENT64 1
11138_ACEOF
11139
11140	fi
11141
11142	{ echo "$as_me:$LINENO: checking for struct stat64" >&5
11143echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6; }
11144if test "${tcl_cv_struct_stat64+set}" = set; then
11145  echo $ECHO_N "(cached) $ECHO_C" >&6
11146else
11147
11148	    cat >conftest.$ac_ext <<_ACEOF
11149/* confdefs.h.  */
11150_ACEOF
11151cat confdefs.h >>conftest.$ac_ext
11152cat >>conftest.$ac_ext <<_ACEOF
11153/* end confdefs.h.  */
11154#include <sys/stat.h>
11155int
11156main ()
11157{
11158struct stat64 p;
11159
11160  ;
11161  return 0;
11162}
11163_ACEOF
11164rm -f conftest.$ac_objext
11165if { (ac_try="$ac_compile"
11166case "(($ac_try" in
11167  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11168  *) ac_try_echo=$ac_try;;
11169esac
11170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11171  (eval "$ac_compile") 2>conftest.er1
11172  ac_status=$?
11173  grep -v '^ *+' conftest.er1 >conftest.err
11174  rm -f conftest.er1
11175  cat conftest.err >&5
11176  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11177  (exit $ac_status); } && {
11178	 test -z "$ac_c_werror_flag" ||
11179	 test ! -s conftest.err
11180       } && test -s conftest.$ac_objext; then
11181  tcl_cv_struct_stat64=yes
11182else
11183  echo "$as_me: failed program was:" >&5
11184sed 's/^/| /' conftest.$ac_ext >&5
11185
11186	tcl_cv_struct_stat64=no
11187fi
11188
11189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11190fi
11191{ echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5
11192echo "${ECHO_T}$tcl_cv_struct_stat64" >&6; }
11193	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
11194
11195cat >>confdefs.h <<\_ACEOF
11196#define HAVE_STRUCT_STAT64 1
11197_ACEOF
11198
11199	fi
11200
11201
11202
11203for ac_func in open64 lseek64
11204do
11205as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11206{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11207echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11208if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
11209  echo $ECHO_N "(cached) $ECHO_C" >&6
11210else
11211  cat >conftest.$ac_ext <<_ACEOF
11212/* confdefs.h.  */
11213_ACEOF
11214cat confdefs.h >>conftest.$ac_ext
11215cat >>conftest.$ac_ext <<_ACEOF
11216/* end confdefs.h.  */
11217/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11218   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
11219#define $ac_func innocuous_$ac_func
11220
11221/* System header to define __stub macros and hopefully few prototypes,
11222    which can conflict with char $ac_func (); below.
11223    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11224    <limits.h> exists even on freestanding compilers.  */
11225
11226#ifdef __STDC__
11227# include <limits.h>
11228#else
11229# include <assert.h>
11230#endif
11231
11232#undef $ac_func
11233
11234/* Override any GCC internal prototype to avoid an error.
11235   Use char because int might match the return type of a GCC
11236   builtin and then its argument prototype would still apply.  */
11237#ifdef __cplusplus
11238extern "C"
11239#endif
11240char $ac_func ();
11241/* The GNU C library defines this for functions which it implements
11242    to always fail with ENOSYS.  Some functions are actually named
11243    something starting with __ and the normal name is an alias.  */
11244#if defined __stub_$ac_func || defined __stub___$ac_func
11245choke me
11246#endif
11247
11248int
11249main ()
11250{
11251return $ac_func ();
11252  ;
11253  return 0;
11254}
11255_ACEOF
11256rm -f conftest.$ac_objext conftest$ac_exeext
11257if { (ac_try="$ac_link"
11258case "(($ac_try" in
11259  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11260  *) ac_try_echo=$ac_try;;
11261esac
11262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11263  (eval "$ac_link") 2>conftest.er1
11264  ac_status=$?
11265  grep -v '^ *+' conftest.er1 >conftest.err
11266  rm -f conftest.er1
11267  cat conftest.err >&5
11268  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11269  (exit $ac_status); } && {
11270	 test -z "$ac_c_werror_flag" ||
11271	 test ! -s conftest.err
11272       } && test -s conftest$ac_exeext &&
11273       $as_test_x conftest$ac_exeext; then
11274  eval "$as_ac_var=yes"
11275else
11276  echo "$as_me: failed program was:" >&5
11277sed 's/^/| /' conftest.$ac_ext >&5
11278
11279	eval "$as_ac_var=no"
11280fi
11281
11282rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11283      conftest$ac_exeext conftest.$ac_ext
11284fi
11285ac_res=`eval echo '${'$as_ac_var'}'`
11286	       { echo "$as_me:$LINENO: result: $ac_res" >&5
11287echo "${ECHO_T}$ac_res" >&6; }
11288if test `eval echo '${'$as_ac_var'}'` = yes; then
11289  cat >>confdefs.h <<_ACEOF
11290#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11291_ACEOF
11292
11293fi
11294done
11295
11296	{ echo "$as_me:$LINENO: checking for off64_t" >&5
11297echo $ECHO_N "checking for off64_t... $ECHO_C" >&6; }
11298	if test "${tcl_cv_type_off64_t+set}" = set; then
11299  echo $ECHO_N "(cached) $ECHO_C" >&6
11300else
11301
11302	    cat >conftest.$ac_ext <<_ACEOF
11303/* confdefs.h.  */
11304_ACEOF
11305cat confdefs.h >>conftest.$ac_ext
11306cat >>conftest.$ac_ext <<_ACEOF
11307/* end confdefs.h.  */
11308#include <sys/types.h>
11309int
11310main ()
11311{
11312off64_t offset;
11313
11314  ;
11315  return 0;
11316}
11317_ACEOF
11318rm -f conftest.$ac_objext
11319if { (ac_try="$ac_compile"
11320case "(($ac_try" in
11321  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11322  *) ac_try_echo=$ac_try;;
11323esac
11324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11325  (eval "$ac_compile") 2>conftest.er1
11326  ac_status=$?
11327  grep -v '^ *+' conftest.er1 >conftest.err
11328  rm -f conftest.er1
11329  cat conftest.err >&5
11330  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11331  (exit $ac_status); } && {
11332	 test -z "$ac_c_werror_flag" ||
11333	 test ! -s conftest.err
11334       } && test -s conftest.$ac_objext; then
11335  tcl_cv_type_off64_t=yes
11336else
11337  echo "$as_me: failed program was:" >&5
11338sed 's/^/| /' conftest.$ac_ext >&5
11339
11340	tcl_cv_type_off64_t=no
11341fi
11342
11343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11344fi
11345
11346			if test "x${tcl_cv_type_off64_t}" = "xyes" && \
11347	        test "x${ac_cv_func_lseek64}" = "xyes" && \
11348	        test "x${ac_cv_func_open64}" = "xyes" ; then
11349
11350cat >>confdefs.h <<\_ACEOF
11351#define HAVE_TYPE_OFF64_T 1
11352_ACEOF
11353
11354	    { echo "$as_me:$LINENO: result: yes" >&5
11355echo "${ECHO_T}yes" >&6; }
11356	else
11357	    { echo "$as_me:$LINENO: result: no" >&5
11358echo "${ECHO_T}no" >&6; }
11359	fi
11360    fi
11361
11362
11363
11364#--------------------------------------------------------------------
11365# Set the default compiler switches based on the --enable-symbols option.
11366#--------------------------------------------------------------------
11367
11368
11369
11370    { echo "$as_me:$LINENO: checking for build with symbols" >&5
11371echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6; }
11372    # Check whether --enable-symbols was given.
11373if test "${enable_symbols+set}" = set; then
11374  enableval=$enable_symbols; tcl_ok=$enableval
11375else
11376  tcl_ok=no
11377fi
11378
11379    DBGX=""
11380    if test "$tcl_ok" = "no"; then
11381	CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}"
11382	LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
11383	{ echo "$as_me:$LINENO: result: no" >&5
11384echo "${ECHO_T}no" >&6; }
11385    else
11386	CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
11387	LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
11388	if test "$tcl_ok" = "yes"; then
11389	    { echo "$as_me:$LINENO: result: yes (standard debugging)" >&5
11390echo "${ECHO_T}yes (standard debugging)" >&6; }
11391	fi
11392    fi
11393    # TEA specific:
11394    if test "${TEA_PLATFORM}" != "windows" ; then
11395	LDFLAGS_DEFAULT="${LDFLAGS}"
11396    fi
11397
11398
11399
11400
11401    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
11402
11403cat >>confdefs.h <<\_ACEOF
11404#define TCL_MEM_DEBUG 1
11405_ACEOF
11406
11407    fi
11408
11409    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
11410	if test "$tcl_ok" = "all"; then
11411	    { echo "$as_me:$LINENO: result: enabled symbols mem debugging" >&5
11412echo "${ECHO_T}enabled symbols mem debugging" >&6; }
11413	else
11414	    { echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5
11415echo "${ECHO_T}enabled $tcl_ok debugging" >&6; }
11416	fi
11417    fi
11418
11419
11420#--------------------------------------------------------------------
11421# For Unix/Tk builds, make sure that the X libraries/headers are found.
11422# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS.
11423#--------------------------------------------------------------------
11424
11425
11426    if test "${TEA_WINDOWINGSYSTEM}" = "x11" ; then
11427
11428    { echo "$as_me:$LINENO: checking for X" >&5
11429echo $ECHO_N "checking for X... $ECHO_C" >&6; }
11430
11431
11432# Check whether --with-x was given.
11433if test "${with_x+set}" = set; then
11434  withval=$with_x;
11435fi
11436
11437# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
11438if test "x$with_x" = xno; then
11439  # The user explicitly disabled X.
11440  have_x=disabled
11441else
11442  case $x_includes,$x_libraries in #(
11443    *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
11444echo "$as_me: error: Cannot use X directory names containing '" >&2;}
11445   { (exit 1); exit 1; }; };; #(
11446    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
11447  echo $ECHO_N "(cached) $ECHO_C" >&6
11448else
11449  # One or both of the vars are not set, and there is no cached value.
11450ac_x_includes=no ac_x_libraries=no
11451rm -f -r conftest.dir
11452if mkdir conftest.dir; then
11453  cd conftest.dir
11454  cat >Imakefile <<'_ACEOF'
11455incroot:
11456	@echo incroot='${INCROOT}'
11457usrlibdir:
11458	@echo usrlibdir='${USRLIBDIR}'
11459libdir:
11460	@echo libdir='${LIBDIR}'
11461_ACEOF
11462  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
11463    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
11464    for ac_var in incroot usrlibdir libdir; do
11465      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
11466    done
11467    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
11468    for ac_extension in a so sl dylib la dll; do
11469      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
11470	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
11471	ac_im_usrlibdir=$ac_im_libdir; break
11472      fi
11473    done
11474    # Screen out bogus values from the imake configuration.  They are
11475    # bogus both because they are the default anyway, and because
11476    # using them would break gcc on systems where it needs fixed includes.
11477    case $ac_im_incroot in
11478	/usr/include) ac_x_includes= ;;
11479	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
11480    esac
11481    case $ac_im_usrlibdir in
11482	/usr/lib | /lib) ;;
11483	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
11484    esac
11485  fi
11486  cd ..
11487  rm -f -r conftest.dir
11488fi
11489
11490# Standard set of common directories for X headers.
11491# Check X11 before X11Rn because it is often a symlink to the current release.
11492ac_x_header_dirs='
11493/usr/X11/include
11494/usr/X11R6/include
11495/usr/X11R5/include
11496/usr/X11R4/include
11497
11498/usr/include/X11
11499/usr/include/X11R6
11500/usr/include/X11R5
11501/usr/include/X11R4
11502
11503/usr/local/X11/include
11504/usr/local/X11R6/include
11505/usr/local/X11R5/include
11506/usr/local/X11R4/include
11507
11508/usr/local/include/X11
11509/usr/local/include/X11R6
11510/usr/local/include/X11R5
11511/usr/local/include/X11R4
11512
11513/usr/X386/include
11514/usr/x386/include
11515/usr/XFree86/include/X11
11516
11517/usr/include
11518/usr/local/include
11519/usr/unsupported/include
11520/usr/athena/include
11521/usr/local/x11r5/include
11522/usr/lpp/Xamples/include
11523
11524/usr/openwin/include
11525/usr/openwin/share/include'
11526
11527if test "$ac_x_includes" = no; then
11528  # Guess where to find include files, by looking for Xlib.h.
11529  # First, try using that file with no special directory specified.
11530  cat >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#include <X11/Xlib.h>
11537_ACEOF
11538if { (ac_try="$ac_cpp conftest.$ac_ext"
11539case "(($ac_try" in
11540  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11541  *) ac_try_echo=$ac_try;;
11542esac
11543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11544  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11545  ac_status=$?
11546  grep -v '^ *+' conftest.er1 >conftest.err
11547  rm -f conftest.er1
11548  cat conftest.err >&5
11549  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11550  (exit $ac_status); } >/dev/null && {
11551	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11552	 test ! -s conftest.err
11553       }; then
11554  # We can compile using X headers with no special include directory.
11555ac_x_includes=
11556else
11557  echo "$as_me: failed program was:" >&5
11558sed 's/^/| /' conftest.$ac_ext >&5
11559
11560  for ac_dir in $ac_x_header_dirs; do
11561  if test -r "$ac_dir/X11/Xlib.h"; then
11562    ac_x_includes=$ac_dir
11563    break
11564  fi
11565done
11566fi
11567
11568rm -f conftest.err conftest.$ac_ext
11569fi # $ac_x_includes = no
11570
11571if test "$ac_x_libraries" = no; then
11572  # Check for the libraries.
11573  # See if we find them without any special options.
11574  # Don't add to $LIBS permanently.
11575  ac_save_LIBS=$LIBS
11576  LIBS="-lX11 $LIBS"
11577  cat >conftest.$ac_ext <<_ACEOF
11578/* confdefs.h.  */
11579_ACEOF
11580cat confdefs.h >>conftest.$ac_ext
11581cat >>conftest.$ac_ext <<_ACEOF
11582/* end confdefs.h.  */
11583#include <X11/Xlib.h>
11584int
11585main ()
11586{
11587XrmInitialize ()
11588  ;
11589  return 0;
11590}
11591_ACEOF
11592rm -f conftest.$ac_objext conftest$ac_exeext
11593if { (ac_try="$ac_link"
11594case "(($ac_try" in
11595  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11596  *) ac_try_echo=$ac_try;;
11597esac
11598eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11599  (eval "$ac_link") 2>conftest.er1
11600  ac_status=$?
11601  grep -v '^ *+' conftest.er1 >conftest.err
11602  rm -f conftest.er1
11603  cat conftest.err >&5
11604  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11605  (exit $ac_status); } && {
11606	 test -z "$ac_c_werror_flag" ||
11607	 test ! -s conftest.err
11608       } && test -s conftest$ac_exeext &&
11609       $as_test_x conftest$ac_exeext; then
11610  LIBS=$ac_save_LIBS
11611# We can link X programs with no special library path.
11612ac_x_libraries=
11613else
11614  echo "$as_me: failed program was:" >&5
11615sed 's/^/| /' conftest.$ac_ext >&5
11616
11617	LIBS=$ac_save_LIBS
11618for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
11619do
11620  # Don't even attempt the hair of trying to link an X program!
11621  for ac_extension in a so sl dylib la dll; do
11622    if test -r "$ac_dir/libX11.$ac_extension"; then
11623      ac_x_libraries=$ac_dir
11624      break 2
11625    fi
11626  done
11627done
11628fi
11629
11630rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11631      conftest$ac_exeext conftest.$ac_ext
11632fi # $ac_x_libraries = no
11633
11634case $ac_x_includes,$ac_x_libraries in #(
11635  no,* | *,no | *\'*)
11636    # Didn't find X, or a directory has "'" in its name.
11637    ac_cv_have_x="have_x=no";; #(
11638  *)
11639    # Record where we found X for the cache.
11640    ac_cv_have_x="have_x=yes\
11641	ac_x_includes='$ac_x_includes'\
11642	ac_x_libraries='$ac_x_libraries'"
11643esac
11644fi
11645;; #(
11646    *) have_x=yes;;
11647  esac
11648  eval "$ac_cv_have_x"
11649fi # $with_x != no
11650
11651if test "$have_x" != yes; then
11652  { echo "$as_me:$LINENO: result: $have_x" >&5
11653echo "${ECHO_T}$have_x" >&6; }
11654  no_x=yes
11655else
11656  # If each of the values was on the command line, it overrides each guess.
11657  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
11658  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
11659  # Update the cache value to reflect the command line values.
11660  ac_cv_have_x="have_x=yes\
11661	ac_x_includes='$x_includes'\
11662	ac_x_libraries='$x_libraries'"
11663  { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
11664echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; }
11665fi
11666
11667    not_really_there=""
11668    if test "$no_x" = ""; then
11669	if test "$x_includes" = ""; then
11670	    cat >conftest.$ac_ext <<_ACEOF
11671/* confdefs.h.  */
11672_ACEOF
11673cat confdefs.h >>conftest.$ac_ext
11674cat >>conftest.$ac_ext <<_ACEOF
11675/* end confdefs.h.  */
11676#include <X11/XIntrinsic.h>
11677_ACEOF
11678if { (ac_try="$ac_cpp conftest.$ac_ext"
11679case "(($ac_try" in
11680  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11681  *) ac_try_echo=$ac_try;;
11682esac
11683eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11684  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11685  ac_status=$?
11686  grep -v '^ *+' conftest.er1 >conftest.err
11687  rm -f conftest.er1
11688  cat conftest.err >&5
11689  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11690  (exit $ac_status); } >/dev/null && {
11691	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11692	 test ! -s conftest.err
11693       }; then
11694  :
11695else
11696  echo "$as_me: failed program was:" >&5
11697sed 's/^/| /' conftest.$ac_ext >&5
11698
11699  not_really_there="yes"
11700fi
11701
11702rm -f conftest.err conftest.$ac_ext
11703	else
11704	    if test ! -r $x_includes/X11/Intrinsic.h; then
11705		not_really_there="yes"
11706	    fi
11707	fi
11708    fi
11709    if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
11710	{ echo "$as_me:$LINENO: checking for X11 header files" >&5
11711echo $ECHO_N "checking for X11 header files... $ECHO_C" >&6; }
11712	found_xincludes="no"
11713	cat >conftest.$ac_ext <<_ACEOF
11714/* confdefs.h.  */
11715_ACEOF
11716cat confdefs.h >>conftest.$ac_ext
11717cat >>conftest.$ac_ext <<_ACEOF
11718/* end confdefs.h.  */
11719#include <X11/Intrinsic.h>
11720_ACEOF
11721if { (ac_try="$ac_cpp conftest.$ac_ext"
11722case "(($ac_try" in
11723  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11724  *) ac_try_echo=$ac_try;;
11725esac
11726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11727  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11728  ac_status=$?
11729  grep -v '^ *+' conftest.er1 >conftest.err
11730  rm -f conftest.er1
11731  cat conftest.err >&5
11732  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11733  (exit $ac_status); } >/dev/null && {
11734	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11735	 test ! -s conftest.err
11736       }; then
11737  found_xincludes="yes"
11738else
11739  echo "$as_me: failed program was:" >&5
11740sed 's/^/| /' conftest.$ac_ext >&5
11741
11742  found_xincludes="no"
11743fi
11744
11745rm -f conftest.err conftest.$ac_ext
11746	if test "$found_xincludes" = "no"; then
11747	    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"
11748	    for i in $dirs ; do
11749		if test -r $i/X11/Intrinsic.h; then
11750		    { echo "$as_me:$LINENO: result: $i" >&5
11751echo "${ECHO_T}$i" >&6; }
11752		    XINCLUDES=" -I$i"
11753		    found_xincludes="yes"
11754		    break
11755		fi
11756	    done
11757	fi
11758    else
11759	if test "$x_includes" != ""; then
11760	    XINCLUDES="-I$x_includes"
11761	    found_xincludes="yes"
11762	fi
11763    fi
11764    if test "$found_xincludes" = "no"; then
11765	{ echo "$as_me:$LINENO: result: couldn't find any!" >&5
11766echo "${ECHO_T}couldn't find any!" >&6; }
11767    fi
11768
11769    if test "$no_x" = yes; then
11770	{ echo "$as_me:$LINENO: checking for X11 libraries" >&5
11771echo $ECHO_N "checking for X11 libraries... $ECHO_C" >&6; }
11772	XLIBSW=nope
11773	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"
11774	for i in $dirs ; do
11775	    if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl -o -r $i/libX11.dylib; then
11776		{ echo "$as_me:$LINENO: result: $i" >&5
11777echo "${ECHO_T}$i" >&6; }
11778		XLIBSW="-L$i -lX11"
11779		x_libraries="$i"
11780		break
11781	    fi
11782	done
11783    else
11784	if test "$x_libraries" = ""; then
11785	    XLIBSW=-lX11
11786	else
11787	    XLIBSW="-L$x_libraries -lX11"
11788	fi
11789    fi
11790    if test "$XLIBSW" = nope ; then
11791	{ echo "$as_me:$LINENO: checking for XCreateWindow in -lXwindow" >&5
11792echo $ECHO_N "checking for XCreateWindow in -lXwindow... $ECHO_C" >&6; }
11793if test "${ac_cv_lib_Xwindow_XCreateWindow+set}" = set; then
11794  echo $ECHO_N "(cached) $ECHO_C" >&6
11795else
11796  ac_check_lib_save_LIBS=$LIBS
11797LIBS="-lXwindow  $LIBS"
11798cat >conftest.$ac_ext <<_ACEOF
11799/* confdefs.h.  */
11800_ACEOF
11801cat confdefs.h >>conftest.$ac_ext
11802cat >>conftest.$ac_ext <<_ACEOF
11803/* end confdefs.h.  */
11804
11805/* Override any GCC internal prototype to avoid an error.
11806   Use char because int might match the return type of a GCC
11807   builtin and then its argument prototype would still apply.  */
11808#ifdef __cplusplus
11809extern "C"
11810#endif
11811char XCreateWindow ();
11812int
11813main ()
11814{
11815return XCreateWindow ();
11816  ;
11817  return 0;
11818}
11819_ACEOF
11820rm -f conftest.$ac_objext conftest$ac_exeext
11821if { (ac_try="$ac_link"
11822case "(($ac_try" in
11823  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11824  *) ac_try_echo=$ac_try;;
11825esac
11826eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11827  (eval "$ac_link") 2>conftest.er1
11828  ac_status=$?
11829  grep -v '^ *+' conftest.er1 >conftest.err
11830  rm -f conftest.er1
11831  cat conftest.err >&5
11832  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11833  (exit $ac_status); } && {
11834	 test -z "$ac_c_werror_flag" ||
11835	 test ! -s conftest.err
11836       } && test -s conftest$ac_exeext &&
11837       $as_test_x conftest$ac_exeext; then
11838  ac_cv_lib_Xwindow_XCreateWindow=yes
11839else
11840  echo "$as_me: failed program was:" >&5
11841sed 's/^/| /' conftest.$ac_ext >&5
11842
11843	ac_cv_lib_Xwindow_XCreateWindow=no
11844fi
11845
11846rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11847      conftest$ac_exeext conftest.$ac_ext
11848LIBS=$ac_check_lib_save_LIBS
11849fi
11850{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xwindow_XCreateWindow" >&5
11851echo "${ECHO_T}$ac_cv_lib_Xwindow_XCreateWindow" >&6; }
11852if test $ac_cv_lib_Xwindow_XCreateWindow = yes; then
11853  XLIBSW=-lXwindow
11854fi
11855
11856    fi
11857    if test "$XLIBSW" = nope ; then
11858	{ echo "$as_me:$LINENO: result: could not find any!  Using -lX11." >&5
11859echo "${ECHO_T}could not find any!  Using -lX11." >&6; }
11860	XLIBSW=-lX11
11861    fi
11862    # TEA specific:
11863    if test x"${XLIBSW}" != x ; then
11864	PKG_LIBS="${PKG_LIBS} ${XLIBSW}"
11865    fi
11866
11867    fi
11868
11869
11870#--------------------------------------------------------------------
11871# Everyone should be linking against the Tcl stub library.  If you
11872# can't for some reason, remove this definition.  If you aren't using
11873# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
11874# link against the non-stubbed Tcl library.
11875#--------------------------------------------------------------------
11876
11877cat >>confdefs.h <<\_ACEOF
11878#define USE_TCL_STUBS 1
11879_ACEOF
11880
11881cat >>confdefs.h <<\_ACEOF
11882#define USE_TK_STUBS 1
11883_ACEOF
11884
11885
11886#--------------------------------------------------------------------
11887# This macro generates a line to use when building a library.  It
11888# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
11889# and TEA_LOAD_TCLCONFIG macros above.
11890#--------------------------------------------------------------------
11891
11892
11893    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
11894	MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(PKG_OBJECTS)"
11895	MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\$@ \$(PKG_OBJECTS)"
11896	cat >conftest.$ac_ext <<_ACEOF
11897/* confdefs.h.  */
11898_ACEOF
11899cat confdefs.h >>conftest.$ac_ext
11900cat >>conftest.$ac_ext <<_ACEOF
11901/* end confdefs.h.  */
11902
11903#if defined(_MSC_VER) && _MSC_VER >= 1400
11904print("manifest needed")
11905#endif
11906
11907_ACEOF
11908if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11909  $EGREP "manifest needed" >/dev/null 2>&1; then
11910
11911	# Could do a CHECK_PROG for mt, but should always be with MSVC8+
11912	VC_MANIFEST_EMBED_DLL="mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;2"
11913	VC_MANIFEST_EMBED_EXE="mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;1"
11914	MAKE_SHARED_LIB="${MAKE_SHARED_LIB} ; ${VC_MANIFEST_EMBED_DLL}"
11915
11916    CLEANFILES="$CLEANFILES *.manifest"
11917
11918
11919fi
11920rm -f -r conftest*
11921
11922	MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(PKG_STUB_OBJECTS)"
11923    else
11924	MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(PKG_OBJECTS)"
11925	MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
11926	MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(PKG_STUB_OBJECTS)"
11927    fi
11928
11929    if test "${SHARED_BUILD}" = "1" ; then
11930	MAKE_LIB="${MAKE_SHARED_LIB} "
11931    else
11932	MAKE_LIB="${MAKE_STATIC_LIB} "
11933    fi
11934
11935    #--------------------------------------------------------------------
11936    # Shared libraries and static libraries have different names.
11937    # Use the double eval to make sure any variables in the suffix is
11938    # substituted. (@@@ Might not be necessary anymore)
11939    #--------------------------------------------------------------------
11940
11941    if test "${TEA_PLATFORM}" = "windows" ; then
11942	if test "${SHARED_BUILD}" = "1" ; then
11943	    # We force the unresolved linking of symbols that are really in
11944	    # the private libraries of Tcl and Tk.
11945	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
11946	    if test x"${TK_BIN_DIR}" != x ; then
11947		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
11948	    fi
11949	    eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
11950	else
11951	    eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
11952	fi
11953	# Some packages build their own stubs libraries
11954	eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
11955	if test "$GCC" = "yes"; then
11956	    PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
11957	fi
11958	# These aren't needed on Windows (either MSVC or gcc)
11959	RANLIB=:
11960	RANLIB_STUB=:
11961    else
11962	RANLIB_STUB="${RANLIB}"
11963	if test "${SHARED_BUILD}" = "1" ; then
11964	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
11965	    if test x"${TK_BIN_DIR}" != x ; then
11966		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
11967	    fi
11968	    eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
11969	    RANLIB=:
11970	else
11971	    eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
11972	fi
11973	# Some packages build their own stubs libraries
11974	eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
11975    fi
11976
11977    # These are escaped so that only CFLAGS is picked up at configure time.
11978    # The other values will be substituted at make time.
11979    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
11980    if test "${SHARED_BUILD}" = "1" ; then
11981	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
11982    fi
11983
11984
11985
11986
11987
11988
11989
11990
11991
11992
11993#--------------------------------------------------------------------
11994# __CHANGE__
11995# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
11996#--------------------------------------------------------------------
11997
11998if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
11999
12000    vars="\"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
12001    for i in $vars; do
12002	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
12003	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
12004	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
12005	fi
12006	PKG_LIBS="$PKG_LIBS $i"
12007    done
12008
12009
12010
12011    vars="\"`${CYGPATH} ${pngtcl_STUB_LIB_PATH}`\""
12012    for i in $vars; do
12013	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
12014	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
12015	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
12016	fi
12017	PKG_LIBS="$PKG_LIBS $i"
12018    done
12019
12020
12021else
12022
12023    vars="${tkimg_STUB_LIB_SPEC}"
12024    for i in $vars; do
12025	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
12026	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
12027	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
12028	fi
12029	PKG_LIBS="$PKG_LIBS $i"
12030    done
12031
12032
12033
12034    vars="${pngtcl_STUB_LIB_SPEC}"
12035    for i in $vars; do
12036	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
12037	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
12038	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
12039	fi
12040	PKG_LIBS="$PKG_LIBS $i"
12041    done
12042
12043
12044fi
12045
12046#--------------------------------------------------------------------
12047# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
12048# file during the install process.  Don't run the TCLSH_PROG through
12049# ${CYGPATH} because it's being used directly by make.
12050# Require that we use a tclsh shell version 8.2 or later since earlier
12051# versions have bugs in the pkg_mkIndex routine.
12052# Add WISH as well if this is a Tk extension.
12053#--------------------------------------------------------------------
12054
12055
12056    { echo "$as_me:$LINENO: checking for tclsh" >&5
12057echo $ECHO_N "checking for tclsh... $ECHO_C" >&6; }
12058    if test -f "${TCL_BIN_DIR}/Makefile" ; then
12059        # tclConfig.sh is in Tcl build directory
12060        if test "${TEA_PLATFORM}" = "windows"; then
12061            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
12062        else
12063            TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
12064        fi
12065    else
12066        # tclConfig.sh is in install location
12067        if test "${TEA_PLATFORM}" = "windows"; then
12068            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
12069        else
12070            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}"
12071        fi
12072        list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
12073              `ls -d ${TCL_BIN_DIR}/..     2>/dev/null` \
12074              `ls -d ${TCL_PREFIX}/bin     2>/dev/null`"
12075        for i in $list ; do
12076            if test -f "$i/${TCLSH_PROG}" ; then
12077                REAL_TCL_BIN_DIR="`cd "$i"; pwd`/"
12078                break
12079            fi
12080        done
12081        TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}"
12082    fi
12083    { echo "$as_me:$LINENO: result: ${TCLSH_PROG}" >&5
12084echo "${ECHO_T}${TCLSH_PROG}" >&6; }
12085
12086
12087
12088    { echo "$as_me:$LINENO: checking for wish" >&5
12089echo $ECHO_N "checking for wish... $ECHO_C" >&6; }
12090    if test -f "${TK_BIN_DIR}/Makefile" ; then
12091        # tkConfig.sh is in Tk build directory
12092        if test "${TEA_PLATFORM}" = "windows"; then
12093            WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}"
12094        else
12095            WISH_PROG="${TK_BIN_DIR}/wish"
12096        fi
12097    else
12098        # tkConfig.sh is in install location
12099        if test "${TEA_PLATFORM}" = "windows"; then
12100            WISH_PROG="wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}"
12101        else
12102            WISH_PROG="wish${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}${TK_DBGX}"
12103        fi
12104        list="`ls -d ${TK_BIN_DIR}/../bin 2>/dev/null` \
12105              `ls -d ${TK_BIN_DIR}/..     2>/dev/null` \
12106              `ls -d ${TK_PREFIX}/bin     2>/dev/null`"
12107        for i in $list ; do
12108            if test -f "$i/${WISH_PROG}" ; then
12109                REAL_TK_BIN_DIR="`cd "$i"; pwd`/"
12110                break
12111            fi
12112        done
12113        WISH_PROG="${REAL_TK_BIN_DIR}${WISH_PROG}"
12114    fi
12115    { echo "$as_me:$LINENO: result: ${WISH_PROG}" >&5
12116echo "${ECHO_T}${WISH_PROG}" >&6; }
12117
12118
12119
12120#--------------------------------------------------------------------
12121# Finally, substitute all of the various values into the Makefile.
12122# You may alternatively have a special pkgIndex.tcl.in or other files
12123# which require substituting th AC variables in.  Include these here.
12124#--------------------------------------------------------------------
12125
12126ac_config_files="$ac_config_files Makefile"
12127
12128cat >confcache <<\_ACEOF
12129# This file is a shell script that caches the results of configure
12130# tests run on this system so they can be shared between configure
12131# scripts and configure runs, see configure's option --config-cache.
12132# It is not useful on other systems.  If it contains results you don't
12133# want to keep, you may remove or edit it.
12134#
12135# config.status only pays attention to the cache file if you give it
12136# the --recheck option to rerun configure.
12137#
12138# `ac_cv_env_foo' variables (set or unset) will be overridden when
12139# loading this file, other *unset* `ac_cv_foo' will be assigned the
12140# following values.
12141
12142_ACEOF
12143
12144# The following way of writing the cache mishandles newlines in values,
12145# but we know of no workaround that is simple, portable, and efficient.
12146# So, we kill variables containing newlines.
12147# Ultrix sh set writes to stderr and can't be redirected directly,
12148# and sets the high bit in the cache file unless we assign to the vars.
12149(
12150  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
12151    eval ac_val=\$$ac_var
12152    case $ac_val in #(
12153    *${as_nl}*)
12154      case $ac_var in #(
12155      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
12156echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
12157      esac
12158      case $ac_var in #(
12159      _ | IFS | as_nl) ;; #(
12160      *) $as_unset $ac_var ;;
12161      esac ;;
12162    esac
12163  done
12164
12165  (set) 2>&1 |
12166    case $as_nl`(ac_space=' '; set) 2>&1` in #(
12167    *${as_nl}ac_space=\ *)
12168      # `set' does not quote correctly, so add quotes (double-quote
12169      # substitution turns \\\\ into \\, and sed turns \\ into \).
12170      sed -n \
12171	"s/'/'\\\\''/g;
12172	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
12173      ;; #(
12174    *)
12175      # `set' quotes correctly as required by POSIX, so do not add quotes.
12176      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
12177      ;;
12178    esac |
12179    sort
12180) |
12181  sed '
12182     /^ac_cv_env_/b end
12183     t clear
12184     :clear
12185     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
12186     t end
12187     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
12188     :end' >>confcache
12189if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
12190  if test -w "$cache_file"; then
12191    test "x$cache_file" != "x/dev/null" &&
12192      { echo "$as_me:$LINENO: updating cache $cache_file" >&5
12193echo "$as_me: updating cache $cache_file" >&6;}
12194    cat confcache >$cache_file
12195  else
12196    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
12197echo "$as_me: not updating unwritable cache $cache_file" >&6;}
12198  fi
12199fi
12200rm -f confcache
12201
12202test "x$prefix" = xNONE && prefix=$ac_default_prefix
12203# Let make expand exec_prefix.
12204test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12205
12206# Transform confdefs.h into DEFS.
12207# Protect against shell expansion while executing Makefile rules.
12208# Protect against Makefile macro expansion.
12209#
12210# If the first sed substitution is executed (which looks for macros that
12211# take arguments), then branch to the quote section.  Otherwise,
12212# look for a macro that doesn't take arguments.
12213ac_script='
12214t clear
12215:clear
12216s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
12217t quote
12218s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
12219t quote
12220b any
12221:quote
12222s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
12223s/\[/\\&/g
12224s/\]/\\&/g
12225s/\$/$$/g
12226H
12227:any
12228${
12229	g
12230	s/^\n//
12231	s/\n/ /g
12232	p
12233}
12234'
12235DEFS=`sed -n "$ac_script" confdefs.h`
12236
12237
12238ac_libobjs=
12239ac_ltlibobjs=
12240for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
12241  # 1. Remove the extension, and $U if already installed.
12242  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
12243  ac_i=`echo "$ac_i" | sed "$ac_script"`
12244  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
12245  #    will be set to the directory where LIBOBJS objects are built.
12246  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
12247  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
12248done
12249LIBOBJS=$ac_libobjs
12250
12251LTLIBOBJS=$ac_ltlibobjs
12252
12253
12254CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""
12255
12256: ${CONFIG_STATUS=./config.status}
12257ac_clean_files_save=$ac_clean_files
12258ac_clean_files="$ac_clean_files $CONFIG_STATUS"
12259{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
12260echo "$as_me: creating $CONFIG_STATUS" >&6;}
12261cat >$CONFIG_STATUS <<_ACEOF
12262#! $SHELL
12263# Generated by $as_me.
12264# Run this file to recreate the current configuration.
12265# Compiler output produced by configure, useful for debugging
12266# configure, is in config.log if it exists.
12267
12268debug=false
12269ac_cs_recheck=false
12270ac_cs_silent=false
12271SHELL=\${CONFIG_SHELL-$SHELL}
12272_ACEOF
12273
12274cat >>$CONFIG_STATUS <<\_ACEOF
12275## --------------------- ##
12276## M4sh Initialization.  ##
12277## --------------------- ##
12278
12279# Be more Bourne compatible
12280DUALCASE=1; export DUALCASE # for MKS sh
12281if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
12282  emulate sh
12283  NULLCMD=:
12284  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
12285  # is contrary to our usage.  Disable this feature.
12286  alias -g '${1+"$@"}'='"$@"'
12287  setopt NO_GLOB_SUBST
12288else
12289  case `(set -o) 2>/dev/null` in
12290  *posix*) set -o posix ;;
12291esac
12292
12293fi
12294
12295
12296
12297
12298# PATH needs CR
12299# Avoid depending upon Character Ranges.
12300as_cr_letters='abcdefghijklmnopqrstuvwxyz'
12301as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
12302as_cr_Letters=$as_cr_letters$as_cr_LETTERS
12303as_cr_digits='0123456789'
12304as_cr_alnum=$as_cr_Letters$as_cr_digits
12305
12306# The user is always right.
12307if test "${PATH_SEPARATOR+set}" != set; then
12308  echo "#! /bin/sh" >conf$$.sh
12309  echo  "exit 0"   >>conf$$.sh
12310  chmod +x conf$$.sh
12311  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
12312    PATH_SEPARATOR=';'
12313  else
12314    PATH_SEPARATOR=:
12315  fi
12316  rm -f conf$$.sh
12317fi
12318
12319# Support unset when possible.
12320if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
12321  as_unset=unset
12322else
12323  as_unset=false
12324fi
12325
12326
12327# IFS
12328# We need space, tab and new line, in precisely that order.  Quoting is
12329# there to prevent editors from complaining about space-tab.
12330# (If _AS_PATH_WALK were called with IFS unset, it would disable word
12331# splitting by setting IFS to empty value.)
12332as_nl='
12333'
12334IFS=" ""	$as_nl"
12335
12336# Find who we are.  Look in the path if we contain no directory separator.
12337case $0 in
12338  *[\\/]* ) as_myself=$0 ;;
12339  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12340for as_dir in $PATH
12341do
12342  IFS=$as_save_IFS
12343  test -z "$as_dir" && as_dir=.
12344  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
12345done
12346IFS=$as_save_IFS
12347
12348     ;;
12349esac
12350# We did not find ourselves, most probably we were run as `sh COMMAND'
12351# in which case we are not to be found in the path.
12352if test "x$as_myself" = x; then
12353  as_myself=$0
12354fi
12355if test ! -f "$as_myself"; then
12356  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
12357  { (exit 1); exit 1; }
12358fi
12359
12360# Work around bugs in pre-3.0 UWIN ksh.
12361for as_var in ENV MAIL MAILPATH
12362do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
12363done
12364PS1='$ '
12365PS2='> '
12366PS4='+ '
12367
12368# NLS nuisances.
12369for as_var in \
12370  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
12371  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
12372  LC_TELEPHONE LC_TIME
12373do
12374  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
12375    eval $as_var=C; export $as_var
12376  else
12377    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
12378  fi
12379done
12380
12381# Required to use basename.
12382if expr a : '\(a\)' >/dev/null 2>&1 &&
12383   test "X`expr 00001 : '.*\(...\)'`" = X001; then
12384  as_expr=expr
12385else
12386  as_expr=false
12387fi
12388
12389if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
12390  as_basename=basename
12391else
12392  as_basename=false
12393fi
12394
12395
12396# Name of the executable.
12397as_me=`$as_basename -- "$0" ||
12398$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
12399	 X"$0" : 'X\(//\)$' \| \
12400	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
12401echo X/"$0" |
12402    sed '/^.*\/\([^/][^/]*\)\/*$/{
12403	    s//\1/
12404	    q
12405	  }
12406	  /^X\/\(\/\/\)$/{
12407	    s//\1/
12408	    q
12409	  }
12410	  /^X\/\(\/\).*/{
12411	    s//\1/
12412	    q
12413	  }
12414	  s/.*/./; q'`
12415
12416# CDPATH.
12417$as_unset CDPATH
12418
12419
12420
12421  as_lineno_1=$LINENO
12422  as_lineno_2=$LINENO
12423  test "x$as_lineno_1" != "x$as_lineno_2" &&
12424  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
12425
12426  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
12427  # uniformly replaced by the line number.  The first 'sed' inserts a
12428  # line-number line after each line using $LINENO; the second 'sed'
12429  # does the real work.  The second script uses 'N' to pair each
12430  # line-number line with the line containing $LINENO, and appends
12431  # trailing '-' during substitution so that $LINENO is not a special
12432  # case at line end.
12433  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
12434  # scripts with optimization help from Paolo Bonzini.  Blame Lee
12435  # E. McMahon (1931-1989) for sed's syntax.  :-)
12436  sed -n '
12437    p
12438    /[$]LINENO/=
12439  ' <$as_myself |
12440    sed '
12441      s/[$]LINENO.*/&-/
12442      t lineno
12443      b
12444      :lineno
12445      N
12446      :loop
12447      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
12448      t loop
12449      s/-\n.*//
12450    ' >$as_me.lineno &&
12451  chmod +x "$as_me.lineno" ||
12452    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
12453   { (exit 1); exit 1; }; }
12454
12455  # Don't try to exec as it changes $[0], causing all sort of problems
12456  # (the dirname of $[0] is not the place where we might find the
12457  # original and so on.  Autoconf is especially sensitive to this).
12458  . "./$as_me.lineno"
12459  # Exit status is that of the last command.
12460  exit
12461}
12462
12463
12464if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
12465  as_dirname=dirname
12466else
12467  as_dirname=false
12468fi
12469
12470ECHO_C= ECHO_N= ECHO_T=
12471case `echo -n x` in
12472-n*)
12473  case `echo 'x\c'` in
12474  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
12475  *)   ECHO_C='\c';;
12476  esac;;
12477*)
12478  ECHO_N='-n';;
12479esac
12480
12481if expr a : '\(a\)' >/dev/null 2>&1 &&
12482   test "X`expr 00001 : '.*\(...\)'`" = X001; then
12483  as_expr=expr
12484else
12485  as_expr=false
12486fi
12487
12488rm -f conf$$ conf$$.exe conf$$.file
12489if test -d conf$$.dir; then
12490  rm -f conf$$.dir/conf$$.file
12491else
12492  rm -f conf$$.dir
12493  mkdir conf$$.dir
12494fi
12495echo >conf$$.file
12496if ln -s conf$$.file conf$$ 2>/dev/null; then
12497  as_ln_s='ln -s'
12498  # ... but there are two gotchas:
12499  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
12500  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
12501  # In both cases, we have to default to `cp -p'.
12502  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
12503    as_ln_s='cp -p'
12504elif ln conf$$.file conf$$ 2>/dev/null; then
12505  as_ln_s=ln
12506else
12507  as_ln_s='cp -p'
12508fi
12509rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
12510rmdir conf$$.dir 2>/dev/null
12511
12512if mkdir -p . 2>/dev/null; then
12513  as_mkdir_p=:
12514else
12515  test -d ./-p && rmdir ./-p
12516  as_mkdir_p=false
12517fi
12518
12519if test -x / >/dev/null 2>&1; then
12520  as_test_x='test -x'
12521else
12522  if ls -dL / >/dev/null 2>&1; then
12523    as_ls_L_option=L
12524  else
12525    as_ls_L_option=
12526  fi
12527  as_test_x='
12528    eval sh -c '\''
12529      if test -d "$1"; then
12530        test -d "$1/.";
12531      else
12532	case $1 in
12533        -*)set "./$1";;
12534	esac;
12535	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
12536	???[sx]*):;;*)false;;esac;fi
12537    '\'' sh
12538  '
12539fi
12540as_executable_p=$as_test_x
12541
12542# Sed expression to map a string onto a valid CPP name.
12543as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
12544
12545# Sed expression to map a string onto a valid variable name.
12546as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
12547
12548
12549exec 6>&1
12550
12551# Save the log message, to keep $[0] and so on meaningful, and to
12552# report actual input values of CONFIG_FILES etc. instead of their
12553# values after options handling.
12554ac_log="
12555This file was extended by tkimgpng $as_me 1.4, which was
12556generated by GNU Autoconf 2.61.  Invocation command line was
12557
12558  CONFIG_FILES    = $CONFIG_FILES
12559  CONFIG_HEADERS  = $CONFIG_HEADERS
12560  CONFIG_LINKS    = $CONFIG_LINKS
12561  CONFIG_COMMANDS = $CONFIG_COMMANDS
12562  $ $0 $@
12563
12564on `(hostname || uname -n) 2>/dev/null | sed 1q`
12565"
12566
12567_ACEOF
12568
12569cat >>$CONFIG_STATUS <<_ACEOF
12570# Files that config.status was made for.
12571config_files="$ac_config_files"
12572
12573_ACEOF
12574
12575cat >>$CONFIG_STATUS <<\_ACEOF
12576ac_cs_usage="\
12577\`$as_me' instantiates files from templates according to the
12578current configuration.
12579
12580Usage: $0 [OPTIONS] [FILE]...
12581
12582  -h, --help       print this help, then exit
12583  -V, --version    print version number and configuration settings, then exit
12584  -q, --quiet      do not print progress messages
12585  -d, --debug      don't remove temporary files
12586      --recheck    update $as_me by reconfiguring in the same conditions
12587  --file=FILE[:TEMPLATE]
12588		   instantiate the configuration file FILE
12589
12590Configuration files:
12591$config_files
12592
12593Report bugs to <bug-autoconf@gnu.org>."
12594
12595_ACEOF
12596cat >>$CONFIG_STATUS <<_ACEOF
12597ac_cs_version="\\
12598tkimgpng config.status 1.4
12599configured by $0, generated by GNU Autoconf 2.61,
12600  with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
12601
12602Copyright (C) 2006 Free Software Foundation, Inc.
12603This config.status script is free software; the Free Software Foundation
12604gives unlimited permission to copy, distribute and modify it."
12605
12606ac_pwd='$ac_pwd'
12607srcdir='$srcdir'
12608INSTALL='$INSTALL'
12609_ACEOF
12610
12611cat >>$CONFIG_STATUS <<\_ACEOF
12612# If no file are specified by the user, then we need to provide default
12613# value.  By we need to know if files were specified by the user.
12614ac_need_defaults=:
12615while test $# != 0
12616do
12617  case $1 in
12618  --*=*)
12619    ac_option=`expr "X$1" : 'X\([^=]*\)='`
12620    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
12621    ac_shift=:
12622    ;;
12623  *)
12624    ac_option=$1
12625    ac_optarg=$2
12626    ac_shift=shift
12627    ;;
12628  esac
12629
12630  case $ac_option in
12631  # Handling of the options.
12632  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12633    ac_cs_recheck=: ;;
12634  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
12635    echo "$ac_cs_version"; exit ;;
12636  --debug | --debu | --deb | --de | --d | -d )
12637    debug=: ;;
12638  --file | --fil | --fi | --f )
12639    $ac_shift
12640    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
12641    ac_need_defaults=false;;
12642  --he | --h |  --help | --hel | -h )
12643    echo "$ac_cs_usage"; exit ;;
12644  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
12645  | -silent | --silent | --silen | --sile | --sil | --si | --s)
12646    ac_cs_silent=: ;;
12647
12648  # This is an error.
12649  -*) { echo "$as_me: error: unrecognized option: $1
12650Try \`$0 --help' for more information." >&2
12651   { (exit 1); exit 1; }; } ;;
12652
12653  *) ac_config_targets="$ac_config_targets $1"
12654     ac_need_defaults=false ;;
12655
12656  esac
12657  shift
12658done
12659
12660ac_configure_extra_args=
12661
12662if $ac_cs_silent; then
12663  exec 6>/dev/null
12664  ac_configure_extra_args="$ac_configure_extra_args --silent"
12665fi
12666
12667_ACEOF
12668cat >>$CONFIG_STATUS <<_ACEOF
12669if \$ac_cs_recheck; then
12670  echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
12671  CONFIG_SHELL=$SHELL
12672  export CONFIG_SHELL
12673  exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
12674fi
12675
12676_ACEOF
12677cat >>$CONFIG_STATUS <<\_ACEOF
12678exec 5>>config.log
12679{
12680  echo
12681  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
12682## Running $as_me. ##
12683_ASBOX
12684  echo "$ac_log"
12685} >&5
12686
12687_ACEOF
12688cat >>$CONFIG_STATUS <<_ACEOF
12689_ACEOF
12690
12691cat >>$CONFIG_STATUS <<\_ACEOF
12692
12693# Handling of arguments.
12694for ac_config_target in $ac_config_targets
12695do
12696  case $ac_config_target in
12697    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
12698
12699  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
12700echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
12701   { (exit 1); exit 1; }; };;
12702  esac
12703done
12704
12705
12706# If the user did not use the arguments to specify the items to instantiate,
12707# then the envvar interface is used.  Set only those that are not.
12708# We use the long form for the default assignment because of an extremely
12709# bizarre bug on SunOS 4.1.3.
12710if $ac_need_defaults; then
12711  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
12712fi
12713
12714# Have a temporary directory for convenience.  Make it in the build tree
12715# simply because there is no reason against having it here, and in addition,
12716# creating and moving files from /tmp can sometimes cause problems.
12717# Hook for its removal unless debugging.
12718# Note that there is a small window in which the directory will not be cleaned:
12719# after its creation but before its name has been assigned to `$tmp'.
12720$debug ||
12721{
12722  tmp=
12723  trap 'exit_status=$?
12724  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
12725' 0
12726  trap '{ (exit 1); exit 1; }' 1 2 13 15
12727}
12728# Create a (secure) tmp directory for tmp files.
12729
12730{
12731  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
12732  test -n "$tmp" && test -d "$tmp"
12733}  ||
12734{
12735  tmp=./conf$$-$RANDOM
12736  (umask 077 && mkdir "$tmp")
12737} ||
12738{
12739   echo "$me: cannot create a temporary directory in ." >&2
12740   { (exit 1); exit 1; }
12741}
12742
12743#
12744# Set up the sed scripts for CONFIG_FILES section.
12745#
12746
12747# No need to generate the scripts if there are no CONFIG_FILES.
12748# This happens for instance when ./config.status config.h
12749if test -n "$CONFIG_FILES"; then
12750
12751_ACEOF
12752
12753
12754
12755ac_delim='%!_!# '
12756for ac_last_try in false false false false false :; do
12757  cat >conf$$subs.sed <<_ACEOF
12758SHELL!$SHELL$ac_delim
12759PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
12760PACKAGE_NAME!$PACKAGE_NAME$ac_delim
12761PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
12762PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
12763PACKAGE_STRING!$PACKAGE_STRING$ac_delim
12764PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
12765exec_prefix!$exec_prefix$ac_delim
12766prefix!$prefix$ac_delim
12767program_transform_name!$program_transform_name$ac_delim
12768bindir!$bindir$ac_delim
12769sbindir!$sbindir$ac_delim
12770libexecdir!$libexecdir$ac_delim
12771datarootdir!$datarootdir$ac_delim
12772datadir!$datadir$ac_delim
12773sysconfdir!$sysconfdir$ac_delim
12774sharedstatedir!$sharedstatedir$ac_delim
12775localstatedir!$localstatedir$ac_delim
12776includedir!$includedir$ac_delim
12777oldincludedir!$oldincludedir$ac_delim
12778docdir!$docdir$ac_delim
12779infodir!$infodir$ac_delim
12780htmldir!$htmldir$ac_delim
12781dvidir!$dvidir$ac_delim
12782pdfdir!$pdfdir$ac_delim
12783psdir!$psdir$ac_delim
12784libdir!$libdir$ac_delim
12785localedir!$localedir$ac_delim
12786mandir!$mandir$ac_delim
12787DEFS!$DEFS$ac_delim
12788ECHO_C!$ECHO_C$ac_delim
12789ECHO_N!$ECHO_N$ac_delim
12790ECHO_T!$ECHO_T$ac_delim
12791LIBS!$LIBS$ac_delim
12792build_alias!$build_alias$ac_delim
12793host_alias!$host_alias$ac_delim
12794target_alias!$target_alias$ac_delim
12795CYGPATH!$CYGPATH$ac_delim
12796EXEEXT!$EXEEXT$ac_delim
12797PKG_LIB_FILE!$PKG_LIB_FILE$ac_delim
12798PKG_STUB_LIB_FILE!$PKG_STUB_LIB_FILE$ac_delim
12799PKG_STUB_SOURCES!$PKG_STUB_SOURCES$ac_delim
12800PKG_STUB_OBJECTS!$PKG_STUB_OBJECTS$ac_delim
12801PKG_TCL_SOURCES!$PKG_TCL_SOURCES$ac_delim
12802PKG_HEADERS!$PKG_HEADERS$ac_delim
12803PKG_INCLUDES!$PKG_INCLUDES$ac_delim
12804PKG_LIBS!$PKG_LIBS$ac_delim
12805PKG_CFLAGS!$PKG_CFLAGS$ac_delim
12806PACKAGE_TCLNAME!$PACKAGE_TCLNAME$ac_delim
12807TCL_VERSION!$TCL_VERSION$ac_delim
12808TCL_PATCH_LEVEL!$TCL_PATCH_LEVEL$ac_delim
12809TCL_BIN_DIR!$TCL_BIN_DIR$ac_delim
12810TCL_SRC_DIR!$TCL_SRC_DIR$ac_delim
12811TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim
12812TCL_LIB_FLAG!$TCL_LIB_FLAG$ac_delim
12813TCL_LIB_SPEC!$TCL_LIB_SPEC$ac_delim
12814TCL_STUB_LIB_FILE!$TCL_STUB_LIB_FILE$ac_delim
12815TCL_STUB_LIB_FLAG!$TCL_STUB_LIB_FLAG$ac_delim
12816TCL_STUB_LIB_SPEC!$TCL_STUB_LIB_SPEC$ac_delim
12817CLEANFILES!$CLEANFILES$ac_delim
12818TCL_LIBS!$TCL_LIBS$ac_delim
12819TCL_DEFS!$TCL_DEFS$ac_delim
12820TCL_EXTRA_CFLAGS!$TCL_EXTRA_CFLAGS$ac_delim
12821TCL_LD_FLAGS!$TCL_LD_FLAGS$ac_delim
12822TCL_SHLIB_LD_LIBS!$TCL_SHLIB_LD_LIBS$ac_delim
12823TK_VERSION!$TK_VERSION$ac_delim
12824TK_BIN_DIR!$TK_BIN_DIR$ac_delim
12825TK_SRC_DIR!$TK_SRC_DIR$ac_delim
12826TK_LIB_FILE!$TK_LIB_FILE$ac_delim
12827TK_LIB_FLAG!$TK_LIB_FLAG$ac_delim
12828TK_LIB_SPEC!$TK_LIB_SPEC$ac_delim
12829TK_STUB_LIB_FILE!$TK_STUB_LIB_FILE$ac_delim
12830TK_STUB_LIB_FLAG!$TK_STUB_LIB_FLAG$ac_delim
12831TK_STUB_LIB_SPEC!$TK_STUB_LIB_SPEC$ac_delim
12832TK_LIBS!$TK_LIBS$ac_delim
12833TK_XINCLUDES!$TK_XINCLUDES$ac_delim
12834CC!$CC$ac_delim
12835CFLAGS!$CFLAGS$ac_delim
12836LDFLAGS!$LDFLAGS$ac_delim
12837CPPFLAGS!$CPPFLAGS$ac_delim
12838ac_ct_CC!$ac_ct_CC$ac_delim
12839OBJEXT!$OBJEXT$ac_delim
12840CPP!$CPP$ac_delim
12841INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
12842INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
12843INSTALL_DATA!$INSTALL_DATA$ac_delim
12844SET_MAKE!$SET_MAKE$ac_delim
12845RANLIB!$RANLIB$ac_delim
12846GREP!$GREP$ac_delim
12847EGREP!$EGREP$ac_delim
12848MATH_LIBS!$MATH_LIBS$ac_delim
12849tkimg_VERSION!$tkimg_VERSION$ac_delim
12850tkimg_BIN_DIR!$tkimg_BIN_DIR$ac_delim
12851tkimg_SRC_DIR!$tkimg_SRC_DIR$ac_delim
12852tkimg_LIB_FILE!$tkimg_LIB_FILE$ac_delim
12853tkimg_LIB_SPEC!$tkimg_LIB_SPEC$ac_delim
12854tkimg_STUB_LIB_FILE!$tkimg_STUB_LIB_FILE$ac_delim
12855_ACEOF
12856
12857  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
12858    break
12859  elif $ac_last_try; then
12860    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
12861echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
12862   { (exit 1); exit 1; }; }
12863  else
12864    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
12865  fi
12866done
12867
12868ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
12869if test -n "$ac_eof"; then
12870  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
12871  ac_eof=`expr $ac_eof + 1`
12872fi
12873
12874cat >>$CONFIG_STATUS <<_ACEOF
12875cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
12876/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
12877_ACEOF
12878sed '
12879s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
12880s/^/s,@/; s/!/@,|#_!!_#|/
12881:n
12882t n
12883s/'"$ac_delim"'$/,g/; t
12884s/$/\\/; p
12885N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
12886' >>$CONFIG_STATUS <conf$$subs.sed
12887rm -f conf$$subs.sed
12888cat >>$CONFIG_STATUS <<_ACEOF
12889CEOF$ac_eof
12890_ACEOF
12891
12892
12893ac_delim='%!_!# '
12894for ac_last_try in false false false false false :; do
12895  cat >conf$$subs.sed <<_ACEOF
12896tkimg_STUB_LIB_SPEC!$tkimg_STUB_LIB_SPEC$ac_delim
12897tkimg_STUB_LIB_PATH!$tkimg_STUB_LIB_PATH$ac_delim
12898pngtcl_VERSION!$pngtcl_VERSION$ac_delim
12899pngtcl_BIN_DIR!$pngtcl_BIN_DIR$ac_delim
12900pngtcl_SRC_DIR!$pngtcl_SRC_DIR$ac_delim
12901pngtcl_LIB_FILE!$pngtcl_LIB_FILE$ac_delim
12902pngtcl_LIB_SPEC!$pngtcl_LIB_SPEC$ac_delim
12903pngtcl_STUB_LIB_FILE!$pngtcl_STUB_LIB_FILE$ac_delim
12904pngtcl_STUB_LIB_SPEC!$pngtcl_STUB_LIB_SPEC$ac_delim
12905pngtcl_STUB_LIB_PATH!$pngtcl_STUB_LIB_PATH$ac_delim
12906zlibtcl_VERSION!$zlibtcl_VERSION$ac_delim
12907zlibtcl_BIN_DIR!$zlibtcl_BIN_DIR$ac_delim
12908zlibtcl_SRC_DIR!$zlibtcl_SRC_DIR$ac_delim
12909zlibtcl_LIB_FILE!$zlibtcl_LIB_FILE$ac_delim
12910zlibtcl_LIB_SPEC!$zlibtcl_LIB_SPEC$ac_delim
12911zlibtcl_STUB_LIB_FILE!$zlibtcl_STUB_LIB_FILE$ac_delim
12912zlibtcl_STUB_LIB_SPEC!$zlibtcl_STUB_LIB_SPEC$ac_delim
12913zlibtcl_STUB_LIB_PATH!$zlibtcl_STUB_LIB_PATH$ac_delim
12914tkimg_SRC_PATH!$tkimg_SRC_PATH$ac_delim
12915tkimg_BUILD_PATH!$tkimg_BUILD_PATH$ac_delim
12916pngtcl_SRC_PATH!$pngtcl_SRC_PATH$ac_delim
12917pngtcl_BUILD_PATH!$pngtcl_BUILD_PATH$ac_delim
12918zlibtcl_SRC_PATH!$zlibtcl_SRC_PATH$ac_delim
12919zlibtcl_BUILD_PATH!$zlibtcl_BUILD_PATH$ac_delim
12920PKG_SOURCES!$PKG_SOURCES$ac_delim
12921PKG_OBJECTS!$PKG_OBJECTS$ac_delim
12922TCL_INCLUDES!$TCL_INCLUDES$ac_delim
12923TK_INCLUDES!$TK_INCLUDES$ac_delim
12924TCL_THREADS!$TCL_THREADS$ac_delim
12925SHARED_BUILD!$SHARED_BUILD$ac_delim
12926AR!$AR$ac_delim
12927CELIB_DIR!$CELIB_DIR$ac_delim
12928CFLAGS_DEBUG!$CFLAGS_DEBUG$ac_delim
12929CFLAGS_OPTIMIZE!$CFLAGS_OPTIMIZE$ac_delim
12930CFLAGS_WARNING!$CFLAGS_WARNING$ac_delim
12931STLIB_LD!$STLIB_LD$ac_delim
12932SHLIB_LD!$SHLIB_LD$ac_delim
12933SHLIB_LD_LIBS!$SHLIB_LD_LIBS$ac_delim
12934SHLIB_CFLAGS!$SHLIB_CFLAGS$ac_delim
12935LD_LIBRARY_PATH_VAR!$LD_LIBRARY_PATH_VAR$ac_delim
12936CFLAGS_DEFAULT!$CFLAGS_DEFAULT$ac_delim
12937LDFLAGS_DEFAULT!$LDFLAGS_DEFAULT$ac_delim
12938TCL_DBGX!$TCL_DBGX$ac_delim
12939XMKMF!$XMKMF$ac_delim
12940MAKE_LIB!$MAKE_LIB$ac_delim
12941MAKE_SHARED_LIB!$MAKE_SHARED_LIB$ac_delim
12942MAKE_STATIC_LIB!$MAKE_STATIC_LIB$ac_delim
12943MAKE_STUB_LIB!$MAKE_STUB_LIB$ac_delim
12944RANLIB_STUB!$RANLIB_STUB$ac_delim
12945VC_MANIFEST_EMBED_DLL!$VC_MANIFEST_EMBED_DLL$ac_delim
12946VC_MANIFEST_EMBED_EXE!$VC_MANIFEST_EMBED_EXE$ac_delim
12947TCLSH_PROG!$TCLSH_PROG$ac_delim
12948WISH_PROG!$WISH_PROG$ac_delim
12949LIBOBJS!$LIBOBJS$ac_delim
12950LTLIBOBJS!$LTLIBOBJS$ac_delim
12951_ACEOF
12952
12953  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 55; then
12954    break
12955  elif $ac_last_try; then
12956    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
12957echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
12958   { (exit 1); exit 1; }; }
12959  else
12960    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
12961  fi
12962done
12963
12964ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
12965if test -n "$ac_eof"; then
12966  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
12967  ac_eof=`expr $ac_eof + 1`
12968fi
12969
12970cat >>$CONFIG_STATUS <<_ACEOF
12971cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
12972/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
12973_ACEOF
12974sed '
12975s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
12976s/^/s,@/; s/!/@,|#_!!_#|/
12977:n
12978t n
12979s/'"$ac_delim"'$/,g/; t
12980s/$/\\/; p
12981N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
12982' >>$CONFIG_STATUS <conf$$subs.sed
12983rm -f conf$$subs.sed
12984cat >>$CONFIG_STATUS <<_ACEOF
12985:end
12986s/|#_!!_#|//g
12987CEOF$ac_eof
12988_ACEOF
12989
12990
12991# VPATH may cause trouble with some makes, so we remove $(srcdir),
12992# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
12993# trailing colons and then remove the whole line if VPATH becomes empty
12994# (actually we leave an empty line to preserve line numbers).
12995if test "x$srcdir" = x.; then
12996  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
12997s/:*\$(srcdir):*/:/
12998s/:*\${srcdir}:*/:/
12999s/:*@srcdir@:*/:/
13000s/^\([^=]*=[	 ]*\):*/\1/
13001s/:*$//
13002s/^[^=]*=[	 ]*$//
13003}'
13004fi
13005
13006cat >>$CONFIG_STATUS <<\_ACEOF
13007fi # test -n "$CONFIG_FILES"
13008
13009
13010for ac_tag in  :F $CONFIG_FILES
13011do
13012  case $ac_tag in
13013  :[FHLC]) ac_mode=$ac_tag; continue;;
13014  esac
13015  case $ac_mode$ac_tag in
13016  :[FHL]*:*);;
13017  :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
13018echo "$as_me: error: Invalid tag $ac_tag." >&2;}
13019   { (exit 1); exit 1; }; };;
13020  :[FH]-) ac_tag=-:-;;
13021  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
13022  esac
13023  ac_save_IFS=$IFS
13024  IFS=:
13025  set x $ac_tag
13026  IFS=$ac_save_IFS
13027  shift
13028  ac_file=$1
13029  shift
13030
13031  case $ac_mode in
13032  :L) ac_source=$1;;
13033  :[FH])
13034    ac_file_inputs=
13035    for ac_f
13036    do
13037      case $ac_f in
13038      -) ac_f="$tmp/stdin";;
13039      *) # Look for the file first in the build tree, then in the source tree
13040	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
13041	 # because $ac_f cannot contain `:'.
13042	 test -f "$ac_f" ||
13043	   case $ac_f in
13044	   [\\/$]*) false;;
13045	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
13046	   esac ||
13047	   { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
13048echo "$as_me: error: cannot find input file: $ac_f" >&2;}
13049   { (exit 1); exit 1; }; };;
13050      esac
13051      ac_file_inputs="$ac_file_inputs $ac_f"
13052    done
13053
13054    # Let's still pretend it is `configure' which instantiates (i.e., don't
13055    # use $as_me), people would be surprised to read:
13056    #    /* config.h.  Generated by config.status.  */
13057    configure_input="Generated from "`IFS=:
13058	  echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
13059    if test x"$ac_file" != x-; then
13060      configure_input="$ac_file.  $configure_input"
13061      { echo "$as_me:$LINENO: creating $ac_file" >&5
13062echo "$as_me: creating $ac_file" >&6;}
13063    fi
13064
13065    case $ac_tag in
13066    *:-:* | *:-) cat >"$tmp/stdin";;
13067    esac
13068    ;;
13069  esac
13070
13071  ac_dir=`$as_dirname -- "$ac_file" ||
13072$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13073	 X"$ac_file" : 'X\(//\)[^/]' \| \
13074	 X"$ac_file" : 'X\(//\)$' \| \
13075	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
13076echo X"$ac_file" |
13077    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
13078	    s//\1/
13079	    q
13080	  }
13081	  /^X\(\/\/\)[^/].*/{
13082	    s//\1/
13083	    q
13084	  }
13085	  /^X\(\/\/\)$/{
13086	    s//\1/
13087	    q
13088	  }
13089	  /^X\(\/\).*/{
13090	    s//\1/
13091	    q
13092	  }
13093	  s/.*/./; q'`
13094  { as_dir="$ac_dir"
13095  case $as_dir in #(
13096  -*) as_dir=./$as_dir;;
13097  esac
13098  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
13099    as_dirs=
13100    while :; do
13101      case $as_dir in #(
13102      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
13103      *) as_qdir=$as_dir;;
13104      esac
13105      as_dirs="'$as_qdir' $as_dirs"
13106      as_dir=`$as_dirname -- "$as_dir" ||
13107$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13108	 X"$as_dir" : 'X\(//\)[^/]' \| \
13109	 X"$as_dir" : 'X\(//\)$' \| \
13110	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
13111echo X"$as_dir" |
13112    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
13113	    s//\1/
13114	    q
13115	  }
13116	  /^X\(\/\/\)[^/].*/{
13117	    s//\1/
13118	    q
13119	  }
13120	  /^X\(\/\/\)$/{
13121	    s//\1/
13122	    q
13123	  }
13124	  /^X\(\/\).*/{
13125	    s//\1/
13126	    q
13127	  }
13128	  s/.*/./; q'`
13129      test -d "$as_dir" && break
13130    done
13131    test -z "$as_dirs" || eval "mkdir $as_dirs"
13132  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
13133echo "$as_me: error: cannot create directory $as_dir" >&2;}
13134   { (exit 1); exit 1; }; }; }
13135  ac_builddir=.
13136
13137case "$ac_dir" in
13138.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
13139*)
13140  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
13141  # A ".." for each directory in $ac_dir_suffix.
13142  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
13143  case $ac_top_builddir_sub in
13144  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
13145  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
13146  esac ;;
13147esac
13148ac_abs_top_builddir=$ac_pwd
13149ac_abs_builddir=$ac_pwd$ac_dir_suffix
13150# for backward compatibility:
13151ac_top_builddir=$ac_top_build_prefix
13152
13153case $srcdir in
13154  .)  # We are building in place.
13155    ac_srcdir=.
13156    ac_top_srcdir=$ac_top_builddir_sub
13157    ac_abs_top_srcdir=$ac_pwd ;;
13158  [\\/]* | ?:[\\/]* )  # Absolute name.
13159    ac_srcdir=$srcdir$ac_dir_suffix;
13160    ac_top_srcdir=$srcdir
13161    ac_abs_top_srcdir=$srcdir ;;
13162  *) # Relative name.
13163    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
13164    ac_top_srcdir=$ac_top_build_prefix$srcdir
13165    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
13166esac
13167ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
13168
13169
13170  case $ac_mode in
13171  :F)
13172  #
13173  # CONFIG_FILE
13174  #
13175
13176  case $INSTALL in
13177  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
13178  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
13179  esac
13180_ACEOF
13181
13182cat >>$CONFIG_STATUS <<\_ACEOF
13183# If the template does not know about datarootdir, expand it.
13184# FIXME: This hack should be removed a few years after 2.60.
13185ac_datarootdir_hack=; ac_datarootdir_seen=
13186
13187case `sed -n '/datarootdir/ {
13188  p
13189  q
13190}
13191/@datadir@/p
13192/@docdir@/p
13193/@infodir@/p
13194/@localedir@/p
13195/@mandir@/p
13196' $ac_file_inputs` in
13197*datarootdir*) ac_datarootdir_seen=yes;;
13198*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
13199  { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
13200echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
13201_ACEOF
13202cat >>$CONFIG_STATUS <<_ACEOF
13203  ac_datarootdir_hack='
13204  s&@datadir@&$datadir&g
13205  s&@docdir@&$docdir&g
13206  s&@infodir@&$infodir&g
13207  s&@localedir@&$localedir&g
13208  s&@mandir@&$mandir&g
13209    s&\\\${datarootdir}&$datarootdir&g' ;;
13210esac
13211_ACEOF
13212
13213# Neutralize VPATH when `$srcdir' = `.'.
13214# Shell code in configure.ac might set extrasub.
13215# FIXME: do we really want to maintain this feature?
13216cat >>$CONFIG_STATUS <<_ACEOF
13217  sed "$ac_vpsub
13218$extrasub
13219_ACEOF
13220cat >>$CONFIG_STATUS <<\_ACEOF
13221:t
13222/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
13223s&@configure_input@&$configure_input&;t t
13224s&@top_builddir@&$ac_top_builddir_sub&;t t
13225s&@srcdir@&$ac_srcdir&;t t
13226s&@abs_srcdir@&$ac_abs_srcdir&;t t
13227s&@top_srcdir@&$ac_top_srcdir&;t t
13228s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
13229s&@builddir@&$ac_builddir&;t t
13230s&@abs_builddir@&$ac_abs_builddir&;t t
13231s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
13232s&@INSTALL@&$ac_INSTALL&;t t
13233$ac_datarootdir_hack
13234" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
13235
13236test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
13237  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
13238  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
13239  { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
13240which seems to be undefined.  Please make sure it is defined." >&5
13241echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
13242which seems to be undefined.  Please make sure it is defined." >&2;}
13243
13244  rm -f "$tmp/stdin"
13245  case $ac_file in
13246  -) cat "$tmp/out"; rm -f "$tmp/out";;
13247  *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
13248  esac
13249 ;;
13250
13251
13252
13253  esac
13254
13255done # for ac_tag
13256
13257
13258{ (exit 0); exit 0; }
13259_ACEOF
13260chmod +x $CONFIG_STATUS
13261ac_clean_files=$ac_clean_files_save
13262
13263
13264# configure is writing to config.log, and then calls config.status.
13265# config.status does its own redirection, appending to config.log.
13266# Unfortunately, on DOS this fails, as config.log is still kept open
13267# by configure, so config.status won't be able to write to it; its
13268# output is simply discarded.  So we exec the FD to /dev/null,
13269# effectively closing config.log, so it can be properly (re)opened and
13270# appended to by config.status.  When coming back to configure, we
13271# need to make the FD available again.
13272if test "$no_create" != yes; then
13273  ac_cs_success=:
13274  ac_config_status_args=
13275  test "$silent" = yes &&
13276    ac_config_status_args="$ac_config_status_args --quiet"
13277  exec 5>/dev/null
13278  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
13279  exec 5>>config.log
13280  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
13281  # would make configure fail if this is the last instruction.
13282  $ac_cs_success || { (exit 1); exit 1; }
13283fi
13284
13285
13286#--------------------------------------------------------------------
13287