1#! /bin/sh
2# From configure.in Id: configure.in 282 2010-07-06 13:48:46Z nijtmans .
3# Guess values for system-dependent variables and create Makefiles.
4# Generated by GNU Autoconf 2.61 for tifftcl 3.9.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='tifftcl'
575PACKAGE_TARNAME='tifftcl'
576PACKAGE_VERSION='3.9.4'
577PACKAGE_STRING='tifftcl 3.9.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
664TCL_VERSION
665TCL_PATCH_LEVEL
666TCL_BIN_DIR
667TCL_SRC_DIR
668TCL_LIB_FILE
669TCL_LIB_FLAG
670TCL_LIB_SPEC
671TCL_STUB_LIB_FILE
672TCL_STUB_LIB_FLAG
673TCL_STUB_LIB_SPEC
674CLEANFILES
675TCL_LIBS
676TCL_DEFS
677TCL_EXTRA_CFLAGS
678TCL_LD_FLAGS
679TCL_SHLIB_LD_LIBS
680CC
681CFLAGS
682LDFLAGS
683CPPFLAGS
684ac_ct_CC
685OBJEXT
686CPP
687INSTALL_PROGRAM
688INSTALL_SCRIPT
689INSTALL_DATA
690SET_MAKE
691RANLIB
692GREP
693EGREP
694MATH_LIBS
695PKG_SOURCES
696PKG_OBJECTS
697TCL_INCLUDES
698TCL_THREADS
699SHARED_BUILD
700AR
701CELIB_DIR
702CFLAGS_DEBUG
703CFLAGS_OPTIMIZE
704CFLAGS_WARNING
705STLIB_LD
706SHLIB_LD
707SHLIB_LD_LIBS
708SHLIB_CFLAGS
709LD_LIBRARY_PATH_VAR
710CFLAGS_DEFAULT
711LDFLAGS_DEFAULT
712TCL_DBGX
713MAKE_LIB
714MAKE_SHARED_LIB
715MAKE_STATIC_LIB
716MAKE_STUB_LIB
717RANLIB_STUB
718VC_MANIFEST_EMBED_DLL
719VC_MANIFEST_EMBED_EXE
720TCLSH_PROG
721tifftcl_BUILD_LIB_SPEC
722tifftcl_LIB_SPEC
723tifftcl_BUILD_STUB_LIB_SPEC
724tifftcl_STUB_LIB_SPEC
725tifftcl_BUILD_STUB_LIB_PATH
726tifftcl_STUB_LIB_PATH
727MAJOR_VERSION
728MINOR_VERSION
729PATCHLEVEL
730LIBOBJS
731LTLIBOBJS'
732ac_subst_files=''
733      ac_precious_vars='build_alias
734host_alias
735target_alias
736CC
737CFLAGS
738LDFLAGS
739LIBS
740CPPFLAGS
741CPP'
742
743
744# Initialize some variables set by options.
745ac_init_help=
746ac_init_version=false
747# The variables have the same names as the options, with
748# dashes changed to underlines.
749cache_file=/dev/null
750exec_prefix=NONE
751no_create=
752no_recursion=
753prefix=NONE
754program_prefix=NONE
755program_suffix=NONE
756program_transform_name=s,x,x,
757silent=
758site=
759srcdir=
760verbose=
761x_includes=NONE
762x_libraries=NONE
763
764# Installation directory options.
765# These are left unexpanded so users can "make install exec_prefix=/foo"
766# and all the variables that are supposed to be based on exec_prefix
767# by default will actually change.
768# Use braces instead of parens because sh, perl, etc. also accept them.
769# (The list follows the same order as the GNU Coding Standards.)
770bindir='${exec_prefix}/bin'
771sbindir='${exec_prefix}/sbin'
772libexecdir='${exec_prefix}/libexec'
773datarootdir='${prefix}/share'
774datadir='${datarootdir}'
775sysconfdir='${prefix}/etc'
776sharedstatedir='${prefix}/com'
777localstatedir='${prefix}/var'
778includedir='${prefix}/include'
779oldincludedir='/usr/include'
780docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
781infodir='${datarootdir}/info'
782htmldir='${docdir}'
783dvidir='${docdir}'
784pdfdir='${docdir}'
785psdir='${docdir}'
786libdir='${exec_prefix}/lib'
787localedir='${datarootdir}/locale'
788mandir='${datarootdir}/man'
789
790ac_prev=
791ac_dashdash=
792for ac_option
793do
794  # If the previous option needs an argument, assign it.
795  if test -n "$ac_prev"; then
796    eval $ac_prev=\$ac_option
797    ac_prev=
798    continue
799  fi
800
801  case $ac_option in
802  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
803  *)	ac_optarg=yes ;;
804  esac
805
806  # Accept the important Cygnus configure options, so we can diagnose typos.
807
808  case $ac_dashdash$ac_option in
809  --)
810    ac_dashdash=yes ;;
811
812  -bindir | --bindir | --bindi | --bind | --bin | --bi)
813    ac_prev=bindir ;;
814  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
815    bindir=$ac_optarg ;;
816
817  -build | --build | --buil | --bui | --bu)
818    ac_prev=build_alias ;;
819  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
820    build_alias=$ac_optarg ;;
821
822  -cache-file | --cache-file | --cache-fil | --cache-fi \
823  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
824    ac_prev=cache_file ;;
825  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
826  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
827    cache_file=$ac_optarg ;;
828
829  --config-cache | -C)
830    cache_file=config.cache ;;
831
832  -datadir | --datadir | --datadi | --datad)
833    ac_prev=datadir ;;
834  -datadir=* | --datadir=* | --datadi=* | --datad=*)
835    datadir=$ac_optarg ;;
836
837  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
838  | --dataroo | --dataro | --datar)
839    ac_prev=datarootdir ;;
840  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
841  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
842    datarootdir=$ac_optarg ;;
843
844  -disable-* | --disable-*)
845    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
846    # Reject names that are not valid shell variable names.
847    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
848      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
849   { (exit 1); exit 1; }; }
850    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
851    eval enable_$ac_feature=no ;;
852
853  -docdir | --docdir | --docdi | --doc | --do)
854    ac_prev=docdir ;;
855  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
856    docdir=$ac_optarg ;;
857
858  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
859    ac_prev=dvidir ;;
860  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
861    dvidir=$ac_optarg ;;
862
863  -enable-* | --enable-*)
864    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
865    # Reject names that are not valid shell variable names.
866    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
867      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
868   { (exit 1); exit 1; }; }
869    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
870    eval enable_$ac_feature=\$ac_optarg ;;
871
872  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
873  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
874  | --exec | --exe | --ex)
875    ac_prev=exec_prefix ;;
876  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
877  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
878  | --exec=* | --exe=* | --ex=*)
879    exec_prefix=$ac_optarg ;;
880
881  -gas | --gas | --ga | --g)
882    # Obsolete; use --with-gas.
883    with_gas=yes ;;
884
885  -help | --help | --hel | --he | -h)
886    ac_init_help=long ;;
887  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
888    ac_init_help=recursive ;;
889  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
890    ac_init_help=short ;;
891
892  -host | --host | --hos | --ho)
893    ac_prev=host_alias ;;
894  -host=* | --host=* | --hos=* | --ho=*)
895    host_alias=$ac_optarg ;;
896
897  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
898    ac_prev=htmldir ;;
899  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
900  | --ht=*)
901    htmldir=$ac_optarg ;;
902
903  -includedir | --includedir | --includedi | --included | --include \
904  | --includ | --inclu | --incl | --inc)
905    ac_prev=includedir ;;
906  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
907  | --includ=* | --inclu=* | --incl=* | --inc=*)
908    includedir=$ac_optarg ;;
909
910  -infodir | --infodir | --infodi | --infod | --info | --inf)
911    ac_prev=infodir ;;
912  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
913    infodir=$ac_optarg ;;
914
915  -libdir | --libdir | --libdi | --libd)
916    ac_prev=libdir ;;
917  -libdir=* | --libdir=* | --libdi=* | --libd=*)
918    libdir=$ac_optarg ;;
919
920  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
921  | --libexe | --libex | --libe)
922    ac_prev=libexecdir ;;
923  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
924  | --libexe=* | --libex=* | --libe=*)
925    libexecdir=$ac_optarg ;;
926
927  -localedir | --localedir | --localedi | --localed | --locale)
928    ac_prev=localedir ;;
929  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
930    localedir=$ac_optarg ;;
931
932  -localstatedir | --localstatedir | --localstatedi | --localstated \
933  | --localstate | --localstat | --localsta | --localst | --locals)
934    ac_prev=localstatedir ;;
935  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
936  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
937    localstatedir=$ac_optarg ;;
938
939  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
940    ac_prev=mandir ;;
941  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
942    mandir=$ac_optarg ;;
943
944  -nfp | --nfp | --nf)
945    # Obsolete; use --without-fp.
946    with_fp=no ;;
947
948  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
949  | --no-cr | --no-c | -n)
950    no_create=yes ;;
951
952  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
953  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
954    no_recursion=yes ;;
955
956  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
957  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
958  | --oldin | --oldi | --old | --ol | --o)
959    ac_prev=oldincludedir ;;
960  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
961  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
962  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
963    oldincludedir=$ac_optarg ;;
964
965  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
966    ac_prev=prefix ;;
967  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
968    prefix=$ac_optarg ;;
969
970  -program-prefix | --program-prefix | --program-prefi | --program-pref \
971  | --program-pre | --program-pr | --program-p)
972    ac_prev=program_prefix ;;
973  -program-prefix=* | --program-prefix=* | --program-prefi=* \
974  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
975    program_prefix=$ac_optarg ;;
976
977  -program-suffix | --program-suffix | --program-suffi | --program-suff \
978  | --program-suf | --program-su | --program-s)
979    ac_prev=program_suffix ;;
980  -program-suffix=* | --program-suffix=* | --program-suffi=* \
981  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
982    program_suffix=$ac_optarg ;;
983
984  -program-transform-name | --program-transform-name \
985  | --program-transform-nam | --program-transform-na \
986  | --program-transform-n | --program-transform- \
987  | --program-transform | --program-transfor \
988  | --program-transfo | --program-transf \
989  | --program-trans | --program-tran \
990  | --progr-tra | --program-tr | --program-t)
991    ac_prev=program_transform_name ;;
992  -program-transform-name=* | --program-transform-name=* \
993  | --program-transform-nam=* | --program-transform-na=* \
994  | --program-transform-n=* | --program-transform-=* \
995  | --program-transform=* | --program-transfor=* \
996  | --program-transfo=* | --program-transf=* \
997  | --program-trans=* | --program-tran=* \
998  | --progr-tra=* | --program-tr=* | --program-t=*)
999    program_transform_name=$ac_optarg ;;
1000
1001  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1002    ac_prev=pdfdir ;;
1003  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1004    pdfdir=$ac_optarg ;;
1005
1006  -psdir | --psdir | --psdi | --psd | --ps)
1007    ac_prev=psdir ;;
1008  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1009    psdir=$ac_optarg ;;
1010
1011  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1012  | -silent | --silent | --silen | --sile | --sil)
1013    silent=yes ;;
1014
1015  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1016    ac_prev=sbindir ;;
1017  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1018  | --sbi=* | --sb=*)
1019    sbindir=$ac_optarg ;;
1020
1021  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1022  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1023  | --sharedst | --shareds | --shared | --share | --shar \
1024  | --sha | --sh)
1025    ac_prev=sharedstatedir ;;
1026  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1027  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1028  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1029  | --sha=* | --sh=*)
1030    sharedstatedir=$ac_optarg ;;
1031
1032  -site | --site | --sit)
1033    ac_prev=site ;;
1034  -site=* | --site=* | --sit=*)
1035    site=$ac_optarg ;;
1036
1037  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1038    ac_prev=srcdir ;;
1039  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1040    srcdir=$ac_optarg ;;
1041
1042  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1043  | --syscon | --sysco | --sysc | --sys | --sy)
1044    ac_prev=sysconfdir ;;
1045  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1046  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1047    sysconfdir=$ac_optarg ;;
1048
1049  -target | --target | --targe | --targ | --tar | --ta | --t)
1050    ac_prev=target_alias ;;
1051  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1052    target_alias=$ac_optarg ;;
1053
1054  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1055    verbose=yes ;;
1056
1057  -version | --version | --versio | --versi | --vers | -V)
1058    ac_init_version=: ;;
1059
1060  -with-* | --with-*)
1061    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1062    # Reject names that are not valid shell variable names.
1063    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1064      { echo "$as_me: error: invalid package name: $ac_package" >&2
1065   { (exit 1); exit 1; }; }
1066    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1067    eval with_$ac_package=\$ac_optarg ;;
1068
1069  -without-* | --without-*)
1070    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1071    # Reject names that are not valid shell variable names.
1072    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1073      { echo "$as_me: error: invalid package name: $ac_package" >&2
1074   { (exit 1); exit 1; }; }
1075    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1076    eval with_$ac_package=no ;;
1077
1078  --x)
1079    # Obsolete; use --with-x.
1080    with_x=yes ;;
1081
1082  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1083  | --x-incl | --x-inc | --x-in | --x-i)
1084    ac_prev=x_includes ;;
1085  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1086  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1087    x_includes=$ac_optarg ;;
1088
1089  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1090  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1091    ac_prev=x_libraries ;;
1092  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1093  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1094    x_libraries=$ac_optarg ;;
1095
1096  -*) { echo "$as_me: error: unrecognized option: $ac_option
1097Try \`$0 --help' for more information." >&2
1098   { (exit 1); exit 1; }; }
1099    ;;
1100
1101  *=*)
1102    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1103    # Reject names that are not valid shell variable names.
1104    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1105      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1106   { (exit 1); exit 1; }; }
1107    eval $ac_envvar=\$ac_optarg
1108    export $ac_envvar ;;
1109
1110  *)
1111    # FIXME: should be removed in autoconf 3.0.
1112    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1113    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1114      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1115    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1116    ;;
1117
1118  esac
1119done
1120
1121if test -n "$ac_prev"; then
1122  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1123  { echo "$as_me: error: missing argument to $ac_option" >&2
1124   { (exit 1); exit 1; }; }
1125fi
1126
1127# Be sure to have absolute directory names.
1128for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1129		datadir sysconfdir sharedstatedir localstatedir includedir \
1130		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1131		libdir localedir mandir
1132do
1133  eval ac_val=\$$ac_var
1134  case $ac_val in
1135    [\\/$]* | ?:[\\/]* )  continue;;
1136    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1137  esac
1138  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1139   { (exit 1); exit 1; }; }
1140done
1141
1142# There might be people who depend on the old broken behavior: `$host'
1143# used to hold the argument of --host etc.
1144# FIXME: To remove some day.
1145build=$build_alias
1146host=$host_alias
1147target=$target_alias
1148
1149# FIXME: To remove some day.
1150if test "x$host_alias" != x; then
1151  if test "x$build_alias" = x; then
1152    cross_compiling=maybe
1153    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1154    If a cross compiler is detected then cross compile mode will be used." >&2
1155  elif test "x$build_alias" != "x$host_alias"; then
1156    cross_compiling=yes
1157  fi
1158fi
1159
1160ac_tool_prefix=
1161test -n "$host_alias" && ac_tool_prefix=$host_alias-
1162
1163test "$silent" = yes && exec 6>/dev/null
1164
1165
1166ac_pwd=`pwd` && test -n "$ac_pwd" &&
1167ac_ls_di=`ls -di .` &&
1168ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1169  { echo "$as_me: error: Working directory cannot be determined" >&2
1170   { (exit 1); exit 1; }; }
1171test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1172  { echo "$as_me: error: pwd does not report name of working directory" >&2
1173   { (exit 1); exit 1; }; }
1174
1175
1176# Find the source files, if location was not specified.
1177if test -z "$srcdir"; then
1178  ac_srcdir_defaulted=yes
1179  # Try the directory containing this script, then the parent directory.
1180  ac_confdir=`$as_dirname -- "$0" ||
1181$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1182	 X"$0" : 'X\(//\)[^/]' \| \
1183	 X"$0" : 'X\(//\)$' \| \
1184	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1185echo X"$0" |
1186    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1187	    s//\1/
1188	    q
1189	  }
1190	  /^X\(\/\/\)[^/].*/{
1191	    s//\1/
1192	    q
1193	  }
1194	  /^X\(\/\/\)$/{
1195	    s//\1/
1196	    q
1197	  }
1198	  /^X\(\/\).*/{
1199	    s//\1/
1200	    q
1201	  }
1202	  s/.*/./; q'`
1203  srcdir=$ac_confdir
1204  if test ! -r "$srcdir/$ac_unique_file"; then
1205    srcdir=..
1206  fi
1207else
1208  ac_srcdir_defaulted=no
1209fi
1210if test ! -r "$srcdir/$ac_unique_file"; then
1211  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1212  { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1213   { (exit 1); exit 1; }; }
1214fi
1215ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1216ac_abs_confdir=`(
1217	cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
1218   { (exit 1); exit 1; }; }
1219	pwd)`
1220# When building in place, set srcdir=.
1221if test "$ac_abs_confdir" = "$ac_pwd"; then
1222  srcdir=.
1223fi
1224# Remove unnecessary trailing slashes from srcdir.
1225# Double slashes in file names in object file debugging info
1226# mess up M-x gdb in Emacs.
1227case $srcdir in
1228*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1229esac
1230for ac_var in $ac_precious_vars; do
1231  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1232  eval ac_env_${ac_var}_value=\$${ac_var}
1233  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1234  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1235done
1236
1237#
1238# Report the --help message.
1239#
1240if test "$ac_init_help" = "long"; then
1241  # Omit some internal or obsolete options to make the list less imposing.
1242  # This message is too long to be a string in the A/UX 3.1 sh.
1243  cat <<_ACEOF
1244\`configure' configures tifftcl 3.9.4 to adapt to many kinds of systems.
1245
1246Usage: $0 [OPTION]... [VAR=VALUE]...
1247
1248To assign environment variables (e.g., CC, CFLAGS...), specify them as
1249VAR=VALUE.  See below for descriptions of some of the useful variables.
1250
1251Defaults for the options are specified in brackets.
1252
1253Configuration:
1254  -h, --help              display this help and exit
1255      --help=short        display options specific to this package
1256      --help=recursive    display the short help of all the included packages
1257  -V, --version           display version information and exit
1258  -q, --quiet, --silent   do not print \`checking...' messages
1259      --cache-file=FILE   cache test results in FILE [disabled]
1260  -C, --config-cache      alias for \`--cache-file=config.cache'
1261  -n, --no-create         do not create output files
1262      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1263
1264Installation directories:
1265  --prefix=PREFIX         install architecture-independent files in PREFIX
1266			  [$ac_default_prefix]
1267  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1268			  [PREFIX]
1269
1270By default, \`make install' will install all the files in
1271\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1272an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1273for instance \`--prefix=\$HOME'.
1274
1275For better control, use the options below.
1276
1277Fine tuning of the installation directories:
1278  --bindir=DIR           user executables [EPREFIX/bin]
1279  --sbindir=DIR          system admin executables [EPREFIX/sbin]
1280  --libexecdir=DIR       program executables [EPREFIX/libexec]
1281  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
1282  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
1283  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
1284  --libdir=DIR           object code libraries [EPREFIX/lib]
1285  --includedir=DIR       C header files [PREFIX/include]
1286  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
1287  --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
1288  --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
1289  --infodir=DIR          info documentation [DATAROOTDIR/info]
1290  --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
1291  --mandir=DIR           man documentation [DATAROOTDIR/man]
1292  --docdir=DIR           documentation root [DATAROOTDIR/doc/tifftcl]
1293  --htmldir=DIR          html documentation [DOCDIR]
1294  --dvidir=DIR           dvi documentation [DOCDIR]
1295  --pdfdir=DIR           pdf documentation [DOCDIR]
1296  --psdir=DIR            ps documentation [DOCDIR]
1297_ACEOF
1298
1299  cat <<\_ACEOF
1300_ACEOF
1301fi
1302
1303if test -n "$ac_init_help"; then
1304  case $ac_init_help in
1305     short | recursive ) echo "Configuration of tifftcl 3.9.4:";;
1306   esac
1307  cat <<\_ACEOF
1308
1309Optional Features:
1310  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1311  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1312  --enable-threads        build with threads
1313  --enable-shared         build and link with shared libraries (default: on)
1314  --enable-64bit          enable 64bit support (default: off)
1315  --enable-64bit-vis      enable 64bit Sparc VIS support (default: off)
1316  --disable-rpath         disable rpath support (default: on)
1317  --enable-wince          enable Win/CE support (where applicable)
1318  --enable-symbols        build with debugging symbols (default: off)
1319
1320Optional Packages:
1321  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1322  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1323  --with-tcl              directory containing tcl configuration
1324                          (tclConfig.sh)
1325  --with-tclinclude       directory containing the public Tcl header files
1326  --with-celib=DIR        use Windows/CE support library from DIR
1327
1328Some influential environment variables:
1329  CC          C compiler command
1330  CFLAGS      C compiler flags
1331  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1332              nonstandard directory <lib dir>
1333  LIBS        libraries to pass to the linker, e.g. -l<library>
1334  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1335              you have headers in a nonstandard directory <include dir>
1336  CPP         C preprocessor
1337
1338Use these variables to override the choices made by `configure' or to help
1339it to find libraries and programs with nonstandard names/locations.
1340
1341_ACEOF
1342ac_status=$?
1343fi
1344
1345if test "$ac_init_help" = "recursive"; then
1346  # If there are subdirs, report their specific --help.
1347  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1348    test -d "$ac_dir" || continue
1349    ac_builddir=.
1350
1351case "$ac_dir" in
1352.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1353*)
1354  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
1355  # A ".." for each directory in $ac_dir_suffix.
1356  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1357  case $ac_top_builddir_sub in
1358  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1359  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1360  esac ;;
1361esac
1362ac_abs_top_builddir=$ac_pwd
1363ac_abs_builddir=$ac_pwd$ac_dir_suffix
1364# for backward compatibility:
1365ac_top_builddir=$ac_top_build_prefix
1366
1367case $srcdir in
1368  .)  # We are building in place.
1369    ac_srcdir=.
1370    ac_top_srcdir=$ac_top_builddir_sub
1371    ac_abs_top_srcdir=$ac_pwd ;;
1372  [\\/]* | ?:[\\/]* )  # Absolute name.
1373    ac_srcdir=$srcdir$ac_dir_suffix;
1374    ac_top_srcdir=$srcdir
1375    ac_abs_top_srcdir=$srcdir ;;
1376  *) # Relative name.
1377    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1378    ac_top_srcdir=$ac_top_build_prefix$srcdir
1379    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1380esac
1381ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1382
1383    cd "$ac_dir" || { ac_status=$?; continue; }
1384    # Check for guested configure.
1385    if test -f "$ac_srcdir/configure.gnu"; then
1386      echo &&
1387      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1388    elif test -f "$ac_srcdir/configure"; then
1389      echo &&
1390      $SHELL "$ac_srcdir/configure" --help=recursive
1391    else
1392      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1393    fi || ac_status=$?
1394    cd "$ac_pwd" || { ac_status=$?; break; }
1395  done
1396fi
1397
1398test -n "$ac_init_help" && exit $ac_status
1399if $ac_init_version; then
1400  cat <<\_ACEOF
1401tifftcl configure 3.9.4
1402generated by GNU Autoconf 2.61
1403
1404Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14052002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1406This configure script is free software; the Free Software Foundation
1407gives unlimited permission to copy, distribute and modify it.
1408_ACEOF
1409  exit
1410fi
1411cat >config.log <<_ACEOF
1412This file contains any messages produced by compilers while
1413running configure, to aid debugging if configure makes a mistake.
1414
1415It was created by tifftcl $as_me 3.9.4, which was
1416generated by GNU Autoconf 2.61.  Invocation command line was
1417
1418  $ $0 $@
1419
1420_ACEOF
1421exec 5>>config.log
1422{
1423cat <<_ASUNAME
1424## --------- ##
1425## Platform. ##
1426## --------- ##
1427
1428hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1429uname -m = `(uname -m) 2>/dev/null || echo unknown`
1430uname -r = `(uname -r) 2>/dev/null || echo unknown`
1431uname -s = `(uname -s) 2>/dev/null || echo unknown`
1432uname -v = `(uname -v) 2>/dev/null || echo unknown`
1433
1434/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1435/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1436
1437/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1438/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1439/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1440/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1441/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1442/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1443/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1444
1445_ASUNAME
1446
1447as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1448for as_dir in $PATH
1449do
1450  IFS=$as_save_IFS
1451  test -z "$as_dir" && as_dir=.
1452  echo "PATH: $as_dir"
1453done
1454IFS=$as_save_IFS
1455
1456} >&5
1457
1458cat >&5 <<_ACEOF
1459
1460
1461## ----------- ##
1462## Core tests. ##
1463## ----------- ##
1464
1465_ACEOF
1466
1467
1468# Keep a trace of the command line.
1469# Strip out --no-create and --no-recursion so they do not pile up.
1470# Strip out --silent because we don't want to record it for future runs.
1471# Also quote any args containing shell meta-characters.
1472# Make two passes to allow for proper duplicate-argument suppression.
1473ac_configure_args=
1474ac_configure_args0=
1475ac_configure_args1=
1476ac_must_keep_next=false
1477for ac_pass in 1 2
1478do
1479  for ac_arg
1480  do
1481    case $ac_arg in
1482    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1483    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1484    | -silent | --silent | --silen | --sile | --sil)
1485      continue ;;
1486    *\'*)
1487      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1488    esac
1489    case $ac_pass in
1490    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1491    2)
1492      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1493      if test $ac_must_keep_next = true; then
1494	ac_must_keep_next=false # Got value, back to normal.
1495      else
1496	case $ac_arg in
1497	  *=* | --config-cache | -C | -disable-* | --disable-* \
1498	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1499	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1500	  | -with-* | --with-* | -without-* | --without-* | --x)
1501	    case "$ac_configure_args0 " in
1502	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1503	    esac
1504	    ;;
1505	  -* ) ac_must_keep_next=true ;;
1506	esac
1507      fi
1508      ac_configure_args="$ac_configure_args '$ac_arg'"
1509      ;;
1510    esac
1511  done
1512done
1513$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1514$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1515
1516# When interrupted or exit'd, cleanup temporary files, and complete
1517# config.log.  We remove comments because anyway the quotes in there
1518# would cause problems or look ugly.
1519# WARNING: Use '\'' to represent an apostrophe within the trap.
1520# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1521trap 'exit_status=$?
1522  # Save into config.log some information that might help in debugging.
1523  {
1524    echo
1525
1526    cat <<\_ASBOX
1527## ---------------- ##
1528## Cache variables. ##
1529## ---------------- ##
1530_ASBOX
1531    echo
1532    # The following way of writing the cache mishandles newlines in values,
1533(
1534  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1535    eval ac_val=\$$ac_var
1536    case $ac_val in #(
1537    *${as_nl}*)
1538      case $ac_var in #(
1539      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1540echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1541      esac
1542      case $ac_var in #(
1543      _ | IFS | as_nl) ;; #(
1544      *) $as_unset $ac_var ;;
1545      esac ;;
1546    esac
1547  done
1548  (set) 2>&1 |
1549    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1550    *${as_nl}ac_space=\ *)
1551      sed -n \
1552	"s/'\''/'\''\\\\'\'''\''/g;
1553	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1554      ;; #(
1555    *)
1556      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1557      ;;
1558    esac |
1559    sort
1560)
1561    echo
1562
1563    cat <<\_ASBOX
1564## ----------------- ##
1565## Output variables. ##
1566## ----------------- ##
1567_ASBOX
1568    echo
1569    for ac_var in $ac_subst_vars
1570    do
1571      eval ac_val=\$$ac_var
1572      case $ac_val in
1573      *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1574      esac
1575      echo "$ac_var='\''$ac_val'\''"
1576    done | sort
1577    echo
1578
1579    if test -n "$ac_subst_files"; then
1580      cat <<\_ASBOX
1581## ------------------- ##
1582## File substitutions. ##
1583## ------------------- ##
1584_ASBOX
1585      echo
1586      for ac_var in $ac_subst_files
1587      do
1588	eval ac_val=\$$ac_var
1589	case $ac_val in
1590	*\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1591	esac
1592	echo "$ac_var='\''$ac_val'\''"
1593      done | sort
1594      echo
1595    fi
1596
1597    if test -s confdefs.h; then
1598      cat <<\_ASBOX
1599## ----------- ##
1600## confdefs.h. ##
1601## ----------- ##
1602_ASBOX
1603      echo
1604      cat confdefs.h
1605      echo
1606    fi
1607    test "$ac_signal" != 0 &&
1608      echo "$as_me: caught signal $ac_signal"
1609    echo "$as_me: exit $exit_status"
1610  } >&5
1611  rm -f core *.core core.conftest.* &&
1612    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1613    exit $exit_status
1614' 0
1615for ac_signal in 1 2 13 15; do
1616  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1617done
1618ac_signal=0
1619
1620# confdefs.h avoids OS command line length limits that DEFS can exceed.
1621rm -f -r conftest* confdefs.h
1622
1623# Predefined preprocessor variables.
1624
1625cat >>confdefs.h <<_ACEOF
1626#define PACKAGE_NAME "$PACKAGE_NAME"
1627_ACEOF
1628
1629
1630cat >>confdefs.h <<_ACEOF
1631#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1632_ACEOF
1633
1634
1635cat >>confdefs.h <<_ACEOF
1636#define PACKAGE_VERSION "$PACKAGE_VERSION"
1637_ACEOF
1638
1639
1640cat >>confdefs.h <<_ACEOF
1641#define PACKAGE_STRING "$PACKAGE_STRING"
1642_ACEOF
1643
1644
1645cat >>confdefs.h <<_ACEOF
1646#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1647_ACEOF
1648
1649
1650# Let the site file select an alternate cache file if it wants to.
1651# Prefer explicitly selected file to automatically selected ones.
1652if test -n "$CONFIG_SITE"; then
1653  set x "$CONFIG_SITE"
1654elif test "x$prefix" != xNONE; then
1655  set x "$prefix/share/config.site" "$prefix/etc/config.site"
1656else
1657  set x "$ac_default_prefix/share/config.site" \
1658	"$ac_default_prefix/etc/config.site"
1659fi
1660shift
1661for ac_site_file
1662do
1663  if test -r "$ac_site_file"; then
1664    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1665echo "$as_me: loading site script $ac_site_file" >&6;}
1666    sed 's/^/| /' "$ac_site_file" >&5
1667    . "$ac_site_file"
1668  fi
1669done
1670
1671if test -r "$cache_file"; then
1672  # Some versions of bash will fail to source /dev/null (special
1673  # files actually), so we avoid doing that.
1674  if test -f "$cache_file"; then
1675    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1676echo "$as_me: loading cache $cache_file" >&6;}
1677    case $cache_file in
1678      [\\/]* | ?:[\\/]* ) . "$cache_file";;
1679      *)                      . "./$cache_file";;
1680    esac
1681  fi
1682else
1683  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1684echo "$as_me: creating cache $cache_file" >&6;}
1685  >$cache_file
1686fi
1687
1688# Check that the precious variables saved in the cache have kept the same
1689# value.
1690ac_cache_corrupted=false
1691for ac_var in $ac_precious_vars; do
1692  eval ac_old_set=\$ac_cv_env_${ac_var}_set
1693  eval ac_new_set=\$ac_env_${ac_var}_set
1694  eval ac_old_val=\$ac_cv_env_${ac_var}_value
1695  eval ac_new_val=\$ac_env_${ac_var}_value
1696  case $ac_old_set,$ac_new_set in
1697    set,)
1698      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1699echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1700      ac_cache_corrupted=: ;;
1701    ,set)
1702      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1703echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1704      ac_cache_corrupted=: ;;
1705    ,);;
1706    *)
1707      if test "x$ac_old_val" != "x$ac_new_val"; then
1708	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1709echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1710	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1711echo "$as_me:   former value:  $ac_old_val" >&2;}
1712	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1713echo "$as_me:   current value: $ac_new_val" >&2;}
1714	ac_cache_corrupted=:
1715      fi;;
1716  esac
1717  # Pass precious variables to config.status.
1718  if test "$ac_new_set" = set; then
1719    case $ac_new_val in
1720    *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1721    *) ac_arg=$ac_var=$ac_new_val ;;
1722    esac
1723    case " $ac_configure_args " in
1724      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1725      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1726    esac
1727  fi
1728done
1729if $ac_cache_corrupted; then
1730  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1731echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1732  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1733echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1734   { (exit 1); exit 1; }; }
1735fi
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761ac_ext=c
1762ac_cpp='$CPP $CPPFLAGS'
1763ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1764ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1765ac_compiler_gnu=$ac_cv_c_compiler_gnu
1766
1767
1768
1769
1770    # TEA extensions pass this us the version of TEA they think they
1771    # are compatible with.
1772    TEA_VERSION="3.9"
1773
1774    { echo "$as_me:$LINENO: checking for correct TEA configuration" >&5
1775echo $ECHO_N "checking for correct TEA configuration... $ECHO_C" >&6; }
1776    if test x"${PACKAGE_NAME}" = x ; then
1777	{ { echo "$as_me:$LINENO: error:
1778The PACKAGE_NAME variable must be defined by your TEA configure.in" >&5
1779echo "$as_me: error:
1780The PACKAGE_NAME variable must be defined by your TEA configure.in" >&2;}
1781   { (exit 1); exit 1; }; }
1782    fi
1783    if test x"3.9" = x ; then
1784	{ { echo "$as_me:$LINENO: error:
1785TEA version not specified." >&5
1786echo "$as_me: error:
1787TEA version not specified." >&2;}
1788   { (exit 1); exit 1; }; }
1789    elif test "3.9" != "${TEA_VERSION}" ; then
1790	{ echo "$as_me:$LINENO: result: warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&5
1791echo "${ECHO_T}warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&6; }
1792    else
1793	{ echo "$as_me:$LINENO: result: ok (TEA ${TEA_VERSION})" >&5
1794echo "${ECHO_T}ok (TEA ${TEA_VERSION})" >&6; }
1795    fi
1796    case "`uname -s`" in
1797	*win32*|*WIN32*|*MINGW32_*)
1798	    # Extract the first word of "cygpath", so it can be a program name with args.
1799set dummy cygpath; ac_word=$2
1800{ echo "$as_me:$LINENO: checking for $ac_word" >&5
1801echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
1802if test "${ac_cv_prog_CYGPATH+set}" = set; then
1803  echo $ECHO_N "(cached) $ECHO_C" >&6
1804else
1805  if test -n "$CYGPATH"; then
1806  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
1807else
1808as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1809for as_dir in $PATH
1810do
1811  IFS=$as_save_IFS
1812  test -z "$as_dir" && as_dir=.
1813  for ac_exec_ext in '' $ac_executable_extensions; do
1814  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
1815    ac_cv_prog_CYGPATH="cygpath -w"
1816    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1817    break 2
1818  fi
1819done
1820done
1821IFS=$as_save_IFS
1822
1823  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
1824fi
1825fi
1826CYGPATH=$ac_cv_prog_CYGPATH
1827if test -n "$CYGPATH"; then
1828  { echo "$as_me:$LINENO: result: $CYGPATH" >&5
1829echo "${ECHO_T}$CYGPATH" >&6; }
1830else
1831  { echo "$as_me:$LINENO: result: no" >&5
1832echo "${ECHO_T}no" >&6; }
1833fi
1834
1835
1836	    EXEEXT=".exe"
1837	    TEA_PLATFORM="windows"
1838	    ;;
1839	*CYGWIN_*)
1840	    CYGPATH=echo
1841	    EXEEXT=".exe"
1842	    # TEA_PLATFORM is determined later in LOAD_TCLCONFIG
1843	    ;;
1844	*)
1845	    CYGPATH=echo
1846	    EXEEXT=""
1847	    TEA_PLATFORM="unix"
1848	    ;;
1849    esac
1850
1851    # Check if exec_prefix is set. If not use fall back to prefix.
1852    # Note when adjusted, so that TEA_PREFIX can correct for this.
1853    # This is needed for recursive configures, since autoconf propagates
1854    # $prefix, but not $exec_prefix (doh!).
1855    if test x$exec_prefix = xNONE ; then
1856	exec_prefix_default=yes
1857	exec_prefix=$prefix
1858    fi
1859
1860
1861
1862
1863    # This package name must be replaced statically for AC_SUBST to work
1864
1865    # Substitute STUB_LIB_FILE in case package creates a stub library too.
1866
1867
1868    # We AC_SUBST these here to ensure they are subst'ed,
1869    # in case the user doesn't call TEA_ADD_...
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879ac_aux_dir=
1880for ac_dir in ../tclconfig "$srcdir"/../tclconfig; do
1881  if test -f "$ac_dir/install-sh"; then
1882    ac_aux_dir=$ac_dir
1883    ac_install_sh="$ac_aux_dir/install-sh -c"
1884    break
1885  elif test -f "$ac_dir/install.sh"; then
1886    ac_aux_dir=$ac_dir
1887    ac_install_sh="$ac_aux_dir/install.sh -c"
1888    break
1889  elif test -f "$ac_dir/shtool"; then
1890    ac_aux_dir=$ac_dir
1891    ac_install_sh="$ac_aux_dir/shtool install -c"
1892    break
1893  fi
1894done
1895if test -z "$ac_aux_dir"; then
1896  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in ../tclconfig \"$srcdir\"/../tclconfig" >&5
1897echo "$as_me: error: cannot find install-sh or install.sh in ../tclconfig \"$srcdir\"/../tclconfig" >&2;}
1898   { (exit 1); exit 1; }; }
1899fi
1900
1901# These three variables are undocumented and unsupported,
1902# and are intended to be withdrawn in a future Autoconf release.
1903# They can cause serious problems if a builder's source tree is in a directory
1904# whose full name contains unusual characters.
1905ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
1906ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
1907ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
1908
1909
1910
1911#--------------------------------------------------------------------
1912# Load the tclConfig.sh file
1913# Load the tkConfig.sh file
1914#--------------------------------------------------------------------
1915
1916
1917
1918    #
1919    # Ok, lets find the tcl configuration
1920    # First, look for one uninstalled.
1921    # the alternative search directory is invoked by --with-tcl
1922    #
1923
1924    if test x"${no_tcl}" = x ; then
1925	# we reset no_tcl in case something fails here
1926	no_tcl=true
1927
1928# Check whether --with-tcl was given.
1929if test "${with_tcl+set}" = set; then
1930  withval=$with_tcl; with_tclconfig="${withval}"
1931fi
1932
1933	{ echo "$as_me:$LINENO: checking for Tcl configuration" >&5
1934echo $ECHO_N "checking for Tcl configuration... $ECHO_C" >&6; }
1935	if test "${ac_cv_c_tclconfig+set}" = set; then
1936  echo $ECHO_N "(cached) $ECHO_C" >&6
1937else
1938
1939
1940	    # First check to see if --with-tcl was specified.
1941	    if test x"${with_tclconfig}" != x ; then
1942		case "${with_tclconfig}" in
1943		    */tclConfig.sh )
1944			if test -f "${with_tclconfig}"; then
1945			    { echo "$as_me:$LINENO: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&5
1946echo "$as_me: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&2;}
1947			    with_tclconfig="`echo "${with_tclconfig}" | sed 's!/tclConfig\.sh$!!'`"
1948			fi ;;
1949		esac
1950		if test -f "${with_tclconfig}/tclConfig.sh" ; then
1951		    ac_cv_c_tclconfig="`(cd "${with_tclconfig}"; pwd)`"
1952		else
1953		    { { echo "$as_me:$LINENO: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&5
1954echo "$as_me: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&2;}
1955   { (exit 1); exit 1; }; }
1956		fi
1957	    fi
1958
1959	    # then check for a private Tcl installation
1960	    if test x"${ac_cv_c_tclconfig}" = x ; then
1961		for i in \
1962			../tcl \
1963			`ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
1964			`ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
1965			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
1966			../../tcl \
1967			`ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
1968			`ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
1969			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
1970			../../../tcl \
1971			`ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
1972			`ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
1973			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
1974		    if test "${TEA_PLATFORM}" = "windows" \
1975			    -a -f "$i/win/tclConfig.sh" ; then
1976			ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
1977			break
1978		    fi
1979		    if test -f "$i/unix/tclConfig.sh" ; then
1980			ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
1981			break
1982		    fi
1983		done
1984	    fi
1985
1986	    # on Darwin, check in Framework installation locations
1987	    if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
1988		for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
1989			`ls -d /Library/Frameworks 2>/dev/null` \
1990			`ls -d /Network/Library/Frameworks 2>/dev/null` \
1991			`ls -d /System/Library/Frameworks 2>/dev/null` \
1992			; do
1993		    if test -f "$i/Tcl.framework/tclConfig.sh" ; then
1994			ac_cv_c_tclconfig="`(cd $i/Tcl.framework; pwd)`"
1995			break
1996		    fi
1997		done
1998	    fi
1999
2000	    # TEA specific: on Windows, check in common installation locations
2001	    if test "${TEA_PLATFORM}" = "windows" \
2002		-a x"${ac_cv_c_tclconfig}" = x ; then
2003		for i in `ls -d C:/Tcl/lib 2>/dev/null` \
2004			`ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
2005			; do
2006		    if test -f "$i/tclConfig.sh" ; then
2007			ac_cv_c_tclconfig="`(cd $i; pwd)`"
2008			break
2009		    fi
2010		done
2011	    fi
2012
2013	    # check in a few common install locations
2014	    if test x"${ac_cv_c_tclconfig}" = x ; then
2015		for i in `ls -d ${libdir} 2>/dev/null` \
2016			`ls -d ${exec_prefix}/lib 2>/dev/null` \
2017			`ls -d ${prefix}/lib 2>/dev/null` \
2018			`ls -d /usr/local/lib 2>/dev/null` \
2019			`ls -d /usr/contrib/lib 2>/dev/null` \
2020			`ls -d /usr/lib 2>/dev/null` \
2021			`ls -d /usr/lib64 2>/dev/null` \
2022			; do
2023		    if test -f "$i/tclConfig.sh" ; then
2024			ac_cv_c_tclconfig="`(cd $i; pwd)`"
2025			break
2026		    fi
2027		done
2028	    fi
2029
2030	    # check in a few other private locations
2031	    if test x"${ac_cv_c_tclconfig}" = x ; then
2032		for i in \
2033			${srcdir}/../tcl \
2034			`ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2035			`ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
2036			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
2037		    if test "${TEA_PLATFORM}" = "windows" \
2038			    -a -f "$i/win/tclConfig.sh" ; then
2039			ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
2040			break
2041		    fi
2042		    if test -f "$i/unix/tclConfig.sh" ; then
2043			ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
2044			break
2045		    fi
2046		done
2047	    fi
2048
2049fi
2050
2051
2052	if test x"${ac_cv_c_tclconfig}" = x ; then
2053	    TCL_BIN_DIR="# no Tcl configs found"
2054	    { { echo "$as_me:$LINENO: error: Can't find Tcl configuration definitions" >&5
2055echo "$as_me: error: Can't find Tcl configuration definitions" >&2;}
2056   { (exit 1); exit 1; }; }
2057	else
2058	    no_tcl=
2059	    TCL_BIN_DIR="${ac_cv_c_tclconfig}"
2060	    { echo "$as_me:$LINENO: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
2061echo "${ECHO_T}found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
2062	fi
2063    fi
2064
2065
2066    { echo "$as_me:$LINENO: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
2067echo $ECHO_N "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... $ECHO_C" >&6; }
2068
2069    if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
2070        { echo "$as_me:$LINENO: result: loading" >&5
2071echo "${ECHO_T}loading" >&6; }
2072	. "${TCL_BIN_DIR}/tclConfig.sh"
2073    else
2074        { echo "$as_me:$LINENO: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
2075echo "${ECHO_T}could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
2076    fi
2077
2078    # eval is required to do the TCL_DBGX substitution
2079    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
2080    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
2081
2082    # If the TCL_BIN_DIR is the build directory (not the install directory),
2083    # then set the common variable name to the value of the build variables.
2084    # For example, the variable TCL_LIB_SPEC will be set to the value
2085    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
2086    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
2087    # installed and uninstalled version of Tcl.
2088    if test -f "${TCL_BIN_DIR}/Makefile" ; then
2089        TCL_LIB_SPEC="${TCL_BUILD_LIB_SPEC}"
2090        TCL_STUB_LIB_SPEC="${TCL_BUILD_STUB_LIB_SPEC}"
2091        TCL_STUB_LIB_PATH="${TCL_BUILD_STUB_LIB_PATH}"
2092    elif test "`uname -s`" = "Darwin"; then
2093	# If Tcl was built as a framework, attempt to use the libraries
2094	# from the framework at the given location so that linking works
2095	# against Tcl.framework installed in an arbitrary location.
2096	case ${TCL_DEFS} in
2097	    *TCL_FRAMEWORK*)
2098		if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
2099		    for i in "`cd "${TCL_BIN_DIR}"; pwd`" \
2100			     "`cd "${TCL_BIN_DIR}"/../..; pwd`"; do
2101			if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
2102			    TCL_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TCL_LIB_FILE}"
2103			    break
2104			fi
2105		    done
2106		fi
2107		if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
2108		    TCL_STUB_LIB_SPEC="-L`echo "${TCL_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
2109		    TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
2110		fi
2111		;;
2112	esac
2113    fi
2114
2115    # eval is required to do the TCL_DBGX substitution
2116    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
2117    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
2118    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
2119    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134    case "`uname -s`" in
2135	*CYGWIN_*)
2136	    { echo "$as_me:$LINENO: checking for cygwin variant" >&5
2137echo $ECHO_N "checking for cygwin variant... $ECHO_C" >&6; }
2138	    case ${TCL_EXTRA_CFLAGS} in
2139		*-mwin32*|*-mno-cygwin*)
2140		    TEA_PLATFORM="windows"
2141		    CFLAGS="$CFLAGS -mwin32"
2142		    { echo "$as_me:$LINENO: result: win32" >&5
2143echo "${ECHO_T}win32" >&6; }
2144		    ;;
2145		*)
2146		    TEA_PLATFORM="unix"
2147		    { echo "$as_me:$LINENO: result: unix" >&5
2148echo "${ECHO_T}unix" >&6; }
2149		    ;;
2150	    esac
2151	    EXEEXT=".exe"
2152	    ;;
2153	*)
2154	    ;;
2155    esac
2156
2157    # Do this here as we have fully defined TEA_PLATFORM now
2158    if test "${TEA_PLATFORM}" = "windows" ; then
2159	# The BUILD_$pkg is to define the correct extern storage class
2160	# handling when making this package
2161
2162cat >>confdefs.h <<_ACEOF
2163#define BUILD_${PACKAGE_NAME}
2164_ACEOF
2165
2166	CLEANFILES="$CLEANFILES *.lib *.dll *.pdb *.exp"
2167    fi
2168
2169    # TEA specific:
2170
2171
2172
2173
2174
2175
2176
2177
2178#-----------------------------------------------------------------------
2179# Handle the --prefix=... option by defaulting to what Tcl gave.
2180# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
2181#-----------------------------------------------------------------------
2182
2183
2184    if test "${prefix}" = "NONE"; then
2185	prefix_default=yes
2186	if test x"${TCL_PREFIX}" != x; then
2187	    { echo "$as_me:$LINENO: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&5
2188echo "$as_me: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&6;}
2189	    prefix=${TCL_PREFIX}
2190	else
2191	    { echo "$as_me:$LINENO: --prefix defaulting to /usr/local" >&5
2192echo "$as_me: --prefix defaulting to /usr/local" >&6;}
2193	    prefix=/usr/local
2194	fi
2195    fi
2196    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \
2197	-o x"${exec_prefix_default}" = x"yes" ; then
2198	if test x"${TCL_EXEC_PREFIX}" != x; then
2199	    { echo "$as_me:$LINENO: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&5
2200echo "$as_me: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&6;}
2201	    exec_prefix=${TCL_EXEC_PREFIX}
2202	else
2203	    { echo "$as_me:$LINENO: --exec-prefix defaulting to ${prefix}" >&5
2204echo "$as_me: --exec-prefix defaulting to ${prefix}" >&6;}
2205	    exec_prefix=$prefix
2206	fi
2207    fi
2208
2209
2210#-----------------------------------------------------------------------
2211# Standard compiler checks.
2212# This sets up CC by using the CC env var, or looks for gcc otherwise.
2213# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
2214# the basic setup necessary to compile executables.
2215#-----------------------------------------------------------------------
2216
2217
2218    # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE)
2219    # in this macro, they need to go into TEA_SETUP_COMPILER instead.
2220
2221    # If the user did not set CFLAGS, set it now to keep
2222    # the AC_PROG_CC macro from adding "-g -O2".
2223    if test "${CFLAGS+set}" != "set" ; then
2224	CFLAGS=""
2225    fi
2226
2227    ac_ext=c
2228ac_cpp='$CPP $CPPFLAGS'
2229ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2230ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2231ac_compiler_gnu=$ac_cv_c_compiler_gnu
2232if test -n "$ac_tool_prefix"; then
2233  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2234set dummy ${ac_tool_prefix}gcc; ac_word=$2
2235{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2236echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2237if test "${ac_cv_prog_CC+set}" = set; then
2238  echo $ECHO_N "(cached) $ECHO_C" >&6
2239else
2240  if test -n "$CC"; then
2241  ac_cv_prog_CC="$CC" # Let the user override the test.
2242else
2243as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2244for as_dir in $PATH
2245do
2246  IFS=$as_save_IFS
2247  test -z "$as_dir" && as_dir=.
2248  for ac_exec_ext in '' $ac_executable_extensions; do
2249  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2250    ac_cv_prog_CC="${ac_tool_prefix}gcc"
2251    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2252    break 2
2253  fi
2254done
2255done
2256IFS=$as_save_IFS
2257
2258fi
2259fi
2260CC=$ac_cv_prog_CC
2261if test -n "$CC"; then
2262  { echo "$as_me:$LINENO: result: $CC" >&5
2263echo "${ECHO_T}$CC" >&6; }
2264else
2265  { echo "$as_me:$LINENO: result: no" >&5
2266echo "${ECHO_T}no" >&6; }
2267fi
2268
2269
2270fi
2271if test -z "$ac_cv_prog_CC"; then
2272  ac_ct_CC=$CC
2273  # Extract the first word of "gcc", so it can be a program name with args.
2274set dummy gcc; ac_word=$2
2275{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2276echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2277if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2278  echo $ECHO_N "(cached) $ECHO_C" >&6
2279else
2280  if test -n "$ac_ct_CC"; then
2281  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2282else
2283as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2284for as_dir in $PATH
2285do
2286  IFS=$as_save_IFS
2287  test -z "$as_dir" && as_dir=.
2288  for ac_exec_ext in '' $ac_executable_extensions; do
2289  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2290    ac_cv_prog_ac_ct_CC="gcc"
2291    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2292    break 2
2293  fi
2294done
2295done
2296IFS=$as_save_IFS
2297
2298fi
2299fi
2300ac_ct_CC=$ac_cv_prog_ac_ct_CC
2301if test -n "$ac_ct_CC"; then
2302  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2303echo "${ECHO_T}$ac_ct_CC" >&6; }
2304else
2305  { echo "$as_me:$LINENO: result: no" >&5
2306echo "${ECHO_T}no" >&6; }
2307fi
2308
2309  if test "x$ac_ct_CC" = x; then
2310    CC=""
2311  else
2312    case $cross_compiling:$ac_tool_warned in
2313yes:)
2314{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2315whose name does not start with the host triplet.  If you think this
2316configuration is useful to you, please write to autoconf@gnu.org." >&5
2317echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2318whose name does not start with the host triplet.  If you think this
2319configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2320ac_tool_warned=yes ;;
2321esac
2322    CC=$ac_ct_CC
2323  fi
2324else
2325  CC="$ac_cv_prog_CC"
2326fi
2327
2328if test -z "$CC"; then
2329          if test -n "$ac_tool_prefix"; then
2330    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2331set dummy ${ac_tool_prefix}cc; ac_word=$2
2332{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2333echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2334if test "${ac_cv_prog_CC+set}" = set; then
2335  echo $ECHO_N "(cached) $ECHO_C" >&6
2336else
2337  if test -n "$CC"; then
2338  ac_cv_prog_CC="$CC" # Let the user override the test.
2339else
2340as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2341for as_dir in $PATH
2342do
2343  IFS=$as_save_IFS
2344  test -z "$as_dir" && as_dir=.
2345  for ac_exec_ext in '' $ac_executable_extensions; do
2346  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2347    ac_cv_prog_CC="${ac_tool_prefix}cc"
2348    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2349    break 2
2350  fi
2351done
2352done
2353IFS=$as_save_IFS
2354
2355fi
2356fi
2357CC=$ac_cv_prog_CC
2358if test -n "$CC"; then
2359  { echo "$as_me:$LINENO: result: $CC" >&5
2360echo "${ECHO_T}$CC" >&6; }
2361else
2362  { echo "$as_me:$LINENO: result: no" >&5
2363echo "${ECHO_T}no" >&6; }
2364fi
2365
2366
2367  fi
2368fi
2369if test -z "$CC"; then
2370  # Extract the first word of "cc", so it can be a program name with args.
2371set dummy cc; ac_word=$2
2372{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2373echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2374if test "${ac_cv_prog_CC+set}" = set; then
2375  echo $ECHO_N "(cached) $ECHO_C" >&6
2376else
2377  if test -n "$CC"; then
2378  ac_cv_prog_CC="$CC" # Let the user override the test.
2379else
2380  ac_prog_rejected=no
2381as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2382for as_dir in $PATH
2383do
2384  IFS=$as_save_IFS
2385  test -z "$as_dir" && as_dir=.
2386  for ac_exec_ext in '' $ac_executable_extensions; do
2387  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2388    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2389       ac_prog_rejected=yes
2390       continue
2391     fi
2392    ac_cv_prog_CC="cc"
2393    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2394    break 2
2395  fi
2396done
2397done
2398IFS=$as_save_IFS
2399
2400if test $ac_prog_rejected = yes; then
2401  # We found a bogon in the path, so make sure we never use it.
2402  set dummy $ac_cv_prog_CC
2403  shift
2404  if test $# != 0; then
2405    # We chose a different compiler from the bogus one.
2406    # However, it has the same basename, so the bogon will be chosen
2407    # first if we set CC to just the basename; use the full file name.
2408    shift
2409    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2410  fi
2411fi
2412fi
2413fi
2414CC=$ac_cv_prog_CC
2415if test -n "$CC"; then
2416  { echo "$as_me:$LINENO: result: $CC" >&5
2417echo "${ECHO_T}$CC" >&6; }
2418else
2419  { echo "$as_me:$LINENO: result: no" >&5
2420echo "${ECHO_T}no" >&6; }
2421fi
2422
2423
2424fi
2425if test -z "$CC"; then
2426  if test -n "$ac_tool_prefix"; then
2427  for ac_prog in cl.exe
2428  do
2429    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2430set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2431{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2432echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2433if test "${ac_cv_prog_CC+set}" = set; then
2434  echo $ECHO_N "(cached) $ECHO_C" >&6
2435else
2436  if test -n "$CC"; then
2437  ac_cv_prog_CC="$CC" # Let the user override the test.
2438else
2439as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2440for as_dir in $PATH
2441do
2442  IFS=$as_save_IFS
2443  test -z "$as_dir" && as_dir=.
2444  for ac_exec_ext in '' $ac_executable_extensions; do
2445  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2446    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2447    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2448    break 2
2449  fi
2450done
2451done
2452IFS=$as_save_IFS
2453
2454fi
2455fi
2456CC=$ac_cv_prog_CC
2457if test -n "$CC"; then
2458  { echo "$as_me:$LINENO: result: $CC" >&5
2459echo "${ECHO_T}$CC" >&6; }
2460else
2461  { echo "$as_me:$LINENO: result: no" >&5
2462echo "${ECHO_T}no" >&6; }
2463fi
2464
2465
2466    test -n "$CC" && break
2467  done
2468fi
2469if test -z "$CC"; then
2470  ac_ct_CC=$CC
2471  for ac_prog in cl.exe
2472do
2473  # Extract the first word of "$ac_prog", so it can be a program name with args.
2474set dummy $ac_prog; ac_word=$2
2475{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2476echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2477if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2478  echo $ECHO_N "(cached) $ECHO_C" >&6
2479else
2480  if test -n "$ac_ct_CC"; then
2481  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2482else
2483as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2484for as_dir in $PATH
2485do
2486  IFS=$as_save_IFS
2487  test -z "$as_dir" && as_dir=.
2488  for ac_exec_ext in '' $ac_executable_extensions; do
2489  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2490    ac_cv_prog_ac_ct_CC="$ac_prog"
2491    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2492    break 2
2493  fi
2494done
2495done
2496IFS=$as_save_IFS
2497
2498fi
2499fi
2500ac_ct_CC=$ac_cv_prog_ac_ct_CC
2501if test -n "$ac_ct_CC"; then
2502  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2503echo "${ECHO_T}$ac_ct_CC" >&6; }
2504else
2505  { echo "$as_me:$LINENO: result: no" >&5
2506echo "${ECHO_T}no" >&6; }
2507fi
2508
2509
2510  test -n "$ac_ct_CC" && break
2511done
2512
2513  if test "x$ac_ct_CC" = x; then
2514    CC=""
2515  else
2516    case $cross_compiling:$ac_tool_warned in
2517yes:)
2518{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2519whose name does not start with the host triplet.  If you think this
2520configuration is useful to you, please write to autoconf@gnu.org." >&5
2521echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2522whose name does not start with the host triplet.  If you think this
2523configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2524ac_tool_warned=yes ;;
2525esac
2526    CC=$ac_ct_CC
2527  fi
2528fi
2529
2530fi
2531
2532
2533test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2534See \`config.log' for more details." >&5
2535echo "$as_me: error: no acceptable C compiler found in \$PATH
2536See \`config.log' for more details." >&2;}
2537   { (exit 1); exit 1; }; }
2538
2539# Provide some information about the compiler.
2540echo "$as_me:$LINENO: checking for C compiler version" >&5
2541ac_compiler=`set X $ac_compile; echo $2`
2542{ (ac_try="$ac_compiler --version >&5"
2543case "(($ac_try" in
2544  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2545  *) ac_try_echo=$ac_try;;
2546esac
2547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2548  (eval "$ac_compiler --version >&5") 2>&5
2549  ac_status=$?
2550  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2551  (exit $ac_status); }
2552{ (ac_try="$ac_compiler -v >&5"
2553case "(($ac_try" in
2554  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2555  *) ac_try_echo=$ac_try;;
2556esac
2557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2558  (eval "$ac_compiler -v >&5") 2>&5
2559  ac_status=$?
2560  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2561  (exit $ac_status); }
2562{ (ac_try="$ac_compiler -V >&5"
2563case "(($ac_try" in
2564  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2565  *) ac_try_echo=$ac_try;;
2566esac
2567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2568  (eval "$ac_compiler -V >&5") 2>&5
2569  ac_status=$?
2570  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2571  (exit $ac_status); }
2572
2573cat >conftest.$ac_ext <<_ACEOF
2574/* confdefs.h.  */
2575_ACEOF
2576cat confdefs.h >>conftest.$ac_ext
2577cat >>conftest.$ac_ext <<_ACEOF
2578/* end confdefs.h.  */
2579
2580int
2581main ()
2582{
2583
2584  ;
2585  return 0;
2586}
2587_ACEOF
2588ac_clean_files_save=$ac_clean_files
2589ac_clean_files="$ac_clean_files a.out a.exe b.out"
2590# Try to create an executable without -o first, disregard a.out.
2591# It will help us diagnose broken compilers, and finding out an intuition
2592# of exeext.
2593{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2594echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2595ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2596#
2597# List of possible output files, starting from the most likely.
2598# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2599# only as a last resort.  b.out is created by i960 compilers.
2600ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2601#
2602# The IRIX 6 linker writes into existing files which may not be
2603# executable, retaining their permissions.  Remove them first so a
2604# subsequent execution test works.
2605ac_rmfiles=
2606for ac_file in $ac_files
2607do
2608  case $ac_file in
2609    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2610    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2611  esac
2612done
2613rm -f $ac_rmfiles
2614
2615if { (ac_try="$ac_link_default"
2616case "(($ac_try" in
2617  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2618  *) ac_try_echo=$ac_try;;
2619esac
2620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2621  (eval "$ac_link_default") 2>&5
2622  ac_status=$?
2623  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2624  (exit $ac_status); }; then
2625  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2626# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2627# in a Makefile.  We should not override ac_cv_exeext if it was cached,
2628# so that the user can short-circuit this test for compilers unknown to
2629# Autoconf.
2630for ac_file in $ac_files ''
2631do
2632  test -f "$ac_file" || continue
2633  case $ac_file in
2634    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
2635	;;
2636    [ab].out )
2637	# We found the default executable, but exeext='' is most
2638	# certainly right.
2639	break;;
2640    *.* )
2641        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2642	then :; else
2643	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2644	fi
2645	# We set ac_cv_exeext here because the later test for it is not
2646	# safe: cross compilers may not add the suffix if given an `-o'
2647	# argument, so we may need to know it at that point already.
2648	# Even if this section looks crufty: it has the advantage of
2649	# actually working.
2650	break;;
2651    * )
2652	break;;
2653  esac
2654done
2655test "$ac_cv_exeext" = no && ac_cv_exeext=
2656
2657else
2658  ac_file=''
2659fi
2660
2661{ echo "$as_me:$LINENO: result: $ac_file" >&5
2662echo "${ECHO_T}$ac_file" >&6; }
2663if test -z "$ac_file"; then
2664  echo "$as_me: failed program was:" >&5
2665sed 's/^/| /' conftest.$ac_ext >&5
2666
2667{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2668See \`config.log' for more details." >&5
2669echo "$as_me: error: C compiler cannot create executables
2670See \`config.log' for more details." >&2;}
2671   { (exit 77); exit 77; }; }
2672fi
2673
2674ac_exeext=$ac_cv_exeext
2675
2676# Check that the compiler produces executables we can run.  If not, either
2677# the compiler is broken, or we cross compile.
2678{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2679echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
2680# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2681# If not cross compiling, check that we can run a simple program.
2682if test "$cross_compiling" != yes; then
2683  if { ac_try='./$ac_file'
2684  { (case "(($ac_try" in
2685  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2686  *) ac_try_echo=$ac_try;;
2687esac
2688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2689  (eval "$ac_try") 2>&5
2690  ac_status=$?
2691  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2692  (exit $ac_status); }; }; then
2693    cross_compiling=no
2694  else
2695    if test "$cross_compiling" = maybe; then
2696	cross_compiling=yes
2697    else
2698	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2699If you meant to cross compile, use \`--host'.
2700See \`config.log' for more details." >&5
2701echo "$as_me: error: cannot run C compiled programs.
2702If you meant to cross compile, use \`--host'.
2703See \`config.log' for more details." >&2;}
2704   { (exit 1); exit 1; }; }
2705    fi
2706  fi
2707fi
2708{ echo "$as_me:$LINENO: result: yes" >&5
2709echo "${ECHO_T}yes" >&6; }
2710
2711rm -f a.out a.exe conftest$ac_cv_exeext b.out
2712ac_clean_files=$ac_clean_files_save
2713# Check that the compiler produces executables we can run.  If not, either
2714# the compiler is broken, or we cross compile.
2715{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2716echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2717{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2718echo "${ECHO_T}$cross_compiling" >&6; }
2719
2720{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2721echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2722if { (ac_try="$ac_link"
2723case "(($ac_try" in
2724  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2725  *) ac_try_echo=$ac_try;;
2726esac
2727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2728  (eval "$ac_link") 2>&5
2729  ac_status=$?
2730  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2731  (exit $ac_status); }; then
2732  # If both `conftest.exe' and `conftest' are `present' (well, observable)
2733# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2734# work properly (i.e., refer to `conftest.exe'), while it won't with
2735# `rm'.
2736for ac_file in conftest.exe conftest conftest.*; do
2737  test -f "$ac_file" || continue
2738  case $ac_file in
2739    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2740    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2741	  break;;
2742    * ) break;;
2743  esac
2744done
2745else
2746  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2747See \`config.log' for more details." >&5
2748echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2749See \`config.log' for more details." >&2;}
2750   { (exit 1); exit 1; }; }
2751fi
2752
2753rm -f conftest$ac_cv_exeext
2754{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2755echo "${ECHO_T}$ac_cv_exeext" >&6; }
2756
2757rm -f conftest.$ac_ext
2758EXEEXT=$ac_cv_exeext
2759ac_exeext=$EXEEXT
2760{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2761echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
2762if test "${ac_cv_objext+set}" = set; then
2763  echo $ECHO_N "(cached) $ECHO_C" >&6
2764else
2765  cat >conftest.$ac_ext <<_ACEOF
2766/* confdefs.h.  */
2767_ACEOF
2768cat confdefs.h >>conftest.$ac_ext
2769cat >>conftest.$ac_ext <<_ACEOF
2770/* end confdefs.h.  */
2771
2772int
2773main ()
2774{
2775
2776  ;
2777  return 0;
2778}
2779_ACEOF
2780rm -f conftest.o conftest.obj
2781if { (ac_try="$ac_compile"
2782case "(($ac_try" in
2783  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2784  *) ac_try_echo=$ac_try;;
2785esac
2786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2787  (eval "$ac_compile") 2>&5
2788  ac_status=$?
2789  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2790  (exit $ac_status); }; then
2791  for ac_file in conftest.o conftest.obj conftest.*; do
2792  test -f "$ac_file" || continue;
2793  case $ac_file in
2794    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
2795    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2796       break;;
2797  esac
2798done
2799else
2800  echo "$as_me: failed program was:" >&5
2801sed 's/^/| /' conftest.$ac_ext >&5
2802
2803{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2804See \`config.log' for more details." >&5
2805echo "$as_me: error: cannot compute suffix of object files: cannot compile
2806See \`config.log' for more details." >&2;}
2807   { (exit 1); exit 1; }; }
2808fi
2809
2810rm -f conftest.$ac_cv_objext conftest.$ac_ext
2811fi
2812{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2813echo "${ECHO_T}$ac_cv_objext" >&6; }
2814OBJEXT=$ac_cv_objext
2815ac_objext=$OBJEXT
2816{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2817echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
2818if test "${ac_cv_c_compiler_gnu+set}" = set; then
2819  echo $ECHO_N "(cached) $ECHO_C" >&6
2820else
2821  cat >conftest.$ac_ext <<_ACEOF
2822/* confdefs.h.  */
2823_ACEOF
2824cat confdefs.h >>conftest.$ac_ext
2825cat >>conftest.$ac_ext <<_ACEOF
2826/* end confdefs.h.  */
2827
2828int
2829main ()
2830{
2831#ifndef __GNUC__
2832       choke me
2833#endif
2834
2835  ;
2836  return 0;
2837}
2838_ACEOF
2839rm -f conftest.$ac_objext
2840if { (ac_try="$ac_compile"
2841case "(($ac_try" in
2842  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2843  *) ac_try_echo=$ac_try;;
2844esac
2845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2846  (eval "$ac_compile") 2>conftest.er1
2847  ac_status=$?
2848  grep -v '^ *+' conftest.er1 >conftest.err
2849  rm -f conftest.er1
2850  cat conftest.err >&5
2851  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2852  (exit $ac_status); } && {
2853	 test -z "$ac_c_werror_flag" ||
2854	 test ! -s conftest.err
2855       } && test -s conftest.$ac_objext; then
2856  ac_compiler_gnu=yes
2857else
2858  echo "$as_me: failed program was:" >&5
2859sed 's/^/| /' conftest.$ac_ext >&5
2860
2861	ac_compiler_gnu=no
2862fi
2863
2864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2865ac_cv_c_compiler_gnu=$ac_compiler_gnu
2866
2867fi
2868{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2869echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2870GCC=`test $ac_compiler_gnu = yes && echo yes`
2871ac_test_CFLAGS=${CFLAGS+set}
2872ac_save_CFLAGS=$CFLAGS
2873{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2874echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
2875if test "${ac_cv_prog_cc_g+set}" = set; then
2876  echo $ECHO_N "(cached) $ECHO_C" >&6
2877else
2878  ac_save_c_werror_flag=$ac_c_werror_flag
2879   ac_c_werror_flag=yes
2880   ac_cv_prog_cc_g=no
2881   CFLAGS="-g"
2882   cat >conftest.$ac_ext <<_ACEOF
2883/* confdefs.h.  */
2884_ACEOF
2885cat confdefs.h >>conftest.$ac_ext
2886cat >>conftest.$ac_ext <<_ACEOF
2887/* end confdefs.h.  */
2888
2889int
2890main ()
2891{
2892
2893  ;
2894  return 0;
2895}
2896_ACEOF
2897rm -f conftest.$ac_objext
2898if { (ac_try="$ac_compile"
2899case "(($ac_try" in
2900  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2901  *) ac_try_echo=$ac_try;;
2902esac
2903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2904  (eval "$ac_compile") 2>conftest.er1
2905  ac_status=$?
2906  grep -v '^ *+' conftest.er1 >conftest.err
2907  rm -f conftest.er1
2908  cat conftest.err >&5
2909  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2910  (exit $ac_status); } && {
2911	 test -z "$ac_c_werror_flag" ||
2912	 test ! -s conftest.err
2913       } && test -s conftest.$ac_objext; then
2914  ac_cv_prog_cc_g=yes
2915else
2916  echo "$as_me: failed program was:" >&5
2917sed 's/^/| /' conftest.$ac_ext >&5
2918
2919	CFLAGS=""
2920      cat >conftest.$ac_ext <<_ACEOF
2921/* confdefs.h.  */
2922_ACEOF
2923cat confdefs.h >>conftest.$ac_ext
2924cat >>conftest.$ac_ext <<_ACEOF
2925/* end confdefs.h.  */
2926
2927int
2928main ()
2929{
2930
2931  ;
2932  return 0;
2933}
2934_ACEOF
2935rm -f conftest.$ac_objext
2936if { (ac_try="$ac_compile"
2937case "(($ac_try" in
2938  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2939  *) ac_try_echo=$ac_try;;
2940esac
2941eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2942  (eval "$ac_compile") 2>conftest.er1
2943  ac_status=$?
2944  grep -v '^ *+' conftest.er1 >conftest.err
2945  rm -f conftest.er1
2946  cat conftest.err >&5
2947  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2948  (exit $ac_status); } && {
2949	 test -z "$ac_c_werror_flag" ||
2950	 test ! -s conftest.err
2951       } && test -s conftest.$ac_objext; then
2952  :
2953else
2954  echo "$as_me: failed program was:" >&5
2955sed 's/^/| /' conftest.$ac_ext >&5
2956
2957	ac_c_werror_flag=$ac_save_c_werror_flag
2958	 CFLAGS="-g"
2959	 cat >conftest.$ac_ext <<_ACEOF
2960/* confdefs.h.  */
2961_ACEOF
2962cat confdefs.h >>conftest.$ac_ext
2963cat >>conftest.$ac_ext <<_ACEOF
2964/* end confdefs.h.  */
2965
2966int
2967main ()
2968{
2969
2970  ;
2971  return 0;
2972}
2973_ACEOF
2974rm -f conftest.$ac_objext
2975if { (ac_try="$ac_compile"
2976case "(($ac_try" in
2977  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2978  *) ac_try_echo=$ac_try;;
2979esac
2980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2981  (eval "$ac_compile") 2>conftest.er1
2982  ac_status=$?
2983  grep -v '^ *+' conftest.er1 >conftest.err
2984  rm -f conftest.er1
2985  cat conftest.err >&5
2986  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2987  (exit $ac_status); } && {
2988	 test -z "$ac_c_werror_flag" ||
2989	 test ! -s conftest.err
2990       } && test -s conftest.$ac_objext; then
2991  ac_cv_prog_cc_g=yes
2992else
2993  echo "$as_me: failed program was:" >&5
2994sed 's/^/| /' conftest.$ac_ext >&5
2995
2996
2997fi
2998
2999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3000fi
3001
3002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3003fi
3004
3005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3006   ac_c_werror_flag=$ac_save_c_werror_flag
3007fi
3008{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3009echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
3010if test "$ac_test_CFLAGS" = set; then
3011  CFLAGS=$ac_save_CFLAGS
3012elif test $ac_cv_prog_cc_g = yes; then
3013  if test "$GCC" = yes; then
3014    CFLAGS="-g -O2"
3015  else
3016    CFLAGS="-g"
3017  fi
3018else
3019  if test "$GCC" = yes; then
3020    CFLAGS="-O2"
3021  else
3022    CFLAGS=
3023  fi
3024fi
3025{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3026echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3027if test "${ac_cv_prog_cc_c89+set}" = set; then
3028  echo $ECHO_N "(cached) $ECHO_C" >&6
3029else
3030  ac_cv_prog_cc_c89=no
3031ac_save_CC=$CC
3032cat >conftest.$ac_ext <<_ACEOF
3033/* confdefs.h.  */
3034_ACEOF
3035cat confdefs.h >>conftest.$ac_ext
3036cat >>conftest.$ac_ext <<_ACEOF
3037/* end confdefs.h.  */
3038#include <stdarg.h>
3039#include <stdio.h>
3040#include <sys/types.h>
3041#include <sys/stat.h>
3042/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3043struct buf { int x; };
3044FILE * (*rcsopen) (struct buf *, struct stat *, int);
3045static char *e (p, i)
3046     char **p;
3047     int i;
3048{
3049  return p[i];
3050}
3051static char *f (char * (*g) (char **, int), char **p, ...)
3052{
3053  char *s;
3054  va_list v;
3055  va_start (v,p);
3056  s = g (p, va_arg (v,int));
3057  va_end (v);
3058  return s;
3059}
3060
3061/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3062   function prototypes and stuff, but not '\xHH' hex character constants.
3063   These don't provoke an error unfortunately, instead are silently treated
3064   as 'x'.  The following induces an error, until -std is added to get
3065   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3066   array size at least.  It's necessary to write '\x00'==0 to get something
3067   that's true only with -std.  */
3068int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3069
3070/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3071   inside strings and character constants.  */
3072#define FOO(x) 'x'
3073int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3074
3075int test (int i, double x);
3076struct s1 {int (*f) (int a);};
3077struct s2 {int (*f) (double a);};
3078int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3079int argc;
3080char **argv;
3081int
3082main ()
3083{
3084return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3085  ;
3086  return 0;
3087}
3088_ACEOF
3089for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3090	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3091do
3092  CC="$ac_save_CC $ac_arg"
3093  rm -f conftest.$ac_objext
3094if { (ac_try="$ac_compile"
3095case "(($ac_try" in
3096  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3097  *) ac_try_echo=$ac_try;;
3098esac
3099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3100  (eval "$ac_compile") 2>conftest.er1
3101  ac_status=$?
3102  grep -v '^ *+' conftest.er1 >conftest.err
3103  rm -f conftest.er1
3104  cat conftest.err >&5
3105  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3106  (exit $ac_status); } && {
3107	 test -z "$ac_c_werror_flag" ||
3108	 test ! -s conftest.err
3109       } && test -s conftest.$ac_objext; then
3110  ac_cv_prog_cc_c89=$ac_arg
3111else
3112  echo "$as_me: failed program was:" >&5
3113sed 's/^/| /' conftest.$ac_ext >&5
3114
3115
3116fi
3117
3118rm -f core conftest.err conftest.$ac_objext
3119  test "x$ac_cv_prog_cc_c89" != "xno" && break
3120done
3121rm -f conftest.$ac_ext
3122CC=$ac_save_CC
3123
3124fi
3125# AC_CACHE_VAL
3126case "x$ac_cv_prog_cc_c89" in
3127  x)
3128    { echo "$as_me:$LINENO: result: none needed" >&5
3129echo "${ECHO_T}none needed" >&6; } ;;
3130  xno)
3131    { echo "$as_me:$LINENO: result: unsupported" >&5
3132echo "${ECHO_T}unsupported" >&6; } ;;
3133  *)
3134    CC="$CC $ac_cv_prog_cc_c89"
3135    { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3136echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
3137esac
3138
3139
3140ac_ext=c
3141ac_cpp='$CPP $CPPFLAGS'
3142ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3143ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3144ac_compiler_gnu=$ac_cv_c_compiler_gnu
3145
3146    ac_ext=c
3147ac_cpp='$CPP $CPPFLAGS'
3148ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3149ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3150ac_compiler_gnu=$ac_cv_c_compiler_gnu
3151{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3152echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
3153# On Suns, sometimes $CPP names a directory.
3154if test -n "$CPP" && test -d "$CPP"; then
3155  CPP=
3156fi
3157if test -z "$CPP"; then
3158  if test "${ac_cv_prog_CPP+set}" = set; then
3159  echo $ECHO_N "(cached) $ECHO_C" >&6
3160else
3161      # Double quotes because CPP needs to be expanded
3162    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3163    do
3164      ac_preproc_ok=false
3165for ac_c_preproc_warn_flag in '' yes
3166do
3167  # Use a header file that comes with gcc, so configuring glibc
3168  # with a fresh cross-compiler works.
3169  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3170  # <limits.h> exists even on freestanding compilers.
3171  # On the NeXT, cc -E runs the code through the compiler's parser,
3172  # not just through cpp. "Syntax error" is here to catch this case.
3173  cat >conftest.$ac_ext <<_ACEOF
3174/* confdefs.h.  */
3175_ACEOF
3176cat confdefs.h >>conftest.$ac_ext
3177cat >>conftest.$ac_ext <<_ACEOF
3178/* end confdefs.h.  */
3179#ifdef __STDC__
3180# include <limits.h>
3181#else
3182# include <assert.h>
3183#endif
3184		     Syntax error
3185_ACEOF
3186if { (ac_try="$ac_cpp conftest.$ac_ext"
3187case "(($ac_try" in
3188  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3189  *) ac_try_echo=$ac_try;;
3190esac
3191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3192  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3193  ac_status=$?
3194  grep -v '^ *+' conftest.er1 >conftest.err
3195  rm -f conftest.er1
3196  cat conftest.err >&5
3197  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3198  (exit $ac_status); } >/dev/null && {
3199	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3200	 test ! -s conftest.err
3201       }; then
3202  :
3203else
3204  echo "$as_me: failed program was:" >&5
3205sed 's/^/| /' conftest.$ac_ext >&5
3206
3207  # Broken: fails on valid input.
3208continue
3209fi
3210
3211rm -f conftest.err conftest.$ac_ext
3212
3213  # OK, works on sane cases.  Now check whether nonexistent headers
3214  # can be detected and how.
3215  cat >conftest.$ac_ext <<_ACEOF
3216/* confdefs.h.  */
3217_ACEOF
3218cat confdefs.h >>conftest.$ac_ext
3219cat >>conftest.$ac_ext <<_ACEOF
3220/* end confdefs.h.  */
3221#include <ac_nonexistent.h>
3222_ACEOF
3223if { (ac_try="$ac_cpp conftest.$ac_ext"
3224case "(($ac_try" in
3225  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3226  *) ac_try_echo=$ac_try;;
3227esac
3228eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3229  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3230  ac_status=$?
3231  grep -v '^ *+' conftest.er1 >conftest.err
3232  rm -f conftest.er1
3233  cat conftest.err >&5
3234  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3235  (exit $ac_status); } >/dev/null && {
3236	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3237	 test ! -s conftest.err
3238       }; then
3239  # Broken: success on invalid input.
3240continue
3241else
3242  echo "$as_me: failed program was:" >&5
3243sed 's/^/| /' conftest.$ac_ext >&5
3244
3245  # Passes both tests.
3246ac_preproc_ok=:
3247break
3248fi
3249
3250rm -f conftest.err conftest.$ac_ext
3251
3252done
3253# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3254rm -f conftest.err conftest.$ac_ext
3255if $ac_preproc_ok; then
3256  break
3257fi
3258
3259    done
3260    ac_cv_prog_CPP=$CPP
3261
3262fi
3263  CPP=$ac_cv_prog_CPP
3264else
3265  ac_cv_prog_CPP=$CPP
3266fi
3267{ echo "$as_me:$LINENO: result: $CPP" >&5
3268echo "${ECHO_T}$CPP" >&6; }
3269ac_preproc_ok=false
3270for ac_c_preproc_warn_flag in '' yes
3271do
3272  # Use a header file that comes with gcc, so configuring glibc
3273  # with a fresh cross-compiler works.
3274  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3275  # <limits.h> exists even on freestanding compilers.
3276  # On the NeXT, cc -E runs the code through the compiler's parser,
3277  # not just through cpp. "Syntax error" is here to catch this case.
3278  cat >conftest.$ac_ext <<_ACEOF
3279/* confdefs.h.  */
3280_ACEOF
3281cat confdefs.h >>conftest.$ac_ext
3282cat >>conftest.$ac_ext <<_ACEOF
3283/* end confdefs.h.  */
3284#ifdef __STDC__
3285# include <limits.h>
3286#else
3287# include <assert.h>
3288#endif
3289		     Syntax error
3290_ACEOF
3291if { (ac_try="$ac_cpp conftest.$ac_ext"
3292case "(($ac_try" in
3293  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3294  *) ac_try_echo=$ac_try;;
3295esac
3296eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3297  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3298  ac_status=$?
3299  grep -v '^ *+' conftest.er1 >conftest.err
3300  rm -f conftest.er1
3301  cat conftest.err >&5
3302  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3303  (exit $ac_status); } >/dev/null && {
3304	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3305	 test ! -s conftest.err
3306       }; then
3307  :
3308else
3309  echo "$as_me: failed program was:" >&5
3310sed 's/^/| /' conftest.$ac_ext >&5
3311
3312  # Broken: fails on valid input.
3313continue
3314fi
3315
3316rm -f conftest.err conftest.$ac_ext
3317
3318  # OK, works on sane cases.  Now check whether nonexistent headers
3319  # can be detected and how.
3320  cat >conftest.$ac_ext <<_ACEOF
3321/* confdefs.h.  */
3322_ACEOF
3323cat confdefs.h >>conftest.$ac_ext
3324cat >>conftest.$ac_ext <<_ACEOF
3325/* end confdefs.h.  */
3326#include <ac_nonexistent.h>
3327_ACEOF
3328if { (ac_try="$ac_cpp conftest.$ac_ext"
3329case "(($ac_try" in
3330  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3331  *) ac_try_echo=$ac_try;;
3332esac
3333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3334  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3335  ac_status=$?
3336  grep -v '^ *+' conftest.er1 >conftest.err
3337  rm -f conftest.er1
3338  cat conftest.err >&5
3339  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3340  (exit $ac_status); } >/dev/null && {
3341	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3342	 test ! -s conftest.err
3343       }; then
3344  # Broken: success on invalid input.
3345continue
3346else
3347  echo "$as_me: failed program was:" >&5
3348sed 's/^/| /' conftest.$ac_ext >&5
3349
3350  # Passes both tests.
3351ac_preproc_ok=:
3352break
3353fi
3354
3355rm -f conftest.err conftest.$ac_ext
3356
3357done
3358# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3359rm -f conftest.err conftest.$ac_ext
3360if $ac_preproc_ok; then
3361  :
3362else
3363  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3364See \`config.log' for more details." >&5
3365echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3366See \`config.log' for more details." >&2;}
3367   { (exit 1); exit 1; }; }
3368fi
3369
3370ac_ext=c
3371ac_cpp='$CPP $CPPFLAGS'
3372ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3373ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3374ac_compiler_gnu=$ac_cv_c_compiler_gnu
3375
3376
3377    # Find a good install program.  We prefer a C program (faster),
3378# so one script is as good as another.  But avoid the broken or
3379# incompatible versions:
3380# SysV /etc/install, /usr/sbin/install
3381# SunOS /usr/etc/install
3382# IRIX /sbin/install
3383# AIX /bin/install
3384# AmigaOS /C/install, which installs bootblocks on floppy discs
3385# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3386# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3387# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3388# OS/2's system install, which has a completely different semantic
3389# ./install, which can be erroneously created by make from ./install.sh.
3390{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3391echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
3392if test -z "$INSTALL"; then
3393if test "${ac_cv_path_install+set}" = set; then
3394  echo $ECHO_N "(cached) $ECHO_C" >&6
3395else
3396  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3397for as_dir in $PATH
3398do
3399  IFS=$as_save_IFS
3400  test -z "$as_dir" && as_dir=.
3401  # Account for people who put trailing slashes in PATH elements.
3402case $as_dir/ in
3403  ./ | .// | /cC/* | \
3404  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3405  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
3406  /usr/ucb/* ) ;;
3407  *)
3408    # OSF1 and SCO ODT 3.0 have their own names for install.
3409    # Don't use installbsd from OSF since it installs stuff as root
3410    # by default.
3411    for ac_prog in ginstall scoinst install; do
3412      for ac_exec_ext in '' $ac_executable_extensions; do
3413	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3414	  if test $ac_prog = install &&
3415	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3416	    # AIX install.  It has an incompatible calling convention.
3417	    :
3418	  elif test $ac_prog = install &&
3419	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3420	    # program-specific install script used by HP pwplus--don't use.
3421	    :
3422	  else
3423	    ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3424	    break 3
3425	  fi
3426	fi
3427      done
3428    done
3429    ;;
3430esac
3431done
3432IFS=$as_save_IFS
3433
3434
3435fi
3436  if test "${ac_cv_path_install+set}" = set; then
3437    INSTALL=$ac_cv_path_install
3438  else
3439    # As a last resort, use the slow shell script.  Don't cache a
3440    # value for INSTALL within a source directory, because that will
3441    # break other packages using the cache if that directory is
3442    # removed, or if the value is a relative name.
3443    INSTALL=$ac_install_sh
3444  fi
3445fi
3446{ echo "$as_me:$LINENO: result: $INSTALL" >&5
3447echo "${ECHO_T}$INSTALL" >&6; }
3448
3449# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3450# It thinks the first close brace ends the variable substitution.
3451test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3452
3453test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3454
3455test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3456
3457
3458    #--------------------------------------------------------------------
3459    # Checks to see if the make program sets the $MAKE variable.
3460    #--------------------------------------------------------------------
3461
3462    { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3463echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
3464set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3465if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
3466  echo $ECHO_N "(cached) $ECHO_C" >&6
3467else
3468  cat >conftest.make <<\_ACEOF
3469SHELL = /bin/sh
3470all:
3471	@echo '@@@%%%=$(MAKE)=@@@%%%'
3472_ACEOF
3473# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3474case `${MAKE-make} -f conftest.make 2>/dev/null` in
3475  *@@@%%%=?*=@@@%%%*)
3476    eval ac_cv_prog_make_${ac_make}_set=yes;;
3477  *)
3478    eval ac_cv_prog_make_${ac_make}_set=no;;
3479esac
3480rm -f conftest.make
3481fi
3482if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3483  { echo "$as_me:$LINENO: result: yes" >&5
3484echo "${ECHO_T}yes" >&6; }
3485  SET_MAKE=
3486else
3487  { echo "$as_me:$LINENO: result: no" >&5
3488echo "${ECHO_T}no" >&6; }
3489  SET_MAKE="MAKE=${MAKE-make}"
3490fi
3491
3492
3493    #--------------------------------------------------------------------
3494    # Find ranlib
3495    #--------------------------------------------------------------------
3496
3497    if test -n "$ac_tool_prefix"; then
3498  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3499set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3500{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3501echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3502if test "${ac_cv_prog_RANLIB+set}" = set; then
3503  echo $ECHO_N "(cached) $ECHO_C" >&6
3504else
3505  if test -n "$RANLIB"; then
3506  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3507else
3508as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3509for as_dir in $PATH
3510do
3511  IFS=$as_save_IFS
3512  test -z "$as_dir" && as_dir=.
3513  for ac_exec_ext in '' $ac_executable_extensions; do
3514  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3515    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3516    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3517    break 2
3518  fi
3519done
3520done
3521IFS=$as_save_IFS
3522
3523fi
3524fi
3525RANLIB=$ac_cv_prog_RANLIB
3526if test -n "$RANLIB"; then
3527  { echo "$as_me:$LINENO: result: $RANLIB" >&5
3528echo "${ECHO_T}$RANLIB" >&6; }
3529else
3530  { echo "$as_me:$LINENO: result: no" >&5
3531echo "${ECHO_T}no" >&6; }
3532fi
3533
3534
3535fi
3536if test -z "$ac_cv_prog_RANLIB"; then
3537  ac_ct_RANLIB=$RANLIB
3538  # Extract the first word of "ranlib", so it can be a program name with args.
3539set dummy ranlib; ac_word=$2
3540{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3541echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3542if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3543  echo $ECHO_N "(cached) $ECHO_C" >&6
3544else
3545  if test -n "$ac_ct_RANLIB"; then
3546  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3547else
3548as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3549for as_dir in $PATH
3550do
3551  IFS=$as_save_IFS
3552  test -z "$as_dir" && as_dir=.
3553  for ac_exec_ext in '' $ac_executable_extensions; do
3554  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3555    ac_cv_prog_ac_ct_RANLIB="ranlib"
3556    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3557    break 2
3558  fi
3559done
3560done
3561IFS=$as_save_IFS
3562
3563fi
3564fi
3565ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3566if test -n "$ac_ct_RANLIB"; then
3567  { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3568echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
3569else
3570  { echo "$as_me:$LINENO: result: no" >&5
3571echo "${ECHO_T}no" >&6; }
3572fi
3573
3574  if test "x$ac_ct_RANLIB" = x; then
3575    RANLIB=":"
3576  else
3577    case $cross_compiling:$ac_tool_warned in
3578yes:)
3579{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3580whose name does not start with the host triplet.  If you think this
3581configuration is useful to you, please write to autoconf@gnu.org." >&5
3582echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3583whose name does not start with the host triplet.  If you think this
3584configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3585ac_tool_warned=yes ;;
3586esac
3587    RANLIB=$ac_ct_RANLIB
3588  fi
3589else
3590  RANLIB="$ac_cv_prog_RANLIB"
3591fi
3592
3593
3594    #--------------------------------------------------------------------
3595    # Determines the correct binary file extension (.o, .obj, .exe etc.)
3596    #--------------------------------------------------------------------
3597
3598
3599
3600
3601
3602
3603{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3604echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3605if test "${ac_cv_path_GREP+set}" = set; then
3606  echo $ECHO_N "(cached) $ECHO_C" >&6
3607else
3608  # Extract the first word of "grep ggrep" to use in msg output
3609if test -z "$GREP"; then
3610set dummy grep ggrep; ac_prog_name=$2
3611if test "${ac_cv_path_GREP+set}" = set; then
3612  echo $ECHO_N "(cached) $ECHO_C" >&6
3613else
3614  ac_path_GREP_found=false
3615# Loop through the user's path and test for each of PROGNAME-LIST
3616as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3617for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3618do
3619  IFS=$as_save_IFS
3620  test -z "$as_dir" && as_dir=.
3621  for ac_prog in grep ggrep; do
3622  for ac_exec_ext in '' $ac_executable_extensions; do
3623    ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3624    { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3625    # Check for GNU ac_path_GREP and select it if it is found.
3626  # Check for GNU $ac_path_GREP
3627case `"$ac_path_GREP" --version 2>&1` in
3628*GNU*)
3629  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3630*)
3631  ac_count=0
3632  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3633  while :
3634  do
3635    cat "conftest.in" "conftest.in" >"conftest.tmp"
3636    mv "conftest.tmp" "conftest.in"
3637    cp "conftest.in" "conftest.nl"
3638    echo 'GREP' >> "conftest.nl"
3639    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3640    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3641    ac_count=`expr $ac_count + 1`
3642    if test $ac_count -gt ${ac_path_GREP_max-0}; then
3643      # Best one so far, save it but keep looking for a better one
3644      ac_cv_path_GREP="$ac_path_GREP"
3645      ac_path_GREP_max=$ac_count
3646    fi
3647    # 10*(2^10) chars as input seems more than enough
3648    test $ac_count -gt 10 && break
3649  done
3650  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3651esac
3652
3653
3654    $ac_path_GREP_found && break 3
3655  done
3656done
3657
3658done
3659IFS=$as_save_IFS
3660
3661
3662fi
3663
3664GREP="$ac_cv_path_GREP"
3665if test -z "$GREP"; then
3666  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3667echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3668   { (exit 1); exit 1; }; }
3669fi
3670
3671else
3672  ac_cv_path_GREP=$GREP
3673fi
3674
3675
3676fi
3677{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3678echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3679 GREP="$ac_cv_path_GREP"
3680
3681
3682{ echo "$as_me:$LINENO: checking for egrep" >&5
3683echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3684if test "${ac_cv_path_EGREP+set}" = set; then
3685  echo $ECHO_N "(cached) $ECHO_C" >&6
3686else
3687  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3688   then ac_cv_path_EGREP="$GREP -E"
3689   else
3690     # Extract the first word of "egrep" to use in msg output
3691if test -z "$EGREP"; then
3692set dummy egrep; ac_prog_name=$2
3693if test "${ac_cv_path_EGREP+set}" = set; then
3694  echo $ECHO_N "(cached) $ECHO_C" >&6
3695else
3696  ac_path_EGREP_found=false
3697# Loop through the user's path and test for each of PROGNAME-LIST
3698as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3699for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3700do
3701  IFS=$as_save_IFS
3702  test -z "$as_dir" && as_dir=.
3703  for ac_prog in egrep; do
3704  for ac_exec_ext in '' $ac_executable_extensions; do
3705    ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3706    { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3707    # Check for GNU ac_path_EGREP and select it if it is found.
3708  # Check for GNU $ac_path_EGREP
3709case `"$ac_path_EGREP" --version 2>&1` in
3710*GNU*)
3711  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3712*)
3713  ac_count=0
3714  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3715  while :
3716  do
3717    cat "conftest.in" "conftest.in" >"conftest.tmp"
3718    mv "conftest.tmp" "conftest.in"
3719    cp "conftest.in" "conftest.nl"
3720    echo 'EGREP' >> "conftest.nl"
3721    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3722    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3723    ac_count=`expr $ac_count + 1`
3724    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3725      # Best one so far, save it but keep looking for a better one
3726      ac_cv_path_EGREP="$ac_path_EGREP"
3727      ac_path_EGREP_max=$ac_count
3728    fi
3729    # 10*(2^10) chars as input seems more than enough
3730    test $ac_count -gt 10 && break
3731  done
3732  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3733esac
3734
3735
3736    $ac_path_EGREP_found && break 3
3737  done
3738done
3739
3740done
3741IFS=$as_save_IFS
3742
3743
3744fi
3745
3746EGREP="$ac_cv_path_EGREP"
3747if test -z "$EGREP"; then
3748  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3749echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3750   { (exit 1); exit 1; }; }
3751fi
3752
3753else
3754  ac_cv_path_EGREP=$EGREP
3755fi
3756
3757
3758   fi
3759fi
3760{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3761echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3762 EGREP="$ac_cv_path_EGREP"
3763
3764
3765{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3766echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
3767if test "${ac_cv_header_stdc+set}" = set; then
3768  echo $ECHO_N "(cached) $ECHO_C" >&6
3769else
3770  cat >conftest.$ac_ext <<_ACEOF
3771/* confdefs.h.  */
3772_ACEOF
3773cat confdefs.h >>conftest.$ac_ext
3774cat >>conftest.$ac_ext <<_ACEOF
3775/* end confdefs.h.  */
3776#include <stdlib.h>
3777#include <stdarg.h>
3778#include <string.h>
3779#include <float.h>
3780
3781int
3782main ()
3783{
3784
3785  ;
3786  return 0;
3787}
3788_ACEOF
3789rm -f conftest.$ac_objext
3790if { (ac_try="$ac_compile"
3791case "(($ac_try" in
3792  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3793  *) ac_try_echo=$ac_try;;
3794esac
3795eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3796  (eval "$ac_compile") 2>conftest.er1
3797  ac_status=$?
3798  grep -v '^ *+' conftest.er1 >conftest.err
3799  rm -f conftest.er1
3800  cat conftest.err >&5
3801  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3802  (exit $ac_status); } && {
3803	 test -z "$ac_c_werror_flag" ||
3804	 test ! -s conftest.err
3805       } && test -s conftest.$ac_objext; then
3806  ac_cv_header_stdc=yes
3807else
3808  echo "$as_me: failed program was:" >&5
3809sed 's/^/| /' conftest.$ac_ext >&5
3810
3811	ac_cv_header_stdc=no
3812fi
3813
3814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3815
3816if test $ac_cv_header_stdc = yes; then
3817  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3818  cat >conftest.$ac_ext <<_ACEOF
3819/* confdefs.h.  */
3820_ACEOF
3821cat confdefs.h >>conftest.$ac_ext
3822cat >>conftest.$ac_ext <<_ACEOF
3823/* end confdefs.h.  */
3824#include <string.h>
3825
3826_ACEOF
3827if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3828  $EGREP "memchr" >/dev/null 2>&1; then
3829  :
3830else
3831  ac_cv_header_stdc=no
3832fi
3833rm -f -r conftest*
3834
3835fi
3836
3837if test $ac_cv_header_stdc = yes; then
3838  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3839  cat >conftest.$ac_ext <<_ACEOF
3840/* confdefs.h.  */
3841_ACEOF
3842cat confdefs.h >>conftest.$ac_ext
3843cat >>conftest.$ac_ext <<_ACEOF
3844/* end confdefs.h.  */
3845#include <stdlib.h>
3846
3847_ACEOF
3848if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3849  $EGREP "free" >/dev/null 2>&1; then
3850  :
3851else
3852  ac_cv_header_stdc=no
3853fi
3854rm -f -r conftest*
3855
3856fi
3857
3858if test $ac_cv_header_stdc = yes; then
3859  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3860  if test "$cross_compiling" = yes; then
3861  :
3862else
3863  cat >conftest.$ac_ext <<_ACEOF
3864/* confdefs.h.  */
3865_ACEOF
3866cat confdefs.h >>conftest.$ac_ext
3867cat >>conftest.$ac_ext <<_ACEOF
3868/* end confdefs.h.  */
3869#include <ctype.h>
3870#include <stdlib.h>
3871#if ((' ' & 0x0FF) == 0x020)
3872# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3873# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3874#else
3875# define ISLOWER(c) \
3876		   (('a' <= (c) && (c) <= 'i') \
3877		     || ('j' <= (c) && (c) <= 'r') \
3878		     || ('s' <= (c) && (c) <= 'z'))
3879# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3880#endif
3881
3882#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3883int
3884main ()
3885{
3886  int i;
3887  for (i = 0; i < 256; i++)
3888    if (XOR (islower (i), ISLOWER (i))
3889	|| toupper (i) != TOUPPER (i))
3890      return 2;
3891  return 0;
3892}
3893_ACEOF
3894rm -f conftest$ac_exeext
3895if { (ac_try="$ac_link"
3896case "(($ac_try" in
3897  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3898  *) ac_try_echo=$ac_try;;
3899esac
3900eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3901  (eval "$ac_link") 2>&5
3902  ac_status=$?
3903  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3904  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3905  { (case "(($ac_try" in
3906  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3907  *) ac_try_echo=$ac_try;;
3908esac
3909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3910  (eval "$ac_try") 2>&5
3911  ac_status=$?
3912  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3913  (exit $ac_status); }; }; then
3914  :
3915else
3916  echo "$as_me: program exited with status $ac_status" >&5
3917echo "$as_me: failed program was:" >&5
3918sed 's/^/| /' conftest.$ac_ext >&5
3919
3920( exit $ac_status )
3921ac_cv_header_stdc=no
3922fi
3923rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3924fi
3925
3926
3927fi
3928fi
3929{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3930echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
3931if test $ac_cv_header_stdc = yes; then
3932
3933cat >>confdefs.h <<\_ACEOF
3934#define STDC_HEADERS 1
3935_ACEOF
3936
3937fi
3938
3939# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3950		  inttypes.h stdint.h unistd.h
3951do
3952as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3953{ echo "$as_me:$LINENO: checking for $ac_header" >&5
3954echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
3955if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
3956  echo $ECHO_N "(cached) $ECHO_C" >&6
3957else
3958  cat >conftest.$ac_ext <<_ACEOF
3959/* confdefs.h.  */
3960_ACEOF
3961cat confdefs.h >>conftest.$ac_ext
3962cat >>conftest.$ac_ext <<_ACEOF
3963/* end confdefs.h.  */
3964$ac_includes_default
3965
3966#include <$ac_header>
3967_ACEOF
3968rm -f conftest.$ac_objext
3969if { (ac_try="$ac_compile"
3970case "(($ac_try" in
3971  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3972  *) ac_try_echo=$ac_try;;
3973esac
3974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3975  (eval "$ac_compile") 2>conftest.er1
3976  ac_status=$?
3977  grep -v '^ *+' conftest.er1 >conftest.err
3978  rm -f conftest.er1
3979  cat conftest.err >&5
3980  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3981  (exit $ac_status); } && {
3982	 test -z "$ac_c_werror_flag" ||
3983	 test ! -s conftest.err
3984       } && test -s conftest.$ac_objext; then
3985  eval "$as_ac_Header=yes"
3986else
3987  echo "$as_me: failed program was:" >&5
3988sed 's/^/| /' conftest.$ac_ext >&5
3989
3990	eval "$as_ac_Header=no"
3991fi
3992
3993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3994fi
3995ac_res=`eval echo '${'$as_ac_Header'}'`
3996	       { echo "$as_me:$LINENO: result: $ac_res" >&5
3997echo "${ECHO_T}$ac_res" >&6; }
3998if test `eval echo '${'$as_ac_Header'}'` = yes; then
3999  cat >>confdefs.h <<_ACEOF
4000#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4001_ACEOF
4002
4003fi
4004
4005done
4006
4007
4008
4009    # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here.
4010
4011
4012    #------------------------------------------------------------------------
4013    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
4014    # It makes compiling go faster.  (This is only a performance feature.)
4015    #------------------------------------------------------------------------
4016
4017    if test -z "$no_pipe" -a -n "$GCC"; then
4018	{ echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5
4019echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6; }
4020if test "${tcl_cv_cc_pipe+set}" = set; then
4021  echo $ECHO_N "(cached) $ECHO_C" >&6
4022else
4023
4024	    hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
4025	    cat >conftest.$ac_ext <<_ACEOF
4026/* confdefs.h.  */
4027_ACEOF
4028cat confdefs.h >>conftest.$ac_ext
4029cat >>conftest.$ac_ext <<_ACEOF
4030/* end confdefs.h.  */
4031
4032int
4033main ()
4034{
4035
4036  ;
4037  return 0;
4038}
4039_ACEOF
4040rm -f conftest.$ac_objext
4041if { (ac_try="$ac_compile"
4042case "(($ac_try" in
4043  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4044  *) ac_try_echo=$ac_try;;
4045esac
4046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4047  (eval "$ac_compile") 2>conftest.er1
4048  ac_status=$?
4049  grep -v '^ *+' conftest.er1 >conftest.err
4050  rm -f conftest.er1
4051  cat conftest.err >&5
4052  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4053  (exit $ac_status); } && {
4054	 test -z "$ac_c_werror_flag" ||
4055	 test ! -s conftest.err
4056       } && test -s conftest.$ac_objext; then
4057  tcl_cv_cc_pipe=yes
4058else
4059  echo "$as_me: failed program was:" >&5
4060sed 's/^/| /' conftest.$ac_ext >&5
4061
4062	tcl_cv_cc_pipe=no
4063fi
4064
4065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4066	    CFLAGS=$hold_cflags
4067fi
4068{ echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5
4069echo "${ECHO_T}$tcl_cv_cc_pipe" >&6; }
4070	if test $tcl_cv_cc_pipe = yes; then
4071	    CFLAGS="$CFLAGS -pipe"
4072	fi
4073    fi
4074
4075    #--------------------------------------------------------------------
4076    # Common compiler flag setup
4077    #--------------------------------------------------------------------
4078
4079    { echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
4080echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
4081if test "${ac_cv_c_bigendian+set}" = set; then
4082  echo $ECHO_N "(cached) $ECHO_C" >&6
4083else
4084  # See if sys/param.h defines the BYTE_ORDER macro.
4085cat >conftest.$ac_ext <<_ACEOF
4086/* confdefs.h.  */
4087_ACEOF
4088cat confdefs.h >>conftest.$ac_ext
4089cat >>conftest.$ac_ext <<_ACEOF
4090/* end confdefs.h.  */
4091#include <sys/types.h>
4092#include <sys/param.h>
4093
4094int
4095main ()
4096{
4097#if  ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
4098	&& BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
4099 bogus endian macros
4100#endif
4101
4102  ;
4103  return 0;
4104}
4105_ACEOF
4106rm -f conftest.$ac_objext
4107if { (ac_try="$ac_compile"
4108case "(($ac_try" in
4109  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4110  *) ac_try_echo=$ac_try;;
4111esac
4112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4113  (eval "$ac_compile") 2>conftest.er1
4114  ac_status=$?
4115  grep -v '^ *+' conftest.er1 >conftest.err
4116  rm -f conftest.er1
4117  cat conftest.err >&5
4118  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4119  (exit $ac_status); } && {
4120	 test -z "$ac_c_werror_flag" ||
4121	 test ! -s conftest.err
4122       } && test -s conftest.$ac_objext; then
4123  # It does; now see whether it defined to BIG_ENDIAN or not.
4124cat >conftest.$ac_ext <<_ACEOF
4125/* confdefs.h.  */
4126_ACEOF
4127cat confdefs.h >>conftest.$ac_ext
4128cat >>conftest.$ac_ext <<_ACEOF
4129/* end confdefs.h.  */
4130#include <sys/types.h>
4131#include <sys/param.h>
4132
4133int
4134main ()
4135{
4136#if BYTE_ORDER != BIG_ENDIAN
4137 not big endian
4138#endif
4139
4140  ;
4141  return 0;
4142}
4143_ACEOF
4144rm -f conftest.$ac_objext
4145if { (ac_try="$ac_compile"
4146case "(($ac_try" in
4147  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4148  *) ac_try_echo=$ac_try;;
4149esac
4150eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4151  (eval "$ac_compile") 2>conftest.er1
4152  ac_status=$?
4153  grep -v '^ *+' conftest.er1 >conftest.err
4154  rm -f conftest.er1
4155  cat conftest.err >&5
4156  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4157  (exit $ac_status); } && {
4158	 test -z "$ac_c_werror_flag" ||
4159	 test ! -s conftest.err
4160       } && test -s conftest.$ac_objext; then
4161  ac_cv_c_bigendian=yes
4162else
4163  echo "$as_me: failed program was:" >&5
4164sed 's/^/| /' conftest.$ac_ext >&5
4165
4166	ac_cv_c_bigendian=no
4167fi
4168
4169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4170else
4171  echo "$as_me: failed program was:" >&5
4172sed 's/^/| /' conftest.$ac_ext >&5
4173
4174	# It does not; compile a test program.
4175if test "$cross_compiling" = yes; then
4176  # try to guess the endianness by grepping values into an object file
4177  ac_cv_c_bigendian=unknown
4178  cat >conftest.$ac_ext <<_ACEOF
4179/* confdefs.h.  */
4180_ACEOF
4181cat confdefs.h >>conftest.$ac_ext
4182cat >>conftest.$ac_ext <<_ACEOF
4183/* end confdefs.h.  */
4184short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
4185short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
4186void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
4187short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
4188short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
4189void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
4190int
4191main ()
4192{
4193 _ascii (); _ebcdic ();
4194  ;
4195  return 0;
4196}
4197_ACEOF
4198rm -f conftest.$ac_objext
4199if { (ac_try="$ac_compile"
4200case "(($ac_try" in
4201  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4202  *) ac_try_echo=$ac_try;;
4203esac
4204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4205  (eval "$ac_compile") 2>conftest.er1
4206  ac_status=$?
4207  grep -v '^ *+' conftest.er1 >conftest.err
4208  rm -f conftest.er1
4209  cat conftest.err >&5
4210  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4211  (exit $ac_status); } && {
4212	 test -z "$ac_c_werror_flag" ||
4213	 test ! -s conftest.err
4214       } && test -s conftest.$ac_objext; then
4215  if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
4216  ac_cv_c_bigendian=yes
4217fi
4218if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
4219  if test "$ac_cv_c_bigendian" = unknown; then
4220    ac_cv_c_bigendian=no
4221  else
4222    # finding both strings is unlikely to happen, but who knows?
4223    ac_cv_c_bigendian=unknown
4224  fi
4225fi
4226else
4227  echo "$as_me: failed program was:" >&5
4228sed 's/^/| /' conftest.$ac_ext >&5
4229
4230
4231fi
4232
4233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4234else
4235  cat >conftest.$ac_ext <<_ACEOF
4236/* confdefs.h.  */
4237_ACEOF
4238cat confdefs.h >>conftest.$ac_ext
4239cat >>conftest.$ac_ext <<_ACEOF
4240/* end confdefs.h.  */
4241$ac_includes_default
4242int
4243main ()
4244{
4245
4246  /* Are we little or big endian?  From Harbison&Steele.  */
4247  union
4248  {
4249    long int l;
4250    char c[sizeof (long int)];
4251  } u;
4252  u.l = 1;
4253  return u.c[sizeof (long int) - 1] == 1;
4254
4255  ;
4256  return 0;
4257}
4258_ACEOF
4259rm -f conftest$ac_exeext
4260if { (ac_try="$ac_link"
4261case "(($ac_try" in
4262  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4263  *) ac_try_echo=$ac_try;;
4264esac
4265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4266  (eval "$ac_link") 2>&5
4267  ac_status=$?
4268  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4269  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4270  { (case "(($ac_try" in
4271  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4272  *) ac_try_echo=$ac_try;;
4273esac
4274eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4275  (eval "$ac_try") 2>&5
4276  ac_status=$?
4277  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4278  (exit $ac_status); }; }; then
4279  ac_cv_c_bigendian=no
4280else
4281  echo "$as_me: program exited with status $ac_status" >&5
4282echo "$as_me: failed program was:" >&5
4283sed 's/^/| /' conftest.$ac_ext >&5
4284
4285( exit $ac_status )
4286ac_cv_c_bigendian=yes
4287fi
4288rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4289fi
4290
4291
4292fi
4293
4294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4295fi
4296{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
4297echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
4298case $ac_cv_c_bigendian in
4299  yes)
4300
4301cat >>confdefs.h <<\_ACEOF
4302#define WORDS_BIGENDIAN 1
4303_ACEOF
4304 ;;
4305  no)
4306     ;;
4307  *)
4308    { { echo "$as_me:$LINENO: error: unknown endianness
4309presetting ac_cv_c_bigendian=no (or yes) will help" >&5
4310echo "$as_me: error: unknown endianness
4311presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
4312   { (exit 1); exit 1; }; } ;;
4313esac
4314
4315    if test "${TEA_PLATFORM}" = "unix" ; then
4316
4317    #--------------------------------------------------------------------
4318    # On a few very rare systems, all of the libm.a stuff is
4319    # already in libc.a.  Set compiler flags accordingly.
4320    # Also, Linux requires the "ieee" library for math to work
4321    # right (and it must appear before "-lm").
4322    #--------------------------------------------------------------------
4323
4324    { echo "$as_me:$LINENO: checking for sin" >&5
4325echo $ECHO_N "checking for sin... $ECHO_C" >&6; }
4326if test "${ac_cv_func_sin+set}" = set; then
4327  echo $ECHO_N "(cached) $ECHO_C" >&6
4328else
4329  cat >conftest.$ac_ext <<_ACEOF
4330/* confdefs.h.  */
4331_ACEOF
4332cat confdefs.h >>conftest.$ac_ext
4333cat >>conftest.$ac_ext <<_ACEOF
4334/* end confdefs.h.  */
4335/* Define sin to an innocuous variant, in case <limits.h> declares sin.
4336   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4337#define sin innocuous_sin
4338
4339/* System header to define __stub macros and hopefully few prototypes,
4340    which can conflict with char sin (); below.
4341    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4342    <limits.h> exists even on freestanding compilers.  */
4343
4344#ifdef __STDC__
4345# include <limits.h>
4346#else
4347# include <assert.h>
4348#endif
4349
4350#undef sin
4351
4352/* Override any GCC internal prototype to avoid an error.
4353   Use char because int might match the return type of a GCC
4354   builtin and then its argument prototype would still apply.  */
4355#ifdef __cplusplus
4356extern "C"
4357#endif
4358char sin ();
4359/* The GNU C library defines this for functions which it implements
4360    to always fail with ENOSYS.  Some functions are actually named
4361    something starting with __ and the normal name is an alias.  */
4362#if defined __stub_sin || defined __stub___sin
4363choke me
4364#endif
4365
4366int
4367main ()
4368{
4369return sin ();
4370  ;
4371  return 0;
4372}
4373_ACEOF
4374rm -f conftest.$ac_objext conftest$ac_exeext
4375if { (ac_try="$ac_link"
4376case "(($ac_try" in
4377  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4378  *) ac_try_echo=$ac_try;;
4379esac
4380eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4381  (eval "$ac_link") 2>conftest.er1
4382  ac_status=$?
4383  grep -v '^ *+' conftest.er1 >conftest.err
4384  rm -f conftest.er1
4385  cat conftest.err >&5
4386  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4387  (exit $ac_status); } && {
4388	 test -z "$ac_c_werror_flag" ||
4389	 test ! -s conftest.err
4390       } && test -s conftest$ac_exeext &&
4391       $as_test_x conftest$ac_exeext; then
4392  ac_cv_func_sin=yes
4393else
4394  echo "$as_me: failed program was:" >&5
4395sed 's/^/| /' conftest.$ac_ext >&5
4396
4397	ac_cv_func_sin=no
4398fi
4399
4400rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4401      conftest$ac_exeext conftest.$ac_ext
4402fi
4403{ echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5
4404echo "${ECHO_T}$ac_cv_func_sin" >&6; }
4405if test $ac_cv_func_sin = yes; then
4406  MATH_LIBS=""
4407else
4408  MATH_LIBS="-lm"
4409fi
4410
4411    { echo "$as_me:$LINENO: checking for main in -lieee" >&5
4412echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6; }
4413if test "${ac_cv_lib_ieee_main+set}" = set; then
4414  echo $ECHO_N "(cached) $ECHO_C" >&6
4415else
4416  ac_check_lib_save_LIBS=$LIBS
4417LIBS="-lieee  $LIBS"
4418cat >conftest.$ac_ext <<_ACEOF
4419/* confdefs.h.  */
4420_ACEOF
4421cat confdefs.h >>conftest.$ac_ext
4422cat >>conftest.$ac_ext <<_ACEOF
4423/* end confdefs.h.  */
4424
4425
4426int
4427main ()
4428{
4429return main ();
4430  ;
4431  return 0;
4432}
4433_ACEOF
4434rm -f conftest.$ac_objext conftest$ac_exeext
4435if { (ac_try="$ac_link"
4436case "(($ac_try" in
4437  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4438  *) ac_try_echo=$ac_try;;
4439esac
4440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4441  (eval "$ac_link") 2>conftest.er1
4442  ac_status=$?
4443  grep -v '^ *+' conftest.er1 >conftest.err
4444  rm -f conftest.er1
4445  cat conftest.err >&5
4446  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4447  (exit $ac_status); } && {
4448	 test -z "$ac_c_werror_flag" ||
4449	 test ! -s conftest.err
4450       } && test -s conftest$ac_exeext &&
4451       $as_test_x conftest$ac_exeext; then
4452  ac_cv_lib_ieee_main=yes
4453else
4454  echo "$as_me: failed program was:" >&5
4455sed 's/^/| /' conftest.$ac_ext >&5
4456
4457	ac_cv_lib_ieee_main=no
4458fi
4459
4460rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4461      conftest$ac_exeext conftest.$ac_ext
4462LIBS=$ac_check_lib_save_LIBS
4463fi
4464{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5
4465echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6; }
4466if test $ac_cv_lib_ieee_main = yes; then
4467  MATH_LIBS="-lieee $MATH_LIBS"
4468fi
4469
4470
4471    #--------------------------------------------------------------------
4472    # Interactive UNIX requires -linet instead of -lsocket, plus it
4473    # needs net/errno.h to define the socket-related error codes.
4474    #--------------------------------------------------------------------
4475
4476    { echo "$as_me:$LINENO: checking for main in -linet" >&5
4477echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6; }
4478if test "${ac_cv_lib_inet_main+set}" = set; then
4479  echo $ECHO_N "(cached) $ECHO_C" >&6
4480else
4481  ac_check_lib_save_LIBS=$LIBS
4482LIBS="-linet  $LIBS"
4483cat >conftest.$ac_ext <<_ACEOF
4484/* confdefs.h.  */
4485_ACEOF
4486cat confdefs.h >>conftest.$ac_ext
4487cat >>conftest.$ac_ext <<_ACEOF
4488/* end confdefs.h.  */
4489
4490
4491int
4492main ()
4493{
4494return main ();
4495  ;
4496  return 0;
4497}
4498_ACEOF
4499rm -f conftest.$ac_objext conftest$ac_exeext
4500if { (ac_try="$ac_link"
4501case "(($ac_try" in
4502  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4503  *) ac_try_echo=$ac_try;;
4504esac
4505eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4506  (eval "$ac_link") 2>conftest.er1
4507  ac_status=$?
4508  grep -v '^ *+' conftest.er1 >conftest.err
4509  rm -f conftest.er1
4510  cat conftest.err >&5
4511  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4512  (exit $ac_status); } && {
4513	 test -z "$ac_c_werror_flag" ||
4514	 test ! -s conftest.err
4515       } && test -s conftest$ac_exeext &&
4516       $as_test_x conftest$ac_exeext; then
4517  ac_cv_lib_inet_main=yes
4518else
4519  echo "$as_me: failed program was:" >&5
4520sed 's/^/| /' conftest.$ac_ext >&5
4521
4522	ac_cv_lib_inet_main=no
4523fi
4524
4525rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4526      conftest$ac_exeext conftest.$ac_ext
4527LIBS=$ac_check_lib_save_LIBS
4528fi
4529{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5
4530echo "${ECHO_T}$ac_cv_lib_inet_main" >&6; }
4531if test $ac_cv_lib_inet_main = yes; then
4532  LIBS="$LIBS -linet"
4533fi
4534
4535    if test "${ac_cv_header_net_errno_h+set}" = set; then
4536  { echo "$as_me:$LINENO: checking for net/errno.h" >&5
4537echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; }
4538if test "${ac_cv_header_net_errno_h+set}" = set; then
4539  echo $ECHO_N "(cached) $ECHO_C" >&6
4540fi
4541{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
4542echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; }
4543else
4544  # Is the header compilable?
4545{ echo "$as_me:$LINENO: checking net/errno.h usability" >&5
4546echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6; }
4547cat >conftest.$ac_ext <<_ACEOF
4548/* confdefs.h.  */
4549_ACEOF
4550cat confdefs.h >>conftest.$ac_ext
4551cat >>conftest.$ac_ext <<_ACEOF
4552/* end confdefs.h.  */
4553$ac_includes_default
4554#include <net/errno.h>
4555_ACEOF
4556rm -f conftest.$ac_objext
4557if { (ac_try="$ac_compile"
4558case "(($ac_try" in
4559  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4560  *) ac_try_echo=$ac_try;;
4561esac
4562eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4563  (eval "$ac_compile") 2>conftest.er1
4564  ac_status=$?
4565  grep -v '^ *+' conftest.er1 >conftest.err
4566  rm -f conftest.er1
4567  cat conftest.err >&5
4568  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4569  (exit $ac_status); } && {
4570	 test -z "$ac_c_werror_flag" ||
4571	 test ! -s conftest.err
4572       } && test -s conftest.$ac_objext; then
4573  ac_header_compiler=yes
4574else
4575  echo "$as_me: failed program was:" >&5
4576sed 's/^/| /' conftest.$ac_ext >&5
4577
4578	ac_header_compiler=no
4579fi
4580
4581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4582{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4583echo "${ECHO_T}$ac_header_compiler" >&6; }
4584
4585# Is the header present?
4586{ echo "$as_me:$LINENO: checking net/errno.h presence" >&5
4587echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6; }
4588cat >conftest.$ac_ext <<_ACEOF
4589/* confdefs.h.  */
4590_ACEOF
4591cat confdefs.h >>conftest.$ac_ext
4592cat >>conftest.$ac_ext <<_ACEOF
4593/* end confdefs.h.  */
4594#include <net/errno.h>
4595_ACEOF
4596if { (ac_try="$ac_cpp conftest.$ac_ext"
4597case "(($ac_try" in
4598  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4599  *) ac_try_echo=$ac_try;;
4600esac
4601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4602  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4603  ac_status=$?
4604  grep -v '^ *+' conftest.er1 >conftest.err
4605  rm -f conftest.er1
4606  cat conftest.err >&5
4607  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4608  (exit $ac_status); } >/dev/null && {
4609	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4610	 test ! -s conftest.err
4611       }; then
4612  ac_header_preproc=yes
4613else
4614  echo "$as_me: failed program was:" >&5
4615sed 's/^/| /' conftest.$ac_ext >&5
4616
4617  ac_header_preproc=no
4618fi
4619
4620rm -f conftest.err conftest.$ac_ext
4621{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4622echo "${ECHO_T}$ac_header_preproc" >&6; }
4623
4624# So?  What about this header?
4625case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4626  yes:no: )
4627    { echo "$as_me:$LINENO: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
4628echo "$as_me: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4629    { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the compiler's result" >&5
4630echo "$as_me: WARNING: net/errno.h: proceeding with the compiler's result" >&2;}
4631    ac_header_preproc=yes
4632    ;;
4633  no:yes:* )
4634    { echo "$as_me:$LINENO: WARNING: net/errno.h: present but cannot be compiled" >&5
4635echo "$as_me: WARNING: net/errno.h: present but cannot be compiled" >&2;}
4636    { echo "$as_me:$LINENO: WARNING: net/errno.h:     check for missing prerequisite headers?" >&5
4637echo "$as_me: WARNING: net/errno.h:     check for missing prerequisite headers?" >&2;}
4638    { echo "$as_me:$LINENO: WARNING: net/errno.h: see the Autoconf documentation" >&5
4639echo "$as_me: WARNING: net/errno.h: see the Autoconf documentation" >&2;}
4640    { echo "$as_me:$LINENO: WARNING: net/errno.h:     section \"Present But Cannot Be Compiled\"" >&5
4641echo "$as_me: WARNING: net/errno.h:     section \"Present But Cannot Be Compiled\"" >&2;}
4642    { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the preprocessor's result" >&5
4643echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;}
4644    { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5
4645echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;}
4646
4647    ;;
4648esac
4649{ echo "$as_me:$LINENO: checking for net/errno.h" >&5
4650echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; }
4651if test "${ac_cv_header_net_errno_h+set}" = set; then
4652  echo $ECHO_N "(cached) $ECHO_C" >&6
4653else
4654  ac_cv_header_net_errno_h=$ac_header_preproc
4655fi
4656{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
4657echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; }
4658
4659fi
4660if test $ac_cv_header_net_errno_h = yes; then
4661
4662
4663cat >>confdefs.h <<\_ACEOF
4664#define HAVE_NET_ERRNO_H 1
4665_ACEOF
4666
4667fi
4668
4669
4670
4671    #--------------------------------------------------------------------
4672    #	Check for the existence of the -lsocket and -lnsl libraries.
4673    #	The order here is important, so that they end up in the right
4674    #	order in the command line generated by make.  Here are some
4675    #	special considerations:
4676    #	1. Use "connect" and "accept" to check for -lsocket, and
4677    #	   "gethostbyname" to check for -lnsl.
4678    #	2. Use each function name only once:  can't redo a check because
4679    #	   autoconf caches the results of the last check and won't redo it.
4680    #	3. Use -lnsl and -lsocket only if they supply procedures that
4681    #	   aren't already present in the normal libraries.  This is because
4682    #	   IRIX 5.2 has libraries, but they aren't needed and they're
4683    #	   bogus:  they goof up name resolution if used.
4684    #	4. On some SVR4 systems, can't use -lsocket without -lnsl too.
4685    #	   To get around this problem, check for both libraries together
4686    #	   if -lsocket doesn't work by itself.
4687    #--------------------------------------------------------------------
4688
4689    tcl_checkBoth=0
4690    { echo "$as_me:$LINENO: checking for connect" >&5
4691echo $ECHO_N "checking for connect... $ECHO_C" >&6; }
4692if test "${ac_cv_func_connect+set}" = set; then
4693  echo $ECHO_N "(cached) $ECHO_C" >&6
4694else
4695  cat >conftest.$ac_ext <<_ACEOF
4696/* confdefs.h.  */
4697_ACEOF
4698cat confdefs.h >>conftest.$ac_ext
4699cat >>conftest.$ac_ext <<_ACEOF
4700/* end confdefs.h.  */
4701/* Define connect to an innocuous variant, in case <limits.h> declares connect.
4702   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4703#define connect innocuous_connect
4704
4705/* System header to define __stub macros and hopefully few prototypes,
4706    which can conflict with char connect (); below.
4707    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4708    <limits.h> exists even on freestanding compilers.  */
4709
4710#ifdef __STDC__
4711# include <limits.h>
4712#else
4713# include <assert.h>
4714#endif
4715
4716#undef connect
4717
4718/* Override any GCC internal prototype to avoid an error.
4719   Use char because int might match the return type of a GCC
4720   builtin and then its argument prototype would still apply.  */
4721#ifdef __cplusplus
4722extern "C"
4723#endif
4724char connect ();
4725/* The GNU C library defines this for functions which it implements
4726    to always fail with ENOSYS.  Some functions are actually named
4727    something starting with __ and the normal name is an alias.  */
4728#if defined __stub_connect || defined __stub___connect
4729choke me
4730#endif
4731
4732int
4733main ()
4734{
4735return connect ();
4736  ;
4737  return 0;
4738}
4739_ACEOF
4740rm -f conftest.$ac_objext conftest$ac_exeext
4741if { (ac_try="$ac_link"
4742case "(($ac_try" in
4743  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4744  *) ac_try_echo=$ac_try;;
4745esac
4746eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4747  (eval "$ac_link") 2>conftest.er1
4748  ac_status=$?
4749  grep -v '^ *+' conftest.er1 >conftest.err
4750  rm -f conftest.er1
4751  cat conftest.err >&5
4752  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4753  (exit $ac_status); } && {
4754	 test -z "$ac_c_werror_flag" ||
4755	 test ! -s conftest.err
4756       } && test -s conftest$ac_exeext &&
4757       $as_test_x conftest$ac_exeext; then
4758  ac_cv_func_connect=yes
4759else
4760  echo "$as_me: failed program was:" >&5
4761sed 's/^/| /' conftest.$ac_ext >&5
4762
4763	ac_cv_func_connect=no
4764fi
4765
4766rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4767      conftest$ac_exeext conftest.$ac_ext
4768fi
4769{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
4770echo "${ECHO_T}$ac_cv_func_connect" >&6; }
4771if test $ac_cv_func_connect = yes; then
4772  tcl_checkSocket=0
4773else
4774  tcl_checkSocket=1
4775fi
4776
4777    if test "$tcl_checkSocket" = 1; then
4778	{ echo "$as_me:$LINENO: checking for setsockopt" >&5
4779echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6; }
4780if test "${ac_cv_func_setsockopt+set}" = set; then
4781  echo $ECHO_N "(cached) $ECHO_C" >&6
4782else
4783  cat >conftest.$ac_ext <<_ACEOF
4784/* confdefs.h.  */
4785_ACEOF
4786cat confdefs.h >>conftest.$ac_ext
4787cat >>conftest.$ac_ext <<_ACEOF
4788/* end confdefs.h.  */
4789/* Define setsockopt to an innocuous variant, in case <limits.h> declares setsockopt.
4790   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4791#define setsockopt innocuous_setsockopt
4792
4793/* System header to define __stub macros and hopefully few prototypes,
4794    which can conflict with char setsockopt (); below.
4795    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4796    <limits.h> exists even on freestanding compilers.  */
4797
4798#ifdef __STDC__
4799# include <limits.h>
4800#else
4801# include <assert.h>
4802#endif
4803
4804#undef setsockopt
4805
4806/* Override any GCC internal prototype to avoid an error.
4807   Use char because int might match the return type of a GCC
4808   builtin and then its argument prototype would still apply.  */
4809#ifdef __cplusplus
4810extern "C"
4811#endif
4812char setsockopt ();
4813/* The GNU C library defines this for functions which it implements
4814    to always fail with ENOSYS.  Some functions are actually named
4815    something starting with __ and the normal name is an alias.  */
4816#if defined __stub_setsockopt || defined __stub___setsockopt
4817choke me
4818#endif
4819
4820int
4821main ()
4822{
4823return setsockopt ();
4824  ;
4825  return 0;
4826}
4827_ACEOF
4828rm -f conftest.$ac_objext conftest$ac_exeext
4829if { (ac_try="$ac_link"
4830case "(($ac_try" in
4831  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4832  *) ac_try_echo=$ac_try;;
4833esac
4834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4835  (eval "$ac_link") 2>conftest.er1
4836  ac_status=$?
4837  grep -v '^ *+' conftest.er1 >conftest.err
4838  rm -f conftest.er1
4839  cat conftest.err >&5
4840  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4841  (exit $ac_status); } && {
4842	 test -z "$ac_c_werror_flag" ||
4843	 test ! -s conftest.err
4844       } && test -s conftest$ac_exeext &&
4845       $as_test_x conftest$ac_exeext; then
4846  ac_cv_func_setsockopt=yes
4847else
4848  echo "$as_me: failed program was:" >&5
4849sed 's/^/| /' conftest.$ac_ext >&5
4850
4851	ac_cv_func_setsockopt=no
4852fi
4853
4854rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4855      conftest$ac_exeext conftest.$ac_ext
4856fi
4857{ echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5
4858echo "${ECHO_T}$ac_cv_func_setsockopt" >&6; }
4859if test $ac_cv_func_setsockopt = yes; then
4860  :
4861else
4862  { echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5
4863echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6; }
4864if test "${ac_cv_lib_socket_setsockopt+set}" = set; then
4865  echo $ECHO_N "(cached) $ECHO_C" >&6
4866else
4867  ac_check_lib_save_LIBS=$LIBS
4868LIBS="-lsocket  $LIBS"
4869cat >conftest.$ac_ext <<_ACEOF
4870/* confdefs.h.  */
4871_ACEOF
4872cat confdefs.h >>conftest.$ac_ext
4873cat >>conftest.$ac_ext <<_ACEOF
4874/* end confdefs.h.  */
4875
4876/* Override any GCC internal prototype to avoid an error.
4877   Use char because int might match the return type of a GCC
4878   builtin and then its argument prototype would still apply.  */
4879#ifdef __cplusplus
4880extern "C"
4881#endif
4882char setsockopt ();
4883int
4884main ()
4885{
4886return setsockopt ();
4887  ;
4888  return 0;
4889}
4890_ACEOF
4891rm -f conftest.$ac_objext conftest$ac_exeext
4892if { (ac_try="$ac_link"
4893case "(($ac_try" in
4894  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4895  *) ac_try_echo=$ac_try;;
4896esac
4897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4898  (eval "$ac_link") 2>conftest.er1
4899  ac_status=$?
4900  grep -v '^ *+' conftest.er1 >conftest.err
4901  rm -f conftest.er1
4902  cat conftest.err >&5
4903  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4904  (exit $ac_status); } && {
4905	 test -z "$ac_c_werror_flag" ||
4906	 test ! -s conftest.err
4907       } && test -s conftest$ac_exeext &&
4908       $as_test_x conftest$ac_exeext; then
4909  ac_cv_lib_socket_setsockopt=yes
4910else
4911  echo "$as_me: failed program was:" >&5
4912sed 's/^/| /' conftest.$ac_ext >&5
4913
4914	ac_cv_lib_socket_setsockopt=no
4915fi
4916
4917rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4918      conftest$ac_exeext conftest.$ac_ext
4919LIBS=$ac_check_lib_save_LIBS
4920fi
4921{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5
4922echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6; }
4923if test $ac_cv_lib_socket_setsockopt = yes; then
4924  LIBS="$LIBS -lsocket"
4925else
4926  tcl_checkBoth=1
4927fi
4928
4929fi
4930
4931    fi
4932    if test "$tcl_checkBoth" = 1; then
4933	tk_oldLibs=$LIBS
4934	LIBS="$LIBS -lsocket -lnsl"
4935	{ echo "$as_me:$LINENO: checking for accept" >&5
4936echo $ECHO_N "checking for accept... $ECHO_C" >&6; }
4937if test "${ac_cv_func_accept+set}" = set; then
4938  echo $ECHO_N "(cached) $ECHO_C" >&6
4939else
4940  cat >conftest.$ac_ext <<_ACEOF
4941/* confdefs.h.  */
4942_ACEOF
4943cat confdefs.h >>conftest.$ac_ext
4944cat >>conftest.$ac_ext <<_ACEOF
4945/* end confdefs.h.  */
4946/* Define accept to an innocuous variant, in case <limits.h> declares accept.
4947   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4948#define accept innocuous_accept
4949
4950/* System header to define __stub macros and hopefully few prototypes,
4951    which can conflict with char accept (); below.
4952    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4953    <limits.h> exists even on freestanding compilers.  */
4954
4955#ifdef __STDC__
4956# include <limits.h>
4957#else
4958# include <assert.h>
4959#endif
4960
4961#undef accept
4962
4963/* Override any GCC internal prototype to avoid an error.
4964   Use char because int might match the return type of a GCC
4965   builtin and then its argument prototype would still apply.  */
4966#ifdef __cplusplus
4967extern "C"
4968#endif
4969char accept ();
4970/* The GNU C library defines this for functions which it implements
4971    to always fail with ENOSYS.  Some functions are actually named
4972    something starting with __ and the normal name is an alias.  */
4973#if defined __stub_accept || defined __stub___accept
4974choke me
4975#endif
4976
4977int
4978main ()
4979{
4980return accept ();
4981  ;
4982  return 0;
4983}
4984_ACEOF
4985rm -f conftest.$ac_objext conftest$ac_exeext
4986if { (ac_try="$ac_link"
4987case "(($ac_try" in
4988  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4989  *) ac_try_echo=$ac_try;;
4990esac
4991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4992  (eval "$ac_link") 2>conftest.er1
4993  ac_status=$?
4994  grep -v '^ *+' conftest.er1 >conftest.err
4995  rm -f conftest.er1
4996  cat conftest.err >&5
4997  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4998  (exit $ac_status); } && {
4999	 test -z "$ac_c_werror_flag" ||
5000	 test ! -s conftest.err
5001       } && test -s conftest$ac_exeext &&
5002       $as_test_x conftest$ac_exeext; then
5003  ac_cv_func_accept=yes
5004else
5005  echo "$as_me: failed program was:" >&5
5006sed 's/^/| /' conftest.$ac_ext >&5
5007
5008	ac_cv_func_accept=no
5009fi
5010
5011rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5012      conftest$ac_exeext conftest.$ac_ext
5013fi
5014{ echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5
5015echo "${ECHO_T}$ac_cv_func_accept" >&6; }
5016if test $ac_cv_func_accept = yes; then
5017  tcl_checkNsl=0
5018else
5019  LIBS=$tk_oldLibs
5020fi
5021
5022    fi
5023    { echo "$as_me:$LINENO: checking for gethostbyname" >&5
5024echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; }
5025if test "${ac_cv_func_gethostbyname+set}" = set; then
5026  echo $ECHO_N "(cached) $ECHO_C" >&6
5027else
5028  cat >conftest.$ac_ext <<_ACEOF
5029/* confdefs.h.  */
5030_ACEOF
5031cat confdefs.h >>conftest.$ac_ext
5032cat >>conftest.$ac_ext <<_ACEOF
5033/* end confdefs.h.  */
5034/* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
5035   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5036#define gethostbyname innocuous_gethostbyname
5037
5038/* System header to define __stub macros and hopefully few prototypes,
5039    which can conflict with char gethostbyname (); below.
5040    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5041    <limits.h> exists even on freestanding compilers.  */
5042
5043#ifdef __STDC__
5044# include <limits.h>
5045#else
5046# include <assert.h>
5047#endif
5048
5049#undef gethostbyname
5050
5051/* Override any GCC internal prototype to avoid an error.
5052   Use char because int might match the return type of a GCC
5053   builtin and then its argument prototype would still apply.  */
5054#ifdef __cplusplus
5055extern "C"
5056#endif
5057char gethostbyname ();
5058/* The GNU C library defines this for functions which it implements
5059    to always fail with ENOSYS.  Some functions are actually named
5060    something starting with __ and the normal name is an alias.  */
5061#if defined __stub_gethostbyname || defined __stub___gethostbyname
5062choke me
5063#endif
5064
5065int
5066main ()
5067{
5068return gethostbyname ();
5069  ;
5070  return 0;
5071}
5072_ACEOF
5073rm -f conftest.$ac_objext conftest$ac_exeext
5074if { (ac_try="$ac_link"
5075case "(($ac_try" in
5076  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5077  *) ac_try_echo=$ac_try;;
5078esac
5079eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5080  (eval "$ac_link") 2>conftest.er1
5081  ac_status=$?
5082  grep -v '^ *+' conftest.er1 >conftest.err
5083  rm -f conftest.er1
5084  cat conftest.err >&5
5085  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5086  (exit $ac_status); } && {
5087	 test -z "$ac_c_werror_flag" ||
5088	 test ! -s conftest.err
5089       } && test -s conftest$ac_exeext &&
5090       $as_test_x conftest$ac_exeext; then
5091  ac_cv_func_gethostbyname=yes
5092else
5093  echo "$as_me: failed program was:" >&5
5094sed 's/^/| /' conftest.$ac_ext >&5
5095
5096	ac_cv_func_gethostbyname=no
5097fi
5098
5099rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5100      conftest$ac_exeext conftest.$ac_ext
5101fi
5102{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
5103echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; }
5104if test $ac_cv_func_gethostbyname = yes; then
5105  :
5106else
5107  { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
5108echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; }
5109if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
5110  echo $ECHO_N "(cached) $ECHO_C" >&6
5111else
5112  ac_check_lib_save_LIBS=$LIBS
5113LIBS="-lnsl  $LIBS"
5114cat >conftest.$ac_ext <<_ACEOF
5115/* confdefs.h.  */
5116_ACEOF
5117cat confdefs.h >>conftest.$ac_ext
5118cat >>conftest.$ac_ext <<_ACEOF
5119/* end confdefs.h.  */
5120
5121/* Override any GCC internal prototype to avoid an error.
5122   Use char because int might match the return type of a GCC
5123   builtin and then its argument prototype would still apply.  */
5124#ifdef __cplusplus
5125extern "C"
5126#endif
5127char gethostbyname ();
5128int
5129main ()
5130{
5131return gethostbyname ();
5132  ;
5133  return 0;
5134}
5135_ACEOF
5136rm -f conftest.$ac_objext conftest$ac_exeext
5137if { (ac_try="$ac_link"
5138case "(($ac_try" in
5139  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5140  *) ac_try_echo=$ac_try;;
5141esac
5142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5143  (eval "$ac_link") 2>conftest.er1
5144  ac_status=$?
5145  grep -v '^ *+' conftest.er1 >conftest.err
5146  rm -f conftest.er1
5147  cat conftest.err >&5
5148  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5149  (exit $ac_status); } && {
5150	 test -z "$ac_c_werror_flag" ||
5151	 test ! -s conftest.err
5152       } && test -s conftest$ac_exeext &&
5153       $as_test_x conftest$ac_exeext; then
5154  ac_cv_lib_nsl_gethostbyname=yes
5155else
5156  echo "$as_me: failed program was:" >&5
5157sed 's/^/| /' conftest.$ac_ext >&5
5158
5159	ac_cv_lib_nsl_gethostbyname=no
5160fi
5161
5162rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5163      conftest$ac_exeext conftest.$ac_ext
5164LIBS=$ac_check_lib_save_LIBS
5165fi
5166{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
5167echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; }
5168if test $ac_cv_lib_nsl_gethostbyname = yes; then
5169  LIBS="$LIBS -lnsl"
5170fi
5171
5172fi
5173
5174
5175    # TEA specific: Don't perform the eval of the libraries here because
5176    # DL_LIBS won't be set until we call TEA_CONFIG_CFLAGS
5177
5178    TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}'
5179
5180
5181
5182
5183    { echo "$as_me:$LINENO: checking dirent.h" >&5
5184echo $ECHO_N "checking dirent.h... $ECHO_C" >&6; }
5185if test "${tcl_cv_dirent_h+set}" = set; then
5186  echo $ECHO_N "(cached) $ECHO_C" >&6
5187else
5188
5189    cat >conftest.$ac_ext <<_ACEOF
5190/* confdefs.h.  */
5191_ACEOF
5192cat confdefs.h >>conftest.$ac_ext
5193cat >>conftest.$ac_ext <<_ACEOF
5194/* end confdefs.h.  */
5195#include <sys/types.h>
5196#include <dirent.h>
5197int
5198main ()
5199{
5200
5201#ifndef _POSIX_SOURCE
5202#   ifdef __Lynx__
5203	/*
5204	 * Generate compilation error to make the test fail:  Lynx headers
5205	 * are only valid if really in the POSIX environment.
5206	 */
5207
5208	missing_procedure();
5209#   endif
5210#endif
5211DIR *d;
5212struct dirent *entryPtr;
5213char *p;
5214d = opendir("foobar");
5215entryPtr = readdir(d);
5216p = entryPtr->d_name;
5217closedir(d);
5218
5219  ;
5220  return 0;
5221}
5222_ACEOF
5223rm -f conftest.$ac_objext conftest$ac_exeext
5224if { (ac_try="$ac_link"
5225case "(($ac_try" in
5226  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5227  *) ac_try_echo=$ac_try;;
5228esac
5229eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5230  (eval "$ac_link") 2>conftest.er1
5231  ac_status=$?
5232  grep -v '^ *+' conftest.er1 >conftest.err
5233  rm -f conftest.er1
5234  cat conftest.err >&5
5235  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5236  (exit $ac_status); } && {
5237	 test -z "$ac_c_werror_flag" ||
5238	 test ! -s conftest.err
5239       } && test -s conftest$ac_exeext &&
5240       $as_test_x conftest$ac_exeext; then
5241  tcl_cv_dirent_h=yes
5242else
5243  echo "$as_me: failed program was:" >&5
5244sed 's/^/| /' conftest.$ac_ext >&5
5245
5246	tcl_cv_dirent_h=no
5247fi
5248
5249rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5250      conftest$ac_exeext conftest.$ac_ext
5251fi
5252{ echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5
5253echo "${ECHO_T}$tcl_cv_dirent_h" >&6; }
5254
5255    if test $tcl_cv_dirent_h = no; then
5256
5257cat >>confdefs.h <<\_ACEOF
5258#define NO_DIRENT_H 1
5259_ACEOF
5260
5261    fi
5262
5263    # TEA specific:
5264    if test "${ac_cv_header_errno_h+set}" = set; then
5265  { echo "$as_me:$LINENO: checking for errno.h" >&5
5266echo $ECHO_N "checking for errno.h... $ECHO_C" >&6; }
5267if test "${ac_cv_header_errno_h+set}" = set; then
5268  echo $ECHO_N "(cached) $ECHO_C" >&6
5269fi
5270{ echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
5271echo "${ECHO_T}$ac_cv_header_errno_h" >&6; }
5272else
5273  # Is the header compilable?
5274{ echo "$as_me:$LINENO: checking errno.h usability" >&5
5275echo $ECHO_N "checking errno.h usability... $ECHO_C" >&6; }
5276cat >conftest.$ac_ext <<_ACEOF
5277/* confdefs.h.  */
5278_ACEOF
5279cat confdefs.h >>conftest.$ac_ext
5280cat >>conftest.$ac_ext <<_ACEOF
5281/* end confdefs.h.  */
5282$ac_includes_default
5283#include <errno.h>
5284_ACEOF
5285rm -f conftest.$ac_objext
5286if { (ac_try="$ac_compile"
5287case "(($ac_try" in
5288  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5289  *) ac_try_echo=$ac_try;;
5290esac
5291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5292  (eval "$ac_compile") 2>conftest.er1
5293  ac_status=$?
5294  grep -v '^ *+' conftest.er1 >conftest.err
5295  rm -f conftest.er1
5296  cat conftest.err >&5
5297  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5298  (exit $ac_status); } && {
5299	 test -z "$ac_c_werror_flag" ||
5300	 test ! -s conftest.err
5301       } && test -s conftest.$ac_objext; then
5302  ac_header_compiler=yes
5303else
5304  echo "$as_me: failed program was:" >&5
5305sed 's/^/| /' conftest.$ac_ext >&5
5306
5307	ac_header_compiler=no
5308fi
5309
5310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5311{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5312echo "${ECHO_T}$ac_header_compiler" >&6; }
5313
5314# Is the header present?
5315{ echo "$as_me:$LINENO: checking errno.h presence" >&5
5316echo $ECHO_N "checking errno.h presence... $ECHO_C" >&6; }
5317cat >conftest.$ac_ext <<_ACEOF
5318/* confdefs.h.  */
5319_ACEOF
5320cat confdefs.h >>conftest.$ac_ext
5321cat >>conftest.$ac_ext <<_ACEOF
5322/* end confdefs.h.  */
5323#include <errno.h>
5324_ACEOF
5325if { (ac_try="$ac_cpp conftest.$ac_ext"
5326case "(($ac_try" in
5327  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5328  *) ac_try_echo=$ac_try;;
5329esac
5330eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5331  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5332  ac_status=$?
5333  grep -v '^ *+' conftest.er1 >conftest.err
5334  rm -f conftest.er1
5335  cat conftest.err >&5
5336  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5337  (exit $ac_status); } >/dev/null && {
5338	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5339	 test ! -s conftest.err
5340       }; then
5341  ac_header_preproc=yes
5342else
5343  echo "$as_me: failed program was:" >&5
5344sed 's/^/| /' conftest.$ac_ext >&5
5345
5346  ac_header_preproc=no
5347fi
5348
5349rm -f conftest.err conftest.$ac_ext
5350{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5351echo "${ECHO_T}$ac_header_preproc" >&6; }
5352
5353# So?  What about this header?
5354case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5355  yes:no: )
5356    { echo "$as_me:$LINENO: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
5357echo "$as_me: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5358    { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the compiler's result" >&5
5359echo "$as_me: WARNING: errno.h: proceeding with the compiler's result" >&2;}
5360    ac_header_preproc=yes
5361    ;;
5362  no:yes:* )
5363    { echo "$as_me:$LINENO: WARNING: errno.h: present but cannot be compiled" >&5
5364echo "$as_me: WARNING: errno.h: present but cannot be compiled" >&2;}
5365    { echo "$as_me:$LINENO: WARNING: errno.h:     check for missing prerequisite headers?" >&5
5366echo "$as_me: WARNING: errno.h:     check for missing prerequisite headers?" >&2;}
5367    { echo "$as_me:$LINENO: WARNING: errno.h: see the Autoconf documentation" >&5
5368echo "$as_me: WARNING: errno.h: see the Autoconf documentation" >&2;}
5369    { echo "$as_me:$LINENO: WARNING: errno.h:     section \"Present But Cannot Be Compiled\"" >&5
5370echo "$as_me: WARNING: errno.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5371    { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the preprocessor's result" >&5
5372echo "$as_me: WARNING: errno.h: proceeding with the preprocessor's result" >&2;}
5373    { echo "$as_me:$LINENO: WARNING: errno.h: in the future, the compiler will take precedence" >&5
5374echo "$as_me: WARNING: errno.h: in the future, the compiler will take precedence" >&2;}
5375
5376    ;;
5377esac
5378{ echo "$as_me:$LINENO: checking for errno.h" >&5
5379echo $ECHO_N "checking for errno.h... $ECHO_C" >&6; }
5380if test "${ac_cv_header_errno_h+set}" = set; then
5381  echo $ECHO_N "(cached) $ECHO_C" >&6
5382else
5383  ac_cv_header_errno_h=$ac_header_preproc
5384fi
5385{ echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
5386echo "${ECHO_T}$ac_cv_header_errno_h" >&6; }
5387
5388fi
5389if test $ac_cv_header_errno_h = yes; then
5390  :
5391else
5392
5393cat >>confdefs.h <<\_ACEOF
5394#define NO_ERRNO_H 1
5395_ACEOF
5396
5397fi
5398
5399
5400    if test "${ac_cv_header_float_h+set}" = set; then
5401  { echo "$as_me:$LINENO: checking for float.h" >&5
5402echo $ECHO_N "checking for float.h... $ECHO_C" >&6; }
5403if test "${ac_cv_header_float_h+set}" = set; then
5404  echo $ECHO_N "(cached) $ECHO_C" >&6
5405fi
5406{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
5407echo "${ECHO_T}$ac_cv_header_float_h" >&6; }
5408else
5409  # Is the header compilable?
5410{ echo "$as_me:$LINENO: checking float.h usability" >&5
5411echo $ECHO_N "checking float.h usability... $ECHO_C" >&6; }
5412cat >conftest.$ac_ext <<_ACEOF
5413/* confdefs.h.  */
5414_ACEOF
5415cat confdefs.h >>conftest.$ac_ext
5416cat >>conftest.$ac_ext <<_ACEOF
5417/* end confdefs.h.  */
5418$ac_includes_default
5419#include <float.h>
5420_ACEOF
5421rm -f conftest.$ac_objext
5422if { (ac_try="$ac_compile"
5423case "(($ac_try" in
5424  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5425  *) ac_try_echo=$ac_try;;
5426esac
5427eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5428  (eval "$ac_compile") 2>conftest.er1
5429  ac_status=$?
5430  grep -v '^ *+' conftest.er1 >conftest.err
5431  rm -f conftest.er1
5432  cat conftest.err >&5
5433  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5434  (exit $ac_status); } && {
5435	 test -z "$ac_c_werror_flag" ||
5436	 test ! -s conftest.err
5437       } && test -s conftest.$ac_objext; then
5438  ac_header_compiler=yes
5439else
5440  echo "$as_me: failed program was:" >&5
5441sed 's/^/| /' conftest.$ac_ext >&5
5442
5443	ac_header_compiler=no
5444fi
5445
5446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5447{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5448echo "${ECHO_T}$ac_header_compiler" >&6; }
5449
5450# Is the header present?
5451{ echo "$as_me:$LINENO: checking float.h presence" >&5
5452echo $ECHO_N "checking float.h presence... $ECHO_C" >&6; }
5453cat >conftest.$ac_ext <<_ACEOF
5454/* confdefs.h.  */
5455_ACEOF
5456cat confdefs.h >>conftest.$ac_ext
5457cat >>conftest.$ac_ext <<_ACEOF
5458/* end confdefs.h.  */
5459#include <float.h>
5460_ACEOF
5461if { (ac_try="$ac_cpp conftest.$ac_ext"
5462case "(($ac_try" in
5463  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5464  *) ac_try_echo=$ac_try;;
5465esac
5466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5467  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5468  ac_status=$?
5469  grep -v '^ *+' conftest.er1 >conftest.err
5470  rm -f conftest.er1
5471  cat conftest.err >&5
5472  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5473  (exit $ac_status); } >/dev/null && {
5474	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5475	 test ! -s conftest.err
5476       }; then
5477  ac_header_preproc=yes
5478else
5479  echo "$as_me: failed program was:" >&5
5480sed 's/^/| /' conftest.$ac_ext >&5
5481
5482  ac_header_preproc=no
5483fi
5484
5485rm -f conftest.err conftest.$ac_ext
5486{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5487echo "${ECHO_T}$ac_header_preproc" >&6; }
5488
5489# So?  What about this header?
5490case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5491  yes:no: )
5492    { echo "$as_me:$LINENO: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&5
5493echo "$as_me: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5494    { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the compiler's result" >&5
5495echo "$as_me: WARNING: float.h: proceeding with the compiler's result" >&2;}
5496    ac_header_preproc=yes
5497    ;;
5498  no:yes:* )
5499    { echo "$as_me:$LINENO: WARNING: float.h: present but cannot be compiled" >&5
5500echo "$as_me: WARNING: float.h: present but cannot be compiled" >&2;}
5501    { echo "$as_me:$LINENO: WARNING: float.h:     check for missing prerequisite headers?" >&5
5502echo "$as_me: WARNING: float.h:     check for missing prerequisite headers?" >&2;}
5503    { echo "$as_me:$LINENO: WARNING: float.h: see the Autoconf documentation" >&5
5504echo "$as_me: WARNING: float.h: see the Autoconf documentation" >&2;}
5505    { echo "$as_me:$LINENO: WARNING: float.h:     section \"Present But Cannot Be Compiled\"" >&5
5506echo "$as_me: WARNING: float.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5507    { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the preprocessor's result" >&5
5508echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;}
5509    { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5
5510echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;}
5511
5512    ;;
5513esac
5514{ echo "$as_me:$LINENO: checking for float.h" >&5
5515echo $ECHO_N "checking for float.h... $ECHO_C" >&6; }
5516if test "${ac_cv_header_float_h+set}" = set; then
5517  echo $ECHO_N "(cached) $ECHO_C" >&6
5518else
5519  ac_cv_header_float_h=$ac_header_preproc
5520fi
5521{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
5522echo "${ECHO_T}$ac_cv_header_float_h" >&6; }
5523
5524fi
5525if test $ac_cv_header_float_h = yes; then
5526  :
5527else
5528
5529cat >>confdefs.h <<\_ACEOF
5530#define NO_FLOAT_H 1
5531_ACEOF
5532
5533fi
5534
5535
5536    if test "${ac_cv_header_values_h+set}" = set; then
5537  { echo "$as_me:$LINENO: checking for values.h" >&5
5538echo $ECHO_N "checking for values.h... $ECHO_C" >&6; }
5539if test "${ac_cv_header_values_h+set}" = set; then
5540  echo $ECHO_N "(cached) $ECHO_C" >&6
5541fi
5542{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
5543echo "${ECHO_T}$ac_cv_header_values_h" >&6; }
5544else
5545  # Is the header compilable?
5546{ echo "$as_me:$LINENO: checking values.h usability" >&5
5547echo $ECHO_N "checking values.h usability... $ECHO_C" >&6; }
5548cat >conftest.$ac_ext <<_ACEOF
5549/* confdefs.h.  */
5550_ACEOF
5551cat confdefs.h >>conftest.$ac_ext
5552cat >>conftest.$ac_ext <<_ACEOF
5553/* end confdefs.h.  */
5554$ac_includes_default
5555#include <values.h>
5556_ACEOF
5557rm -f conftest.$ac_objext
5558if { (ac_try="$ac_compile"
5559case "(($ac_try" in
5560  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5561  *) ac_try_echo=$ac_try;;
5562esac
5563eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5564  (eval "$ac_compile") 2>conftest.er1
5565  ac_status=$?
5566  grep -v '^ *+' conftest.er1 >conftest.err
5567  rm -f conftest.er1
5568  cat conftest.err >&5
5569  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5570  (exit $ac_status); } && {
5571	 test -z "$ac_c_werror_flag" ||
5572	 test ! -s conftest.err
5573       } && test -s conftest.$ac_objext; then
5574  ac_header_compiler=yes
5575else
5576  echo "$as_me: failed program was:" >&5
5577sed 's/^/| /' conftest.$ac_ext >&5
5578
5579	ac_header_compiler=no
5580fi
5581
5582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5583{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5584echo "${ECHO_T}$ac_header_compiler" >&6; }
5585
5586# Is the header present?
5587{ echo "$as_me:$LINENO: checking values.h presence" >&5
5588echo $ECHO_N "checking values.h presence... $ECHO_C" >&6; }
5589cat >conftest.$ac_ext <<_ACEOF
5590/* confdefs.h.  */
5591_ACEOF
5592cat confdefs.h >>conftest.$ac_ext
5593cat >>conftest.$ac_ext <<_ACEOF
5594/* end confdefs.h.  */
5595#include <values.h>
5596_ACEOF
5597if { (ac_try="$ac_cpp conftest.$ac_ext"
5598case "(($ac_try" in
5599  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5600  *) ac_try_echo=$ac_try;;
5601esac
5602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5603  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5604  ac_status=$?
5605  grep -v '^ *+' conftest.er1 >conftest.err
5606  rm -f conftest.er1
5607  cat conftest.err >&5
5608  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5609  (exit $ac_status); } >/dev/null && {
5610	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5611	 test ! -s conftest.err
5612       }; then
5613  ac_header_preproc=yes
5614else
5615  echo "$as_me: failed program was:" >&5
5616sed 's/^/| /' conftest.$ac_ext >&5
5617
5618  ac_header_preproc=no
5619fi
5620
5621rm -f conftest.err conftest.$ac_ext
5622{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5623echo "${ECHO_T}$ac_header_preproc" >&6; }
5624
5625# So?  What about this header?
5626case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5627  yes:no: )
5628    { echo "$as_me:$LINENO: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&5
5629echo "$as_me: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5630    { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the compiler's result" >&5
5631echo "$as_me: WARNING: values.h: proceeding with the compiler's result" >&2;}
5632    ac_header_preproc=yes
5633    ;;
5634  no:yes:* )
5635    { echo "$as_me:$LINENO: WARNING: values.h: present but cannot be compiled" >&5
5636echo "$as_me: WARNING: values.h: present but cannot be compiled" >&2;}
5637    { echo "$as_me:$LINENO: WARNING: values.h:     check for missing prerequisite headers?" >&5
5638echo "$as_me: WARNING: values.h:     check for missing prerequisite headers?" >&2;}
5639    { echo "$as_me:$LINENO: WARNING: values.h: see the Autoconf documentation" >&5
5640echo "$as_me: WARNING: values.h: see the Autoconf documentation" >&2;}
5641    { echo "$as_me:$LINENO: WARNING: values.h:     section \"Present But Cannot Be Compiled\"" >&5
5642echo "$as_me: WARNING: values.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5643    { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the preprocessor's result" >&5
5644echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;}
5645    { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5
5646echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;}
5647
5648    ;;
5649esac
5650{ echo "$as_me:$LINENO: checking for values.h" >&5
5651echo $ECHO_N "checking for values.h... $ECHO_C" >&6; }
5652if test "${ac_cv_header_values_h+set}" = set; then
5653  echo $ECHO_N "(cached) $ECHO_C" >&6
5654else
5655  ac_cv_header_values_h=$ac_header_preproc
5656fi
5657{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
5658echo "${ECHO_T}$ac_cv_header_values_h" >&6; }
5659
5660fi
5661if test $ac_cv_header_values_h = yes; then
5662  :
5663else
5664
5665cat >>confdefs.h <<\_ACEOF
5666#define NO_VALUES_H 1
5667_ACEOF
5668
5669fi
5670
5671
5672    if test "${ac_cv_header_limits_h+set}" = set; then
5673  { echo "$as_me:$LINENO: checking for limits.h" >&5
5674echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; }
5675if test "${ac_cv_header_limits_h+set}" = set; then
5676  echo $ECHO_N "(cached) $ECHO_C" >&6
5677fi
5678{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
5679echo "${ECHO_T}$ac_cv_header_limits_h" >&6; }
5680else
5681  # Is the header compilable?
5682{ echo "$as_me:$LINENO: checking limits.h usability" >&5
5683echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6; }
5684cat >conftest.$ac_ext <<_ACEOF
5685/* confdefs.h.  */
5686_ACEOF
5687cat confdefs.h >>conftest.$ac_ext
5688cat >>conftest.$ac_ext <<_ACEOF
5689/* end confdefs.h.  */
5690$ac_includes_default
5691#include <limits.h>
5692_ACEOF
5693rm -f conftest.$ac_objext
5694if { (ac_try="$ac_compile"
5695case "(($ac_try" in
5696  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5697  *) ac_try_echo=$ac_try;;
5698esac
5699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5700  (eval "$ac_compile") 2>conftest.er1
5701  ac_status=$?
5702  grep -v '^ *+' conftest.er1 >conftest.err
5703  rm -f conftest.er1
5704  cat conftest.err >&5
5705  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5706  (exit $ac_status); } && {
5707	 test -z "$ac_c_werror_flag" ||
5708	 test ! -s conftest.err
5709       } && test -s conftest.$ac_objext; then
5710  ac_header_compiler=yes
5711else
5712  echo "$as_me: failed program was:" >&5
5713sed 's/^/| /' conftest.$ac_ext >&5
5714
5715	ac_header_compiler=no
5716fi
5717
5718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5719{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5720echo "${ECHO_T}$ac_header_compiler" >&6; }
5721
5722# Is the header present?
5723{ echo "$as_me:$LINENO: checking limits.h presence" >&5
5724echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6; }
5725cat >conftest.$ac_ext <<_ACEOF
5726/* confdefs.h.  */
5727_ACEOF
5728cat confdefs.h >>conftest.$ac_ext
5729cat >>conftest.$ac_ext <<_ACEOF
5730/* end confdefs.h.  */
5731#include <limits.h>
5732_ACEOF
5733if { (ac_try="$ac_cpp conftest.$ac_ext"
5734case "(($ac_try" in
5735  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5736  *) ac_try_echo=$ac_try;;
5737esac
5738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5739  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5740  ac_status=$?
5741  grep -v '^ *+' conftest.er1 >conftest.err
5742  rm -f conftest.er1
5743  cat conftest.err >&5
5744  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5745  (exit $ac_status); } >/dev/null && {
5746	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5747	 test ! -s conftest.err
5748       }; then
5749  ac_header_preproc=yes
5750else
5751  echo "$as_me: failed program was:" >&5
5752sed 's/^/| /' conftest.$ac_ext >&5
5753
5754  ac_header_preproc=no
5755fi
5756
5757rm -f conftest.err conftest.$ac_ext
5758{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5759echo "${ECHO_T}$ac_header_preproc" >&6; }
5760
5761# So?  What about this header?
5762case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5763  yes:no: )
5764    { echo "$as_me:$LINENO: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&5
5765echo "$as_me: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5766    { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the compiler's result" >&5
5767echo "$as_me: WARNING: limits.h: proceeding with the compiler's result" >&2;}
5768    ac_header_preproc=yes
5769    ;;
5770  no:yes:* )
5771    { echo "$as_me:$LINENO: WARNING: limits.h: present but cannot be compiled" >&5
5772echo "$as_me: WARNING: limits.h: present but cannot be compiled" >&2;}
5773    { echo "$as_me:$LINENO: WARNING: limits.h:     check for missing prerequisite headers?" >&5
5774echo "$as_me: WARNING: limits.h:     check for missing prerequisite headers?" >&2;}
5775    { echo "$as_me:$LINENO: WARNING: limits.h: see the Autoconf documentation" >&5
5776echo "$as_me: WARNING: limits.h: see the Autoconf documentation" >&2;}
5777    { echo "$as_me:$LINENO: WARNING: limits.h:     section \"Present But Cannot Be Compiled\"" >&5
5778echo "$as_me: WARNING: limits.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5779    { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the preprocessor's result" >&5
5780echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;}
5781    { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5
5782echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;}
5783
5784    ;;
5785esac
5786{ echo "$as_me:$LINENO: checking for limits.h" >&5
5787echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; }
5788if test "${ac_cv_header_limits_h+set}" = set; then
5789  echo $ECHO_N "(cached) $ECHO_C" >&6
5790else
5791  ac_cv_header_limits_h=$ac_header_preproc
5792fi
5793{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
5794echo "${ECHO_T}$ac_cv_header_limits_h" >&6; }
5795
5796fi
5797if test $ac_cv_header_limits_h = yes; then
5798
5799cat >>confdefs.h <<\_ACEOF
5800#define HAVE_LIMITS_H 1
5801_ACEOF
5802
5803else
5804
5805cat >>confdefs.h <<\_ACEOF
5806#define NO_LIMITS_H 1
5807_ACEOF
5808
5809fi
5810
5811
5812    if test "${ac_cv_header_stdlib_h+set}" = set; then
5813  { echo "$as_me:$LINENO: checking for stdlib.h" >&5
5814echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; }
5815if test "${ac_cv_header_stdlib_h+set}" = set; then
5816  echo $ECHO_N "(cached) $ECHO_C" >&6
5817fi
5818{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
5819echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; }
5820else
5821  # Is the header compilable?
5822{ echo "$as_me:$LINENO: checking stdlib.h usability" >&5
5823echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6; }
5824cat >conftest.$ac_ext <<_ACEOF
5825/* confdefs.h.  */
5826_ACEOF
5827cat confdefs.h >>conftest.$ac_ext
5828cat >>conftest.$ac_ext <<_ACEOF
5829/* end confdefs.h.  */
5830$ac_includes_default
5831#include <stdlib.h>
5832_ACEOF
5833rm -f conftest.$ac_objext
5834if { (ac_try="$ac_compile"
5835case "(($ac_try" in
5836  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5837  *) ac_try_echo=$ac_try;;
5838esac
5839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5840  (eval "$ac_compile") 2>conftest.er1
5841  ac_status=$?
5842  grep -v '^ *+' conftest.er1 >conftest.err
5843  rm -f conftest.er1
5844  cat conftest.err >&5
5845  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5846  (exit $ac_status); } && {
5847	 test -z "$ac_c_werror_flag" ||
5848	 test ! -s conftest.err
5849       } && test -s conftest.$ac_objext; then
5850  ac_header_compiler=yes
5851else
5852  echo "$as_me: failed program was:" >&5
5853sed 's/^/| /' conftest.$ac_ext >&5
5854
5855	ac_header_compiler=no
5856fi
5857
5858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5859{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5860echo "${ECHO_T}$ac_header_compiler" >&6; }
5861
5862# Is the header present?
5863{ echo "$as_me:$LINENO: checking stdlib.h presence" >&5
5864echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6; }
5865cat >conftest.$ac_ext <<_ACEOF
5866/* confdefs.h.  */
5867_ACEOF
5868cat confdefs.h >>conftest.$ac_ext
5869cat >>conftest.$ac_ext <<_ACEOF
5870/* end confdefs.h.  */
5871#include <stdlib.h>
5872_ACEOF
5873if { (ac_try="$ac_cpp conftest.$ac_ext"
5874case "(($ac_try" in
5875  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5876  *) ac_try_echo=$ac_try;;
5877esac
5878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5879  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5880  ac_status=$?
5881  grep -v '^ *+' conftest.er1 >conftest.err
5882  rm -f conftest.er1
5883  cat conftest.err >&5
5884  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5885  (exit $ac_status); } >/dev/null && {
5886	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5887	 test ! -s conftest.err
5888       }; then
5889  ac_header_preproc=yes
5890else
5891  echo "$as_me: failed program was:" >&5
5892sed 's/^/| /' conftest.$ac_ext >&5
5893
5894  ac_header_preproc=no
5895fi
5896
5897rm -f conftest.err conftest.$ac_ext
5898{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5899echo "${ECHO_T}$ac_header_preproc" >&6; }
5900
5901# So?  What about this header?
5902case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5903  yes:no: )
5904    { echo "$as_me:$LINENO: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
5905echo "$as_me: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5906    { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the compiler's result" >&5
5907echo "$as_me: WARNING: stdlib.h: proceeding with the compiler's result" >&2;}
5908    ac_header_preproc=yes
5909    ;;
5910  no:yes:* )
5911    { echo "$as_me:$LINENO: WARNING: stdlib.h: present but cannot be compiled" >&5
5912echo "$as_me: WARNING: stdlib.h: present but cannot be compiled" >&2;}
5913    { echo "$as_me:$LINENO: WARNING: stdlib.h:     check for missing prerequisite headers?" >&5
5914echo "$as_me: WARNING: stdlib.h:     check for missing prerequisite headers?" >&2;}
5915    { echo "$as_me:$LINENO: WARNING: stdlib.h: see the Autoconf documentation" >&5
5916echo "$as_me: WARNING: stdlib.h: see the Autoconf documentation" >&2;}
5917    { echo "$as_me:$LINENO: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&5
5918echo "$as_me: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5919    { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the preprocessor's result" >&5
5920echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;}
5921    { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5
5922echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;}
5923
5924    ;;
5925esac
5926{ echo "$as_me:$LINENO: checking for stdlib.h" >&5
5927echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; }
5928if test "${ac_cv_header_stdlib_h+set}" = set; then
5929  echo $ECHO_N "(cached) $ECHO_C" >&6
5930else
5931  ac_cv_header_stdlib_h=$ac_header_preproc
5932fi
5933{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
5934echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; }
5935
5936fi
5937if test $ac_cv_header_stdlib_h = yes; then
5938  tcl_ok=1
5939else
5940  tcl_ok=0
5941fi
5942
5943
5944    cat >conftest.$ac_ext <<_ACEOF
5945/* confdefs.h.  */
5946_ACEOF
5947cat confdefs.h >>conftest.$ac_ext
5948cat >>conftest.$ac_ext <<_ACEOF
5949/* end confdefs.h.  */
5950#include <stdlib.h>
5951
5952_ACEOF
5953if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5954  $EGREP "strtol" >/dev/null 2>&1; then
5955  :
5956else
5957  tcl_ok=0
5958fi
5959rm -f -r conftest*
5960
5961    cat >conftest.$ac_ext <<_ACEOF
5962/* confdefs.h.  */
5963_ACEOF
5964cat confdefs.h >>conftest.$ac_ext
5965cat >>conftest.$ac_ext <<_ACEOF
5966/* end confdefs.h.  */
5967#include <stdlib.h>
5968
5969_ACEOF
5970if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5971  $EGREP "strtoul" >/dev/null 2>&1; then
5972  :
5973else
5974  tcl_ok=0
5975fi
5976rm -f -r conftest*
5977
5978    cat >conftest.$ac_ext <<_ACEOF
5979/* confdefs.h.  */
5980_ACEOF
5981cat confdefs.h >>conftest.$ac_ext
5982cat >>conftest.$ac_ext <<_ACEOF
5983/* end confdefs.h.  */
5984#include <stdlib.h>
5985
5986_ACEOF
5987if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5988  $EGREP "strtod" >/dev/null 2>&1; then
5989  :
5990else
5991  tcl_ok=0
5992fi
5993rm -f -r conftest*
5994
5995    if test $tcl_ok = 0; then
5996
5997cat >>confdefs.h <<\_ACEOF
5998#define NO_STDLIB_H 1
5999_ACEOF
6000
6001    fi
6002    if test "${ac_cv_header_string_h+set}" = set; then
6003  { echo "$as_me:$LINENO: checking for string.h" >&5
6004echo $ECHO_N "checking for string.h... $ECHO_C" >&6; }
6005if test "${ac_cv_header_string_h+set}" = set; then
6006  echo $ECHO_N "(cached) $ECHO_C" >&6
6007fi
6008{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
6009echo "${ECHO_T}$ac_cv_header_string_h" >&6; }
6010else
6011  # Is the header compilable?
6012{ echo "$as_me:$LINENO: checking string.h usability" >&5
6013echo $ECHO_N "checking string.h usability... $ECHO_C" >&6; }
6014cat >conftest.$ac_ext <<_ACEOF
6015/* confdefs.h.  */
6016_ACEOF
6017cat confdefs.h >>conftest.$ac_ext
6018cat >>conftest.$ac_ext <<_ACEOF
6019/* end confdefs.h.  */
6020$ac_includes_default
6021#include <string.h>
6022_ACEOF
6023rm -f conftest.$ac_objext
6024if { (ac_try="$ac_compile"
6025case "(($ac_try" in
6026  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6027  *) ac_try_echo=$ac_try;;
6028esac
6029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6030  (eval "$ac_compile") 2>conftest.er1
6031  ac_status=$?
6032  grep -v '^ *+' conftest.er1 >conftest.err
6033  rm -f conftest.er1
6034  cat conftest.err >&5
6035  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6036  (exit $ac_status); } && {
6037	 test -z "$ac_c_werror_flag" ||
6038	 test ! -s conftest.err
6039       } && test -s conftest.$ac_objext; then
6040  ac_header_compiler=yes
6041else
6042  echo "$as_me: failed program was:" >&5
6043sed 's/^/| /' conftest.$ac_ext >&5
6044
6045	ac_header_compiler=no
6046fi
6047
6048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6049{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6050echo "${ECHO_T}$ac_header_compiler" >&6; }
6051
6052# Is the header present?
6053{ echo "$as_me:$LINENO: checking string.h presence" >&5
6054echo $ECHO_N "checking string.h presence... $ECHO_C" >&6; }
6055cat >conftest.$ac_ext <<_ACEOF
6056/* confdefs.h.  */
6057_ACEOF
6058cat confdefs.h >>conftest.$ac_ext
6059cat >>conftest.$ac_ext <<_ACEOF
6060/* end confdefs.h.  */
6061#include <string.h>
6062_ACEOF
6063if { (ac_try="$ac_cpp conftest.$ac_ext"
6064case "(($ac_try" in
6065  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6066  *) ac_try_echo=$ac_try;;
6067esac
6068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6069  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6070  ac_status=$?
6071  grep -v '^ *+' conftest.er1 >conftest.err
6072  rm -f conftest.er1
6073  cat conftest.err >&5
6074  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6075  (exit $ac_status); } >/dev/null && {
6076	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6077	 test ! -s conftest.err
6078       }; then
6079  ac_header_preproc=yes
6080else
6081  echo "$as_me: failed program was:" >&5
6082sed 's/^/| /' conftest.$ac_ext >&5
6083
6084  ac_header_preproc=no
6085fi
6086
6087rm -f conftest.err conftest.$ac_ext
6088{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6089echo "${ECHO_T}$ac_header_preproc" >&6; }
6090
6091# So?  What about this header?
6092case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6093  yes:no: )
6094    { echo "$as_me:$LINENO: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&5
6095echo "$as_me: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6096    { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the compiler's result" >&5
6097echo "$as_me: WARNING: string.h: proceeding with the compiler's result" >&2;}
6098    ac_header_preproc=yes
6099    ;;
6100  no:yes:* )
6101    { echo "$as_me:$LINENO: WARNING: string.h: present but cannot be compiled" >&5
6102echo "$as_me: WARNING: string.h: present but cannot be compiled" >&2;}
6103    { echo "$as_me:$LINENO: WARNING: string.h:     check for missing prerequisite headers?" >&5
6104echo "$as_me: WARNING: string.h:     check for missing prerequisite headers?" >&2;}
6105    { echo "$as_me:$LINENO: WARNING: string.h: see the Autoconf documentation" >&5
6106echo "$as_me: WARNING: string.h: see the Autoconf documentation" >&2;}
6107    { echo "$as_me:$LINENO: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&5
6108echo "$as_me: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6109    { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the preprocessor's result" >&5
6110echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;}
6111    { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5
6112echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;}
6113
6114    ;;
6115esac
6116{ echo "$as_me:$LINENO: checking for string.h" >&5
6117echo $ECHO_N "checking for string.h... $ECHO_C" >&6; }
6118if test "${ac_cv_header_string_h+set}" = set; then
6119  echo $ECHO_N "(cached) $ECHO_C" >&6
6120else
6121  ac_cv_header_string_h=$ac_header_preproc
6122fi
6123{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
6124echo "${ECHO_T}$ac_cv_header_string_h" >&6; }
6125
6126fi
6127if test $ac_cv_header_string_h = yes; then
6128  tcl_ok=1
6129else
6130  tcl_ok=0
6131fi
6132
6133
6134    cat >conftest.$ac_ext <<_ACEOF
6135/* confdefs.h.  */
6136_ACEOF
6137cat confdefs.h >>conftest.$ac_ext
6138cat >>conftest.$ac_ext <<_ACEOF
6139/* end confdefs.h.  */
6140#include <string.h>
6141
6142_ACEOF
6143if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6144  $EGREP "strstr" >/dev/null 2>&1; then
6145  :
6146else
6147  tcl_ok=0
6148fi
6149rm -f -r conftest*
6150
6151    cat >conftest.$ac_ext <<_ACEOF
6152/* confdefs.h.  */
6153_ACEOF
6154cat confdefs.h >>conftest.$ac_ext
6155cat >>conftest.$ac_ext <<_ACEOF
6156/* end confdefs.h.  */
6157#include <string.h>
6158
6159_ACEOF
6160if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6161  $EGREP "strerror" >/dev/null 2>&1; then
6162  :
6163else
6164  tcl_ok=0
6165fi
6166rm -f -r conftest*
6167
6168
6169    # See also memmove check below for a place where NO_STRING_H can be
6170    # set and why.
6171
6172    if test $tcl_ok = 0; then
6173
6174cat >>confdefs.h <<\_ACEOF
6175#define NO_STRING_H 1
6176_ACEOF
6177
6178    fi
6179
6180    if test "${ac_cv_header_sys_wait_h+set}" = set; then
6181  { echo "$as_me:$LINENO: checking for sys/wait.h" >&5
6182echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; }
6183if test "${ac_cv_header_sys_wait_h+set}" = set; then
6184  echo $ECHO_N "(cached) $ECHO_C" >&6
6185fi
6186{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
6187echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
6188else
6189  # Is the header compilable?
6190{ echo "$as_me:$LINENO: checking sys/wait.h usability" >&5
6191echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6; }
6192cat >conftest.$ac_ext <<_ACEOF
6193/* confdefs.h.  */
6194_ACEOF
6195cat confdefs.h >>conftest.$ac_ext
6196cat >>conftest.$ac_ext <<_ACEOF
6197/* end confdefs.h.  */
6198$ac_includes_default
6199#include <sys/wait.h>
6200_ACEOF
6201rm -f conftest.$ac_objext
6202if { (ac_try="$ac_compile"
6203case "(($ac_try" in
6204  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6205  *) ac_try_echo=$ac_try;;
6206esac
6207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6208  (eval "$ac_compile") 2>conftest.er1
6209  ac_status=$?
6210  grep -v '^ *+' conftest.er1 >conftest.err
6211  rm -f conftest.er1
6212  cat conftest.err >&5
6213  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6214  (exit $ac_status); } && {
6215	 test -z "$ac_c_werror_flag" ||
6216	 test ! -s conftest.err
6217       } && test -s conftest.$ac_objext; then
6218  ac_header_compiler=yes
6219else
6220  echo "$as_me: failed program was:" >&5
6221sed 's/^/| /' conftest.$ac_ext >&5
6222
6223	ac_header_compiler=no
6224fi
6225
6226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6227{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6228echo "${ECHO_T}$ac_header_compiler" >&6; }
6229
6230# Is the header present?
6231{ echo "$as_me:$LINENO: checking sys/wait.h presence" >&5
6232echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6; }
6233cat >conftest.$ac_ext <<_ACEOF
6234/* confdefs.h.  */
6235_ACEOF
6236cat confdefs.h >>conftest.$ac_ext
6237cat >>conftest.$ac_ext <<_ACEOF
6238/* end confdefs.h.  */
6239#include <sys/wait.h>
6240_ACEOF
6241if { (ac_try="$ac_cpp conftest.$ac_ext"
6242case "(($ac_try" in
6243  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6244  *) ac_try_echo=$ac_try;;
6245esac
6246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6247  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6248  ac_status=$?
6249  grep -v '^ *+' conftest.er1 >conftest.err
6250  rm -f conftest.er1
6251  cat conftest.err >&5
6252  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6253  (exit $ac_status); } >/dev/null && {
6254	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6255	 test ! -s conftest.err
6256       }; then
6257  ac_header_preproc=yes
6258else
6259  echo "$as_me: failed program was:" >&5
6260sed 's/^/| /' conftest.$ac_ext >&5
6261
6262  ac_header_preproc=no
6263fi
6264
6265rm -f conftest.err conftest.$ac_ext
6266{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6267echo "${ECHO_T}$ac_header_preproc" >&6; }
6268
6269# So?  What about this header?
6270case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6271  yes:no: )
6272    { echo "$as_me:$LINENO: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&5
6273echo "$as_me: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6274    { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the compiler's result" >&5
6275echo "$as_me: WARNING: sys/wait.h: proceeding with the compiler's result" >&2;}
6276    ac_header_preproc=yes
6277    ;;
6278  no:yes:* )
6279    { echo "$as_me:$LINENO: WARNING: sys/wait.h: present but cannot be compiled" >&5
6280echo "$as_me: WARNING: sys/wait.h: present but cannot be compiled" >&2;}
6281    { echo "$as_me:$LINENO: WARNING: sys/wait.h:     check for missing prerequisite headers?" >&5
6282echo "$as_me: WARNING: sys/wait.h:     check for missing prerequisite headers?" >&2;}
6283    { echo "$as_me:$LINENO: WARNING: sys/wait.h: see the Autoconf documentation" >&5
6284echo "$as_me: WARNING: sys/wait.h: see the Autoconf documentation" >&2;}
6285    { echo "$as_me:$LINENO: WARNING: sys/wait.h:     section \"Present But Cannot Be Compiled\"" >&5
6286echo "$as_me: WARNING: sys/wait.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6287    { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&5
6288echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;}
6289    { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5
6290echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;}
6291
6292    ;;
6293esac
6294{ echo "$as_me:$LINENO: checking for sys/wait.h" >&5
6295echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; }
6296if test "${ac_cv_header_sys_wait_h+set}" = set; then
6297  echo $ECHO_N "(cached) $ECHO_C" >&6
6298else
6299  ac_cv_header_sys_wait_h=$ac_header_preproc
6300fi
6301{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
6302echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
6303
6304fi
6305if test $ac_cv_header_sys_wait_h = yes; then
6306  :
6307else
6308
6309cat >>confdefs.h <<\_ACEOF
6310#define NO_SYS_WAIT_H 1
6311_ACEOF
6312
6313fi
6314
6315
6316    if test "${ac_cv_header_dlfcn_h+set}" = set; then
6317  { echo "$as_me:$LINENO: checking for dlfcn.h" >&5
6318echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; }
6319if test "${ac_cv_header_dlfcn_h+set}" = set; then
6320  echo $ECHO_N "(cached) $ECHO_C" >&6
6321fi
6322{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
6323echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; }
6324else
6325  # Is the header compilable?
6326{ echo "$as_me:$LINENO: checking dlfcn.h usability" >&5
6327echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6; }
6328cat >conftest.$ac_ext <<_ACEOF
6329/* confdefs.h.  */
6330_ACEOF
6331cat confdefs.h >>conftest.$ac_ext
6332cat >>conftest.$ac_ext <<_ACEOF
6333/* end confdefs.h.  */
6334$ac_includes_default
6335#include <dlfcn.h>
6336_ACEOF
6337rm -f conftest.$ac_objext
6338if { (ac_try="$ac_compile"
6339case "(($ac_try" in
6340  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6341  *) ac_try_echo=$ac_try;;
6342esac
6343eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6344  (eval "$ac_compile") 2>conftest.er1
6345  ac_status=$?
6346  grep -v '^ *+' conftest.er1 >conftest.err
6347  rm -f conftest.er1
6348  cat conftest.err >&5
6349  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6350  (exit $ac_status); } && {
6351	 test -z "$ac_c_werror_flag" ||
6352	 test ! -s conftest.err
6353       } && test -s conftest.$ac_objext; then
6354  ac_header_compiler=yes
6355else
6356  echo "$as_me: failed program was:" >&5
6357sed 's/^/| /' conftest.$ac_ext >&5
6358
6359	ac_header_compiler=no
6360fi
6361
6362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6363{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6364echo "${ECHO_T}$ac_header_compiler" >&6; }
6365
6366# Is the header present?
6367{ echo "$as_me:$LINENO: checking dlfcn.h presence" >&5
6368echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6; }
6369cat >conftest.$ac_ext <<_ACEOF
6370/* confdefs.h.  */
6371_ACEOF
6372cat confdefs.h >>conftest.$ac_ext
6373cat >>conftest.$ac_ext <<_ACEOF
6374/* end confdefs.h.  */
6375#include <dlfcn.h>
6376_ACEOF
6377if { (ac_try="$ac_cpp conftest.$ac_ext"
6378case "(($ac_try" in
6379  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6380  *) ac_try_echo=$ac_try;;
6381esac
6382eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6383  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6384  ac_status=$?
6385  grep -v '^ *+' conftest.er1 >conftest.err
6386  rm -f conftest.er1
6387  cat conftest.err >&5
6388  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6389  (exit $ac_status); } >/dev/null && {
6390	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6391	 test ! -s conftest.err
6392       }; then
6393  ac_header_preproc=yes
6394else
6395  echo "$as_me: failed program was:" >&5
6396sed 's/^/| /' conftest.$ac_ext >&5
6397
6398  ac_header_preproc=no
6399fi
6400
6401rm -f conftest.err conftest.$ac_ext
6402{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6403echo "${ECHO_T}$ac_header_preproc" >&6; }
6404
6405# So?  What about this header?
6406case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6407  yes:no: )
6408    { echo "$as_me:$LINENO: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&5
6409echo "$as_me: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6410    { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the compiler's result" >&5
6411echo "$as_me: WARNING: dlfcn.h: proceeding with the compiler's result" >&2;}
6412    ac_header_preproc=yes
6413    ;;
6414  no:yes:* )
6415    { echo "$as_me:$LINENO: WARNING: dlfcn.h: present but cannot be compiled" >&5
6416echo "$as_me: WARNING: dlfcn.h: present but cannot be compiled" >&2;}
6417    { echo "$as_me:$LINENO: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&5
6418echo "$as_me: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&2;}
6419    { echo "$as_me:$LINENO: WARNING: dlfcn.h: see the Autoconf documentation" >&5
6420echo "$as_me: WARNING: dlfcn.h: see the Autoconf documentation" >&2;}
6421    { echo "$as_me:$LINENO: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&5
6422echo "$as_me: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6423    { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5
6424echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;}
6425    { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5
6426echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;}
6427
6428    ;;
6429esac
6430{ echo "$as_me:$LINENO: checking for dlfcn.h" >&5
6431echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; }
6432if test "${ac_cv_header_dlfcn_h+set}" = set; then
6433  echo $ECHO_N "(cached) $ECHO_C" >&6
6434else
6435  ac_cv_header_dlfcn_h=$ac_header_preproc
6436fi
6437{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
6438echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; }
6439
6440fi
6441if test $ac_cv_header_dlfcn_h = yes; then
6442  :
6443else
6444
6445cat >>confdefs.h <<\_ACEOF
6446#define NO_DLFCN_H 1
6447_ACEOF
6448
6449fi
6450
6451
6452
6453    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
6454
6455for ac_header in sys/param.h
6456do
6457as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6458if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6459  { echo "$as_me:$LINENO: checking for $ac_header" >&5
6460echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6461if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6462  echo $ECHO_N "(cached) $ECHO_C" >&6
6463fi
6464ac_res=`eval echo '${'$as_ac_Header'}'`
6465	       { echo "$as_me:$LINENO: result: $ac_res" >&5
6466echo "${ECHO_T}$ac_res" >&6; }
6467else
6468  # Is the header compilable?
6469{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6470echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
6471cat >conftest.$ac_ext <<_ACEOF
6472/* confdefs.h.  */
6473_ACEOF
6474cat confdefs.h >>conftest.$ac_ext
6475cat >>conftest.$ac_ext <<_ACEOF
6476/* end confdefs.h.  */
6477$ac_includes_default
6478#include <$ac_header>
6479_ACEOF
6480rm -f conftest.$ac_objext
6481if { (ac_try="$ac_compile"
6482case "(($ac_try" in
6483  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6484  *) ac_try_echo=$ac_try;;
6485esac
6486eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6487  (eval "$ac_compile") 2>conftest.er1
6488  ac_status=$?
6489  grep -v '^ *+' conftest.er1 >conftest.err
6490  rm -f conftest.er1
6491  cat conftest.err >&5
6492  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6493  (exit $ac_status); } && {
6494	 test -z "$ac_c_werror_flag" ||
6495	 test ! -s conftest.err
6496       } && test -s conftest.$ac_objext; then
6497  ac_header_compiler=yes
6498else
6499  echo "$as_me: failed program was:" >&5
6500sed 's/^/| /' conftest.$ac_ext >&5
6501
6502	ac_header_compiler=no
6503fi
6504
6505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6506{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6507echo "${ECHO_T}$ac_header_compiler" >&6; }
6508
6509# Is the header present?
6510{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6511echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
6512cat >conftest.$ac_ext <<_ACEOF
6513/* confdefs.h.  */
6514_ACEOF
6515cat confdefs.h >>conftest.$ac_ext
6516cat >>conftest.$ac_ext <<_ACEOF
6517/* end confdefs.h.  */
6518#include <$ac_header>
6519_ACEOF
6520if { (ac_try="$ac_cpp conftest.$ac_ext"
6521case "(($ac_try" in
6522  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6523  *) ac_try_echo=$ac_try;;
6524esac
6525eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6526  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6527  ac_status=$?
6528  grep -v '^ *+' conftest.er1 >conftest.err
6529  rm -f conftest.er1
6530  cat conftest.err >&5
6531  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6532  (exit $ac_status); } >/dev/null && {
6533	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6534	 test ! -s conftest.err
6535       }; then
6536  ac_header_preproc=yes
6537else
6538  echo "$as_me: failed program was:" >&5
6539sed 's/^/| /' conftest.$ac_ext >&5
6540
6541  ac_header_preproc=no
6542fi
6543
6544rm -f conftest.err conftest.$ac_ext
6545{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6546echo "${ECHO_T}$ac_header_preproc" >&6; }
6547
6548# So?  What about this header?
6549case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6550  yes:no: )
6551    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6552echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6553    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6554echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6555    ac_header_preproc=yes
6556    ;;
6557  no:yes:* )
6558    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6559echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6560    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
6561echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
6562    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6563echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6564    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
6565echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
6566    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6567echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6568    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6569echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6570
6571    ;;
6572esac
6573{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6574echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6575if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6576  echo $ECHO_N "(cached) $ECHO_C" >&6
6577else
6578  eval "$as_ac_Header=\$ac_header_preproc"
6579fi
6580ac_res=`eval echo '${'$as_ac_Header'}'`
6581	       { echo "$as_me:$LINENO: result: $ac_res" >&5
6582echo "${ECHO_T}$ac_res" >&6; }
6583
6584fi
6585if test `eval echo '${'$as_ac_Header'}'` = yes; then
6586  cat >>confdefs.h <<_ACEOF
6587#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6588_ACEOF
6589
6590fi
6591
6592done
6593
6594
6595	# Let the user call this, because if it triggers, they will
6596	# need a compat/strtod.c that is correct.  Users can also
6597	# use Tcl_GetDouble(FromObj) instead.
6598	#TEA_BUGGY_STRTOD
6599    fi
6600
6601{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
6602echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
6603if test "${ac_cv_header_stdc+set}" = set; then
6604  echo $ECHO_N "(cached) $ECHO_C" >&6
6605else
6606  cat >conftest.$ac_ext <<_ACEOF
6607/* confdefs.h.  */
6608_ACEOF
6609cat confdefs.h >>conftest.$ac_ext
6610cat >>conftest.$ac_ext <<_ACEOF
6611/* end confdefs.h.  */
6612#include <stdlib.h>
6613#include <stdarg.h>
6614#include <string.h>
6615#include <float.h>
6616
6617int
6618main ()
6619{
6620
6621  ;
6622  return 0;
6623}
6624_ACEOF
6625rm -f conftest.$ac_objext
6626if { (ac_try="$ac_compile"
6627case "(($ac_try" in
6628  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6629  *) ac_try_echo=$ac_try;;
6630esac
6631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6632  (eval "$ac_compile") 2>conftest.er1
6633  ac_status=$?
6634  grep -v '^ *+' conftest.er1 >conftest.err
6635  rm -f conftest.er1
6636  cat conftest.err >&5
6637  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6638  (exit $ac_status); } && {
6639	 test -z "$ac_c_werror_flag" ||
6640	 test ! -s conftest.err
6641       } && test -s conftest.$ac_objext; then
6642  ac_cv_header_stdc=yes
6643else
6644  echo "$as_me: failed program was:" >&5
6645sed 's/^/| /' conftest.$ac_ext >&5
6646
6647	ac_cv_header_stdc=no
6648fi
6649
6650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6651
6652if test $ac_cv_header_stdc = yes; then
6653  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6654  cat >conftest.$ac_ext <<_ACEOF
6655/* confdefs.h.  */
6656_ACEOF
6657cat confdefs.h >>conftest.$ac_ext
6658cat >>conftest.$ac_ext <<_ACEOF
6659/* end confdefs.h.  */
6660#include <string.h>
6661
6662_ACEOF
6663if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6664  $EGREP "memchr" >/dev/null 2>&1; then
6665  :
6666else
6667  ac_cv_header_stdc=no
6668fi
6669rm -f -r conftest*
6670
6671fi
6672
6673if test $ac_cv_header_stdc = yes; then
6674  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6675  cat >conftest.$ac_ext <<_ACEOF
6676/* confdefs.h.  */
6677_ACEOF
6678cat confdefs.h >>conftest.$ac_ext
6679cat >>conftest.$ac_ext <<_ACEOF
6680/* end confdefs.h.  */
6681#include <stdlib.h>
6682
6683_ACEOF
6684if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6685  $EGREP "free" >/dev/null 2>&1; then
6686  :
6687else
6688  ac_cv_header_stdc=no
6689fi
6690rm -f -r conftest*
6691
6692fi
6693
6694if test $ac_cv_header_stdc = yes; then
6695  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6696  if test "$cross_compiling" = yes; then
6697  :
6698else
6699  cat >conftest.$ac_ext <<_ACEOF
6700/* confdefs.h.  */
6701_ACEOF
6702cat confdefs.h >>conftest.$ac_ext
6703cat >>conftest.$ac_ext <<_ACEOF
6704/* end confdefs.h.  */
6705#include <ctype.h>
6706#include <stdlib.h>
6707#if ((' ' & 0x0FF) == 0x020)
6708# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6709# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6710#else
6711# define ISLOWER(c) \
6712		   (('a' <= (c) && (c) <= 'i') \
6713		     || ('j' <= (c) && (c) <= 'r') \
6714		     || ('s' <= (c) && (c) <= 'z'))
6715# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6716#endif
6717
6718#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6719int
6720main ()
6721{
6722  int i;
6723  for (i = 0; i < 256; i++)
6724    if (XOR (islower (i), ISLOWER (i))
6725	|| toupper (i) != TOUPPER (i))
6726      return 2;
6727  return 0;
6728}
6729_ACEOF
6730rm -f conftest$ac_exeext
6731if { (ac_try="$ac_link"
6732case "(($ac_try" in
6733  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6734  *) ac_try_echo=$ac_try;;
6735esac
6736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6737  (eval "$ac_link") 2>&5
6738  ac_status=$?
6739  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6740  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6741  { (case "(($ac_try" in
6742  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6743  *) ac_try_echo=$ac_try;;
6744esac
6745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6746  (eval "$ac_try") 2>&5
6747  ac_status=$?
6748  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6749  (exit $ac_status); }; }; then
6750  :
6751else
6752  echo "$as_me: program exited with status $ac_status" >&5
6753echo "$as_me: failed program was:" >&5
6754sed 's/^/| /' conftest.$ac_ext >&5
6755
6756( exit $ac_status )
6757ac_cv_header_stdc=no
6758fi
6759rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6760fi
6761
6762
6763fi
6764fi
6765{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6766echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
6767if test $ac_cv_header_stdc = yes; then
6768
6769cat >>confdefs.h <<\_ACEOF
6770#define STDC_HEADERS 1
6771_ACEOF
6772
6773fi
6774
6775
6776# Determine a full path for the chosen compiler to ensure that the
6777# libtiff configure tool is using the same one as ourselves.
6778
6779TIFFCC=`echo "$CC" | sed -e 's/-pipe//'`
6780TIFFCC=`which $TIFFCC 2>/dev/null`
6781
6782#--------------------------------------------------------------------
6783# Run the configuration of TIFF itself, and do some special checks
6784# to if the configuration agrees with the sources of tiff itself.
6785# F.e. tiff is hardwired to use "stdarg.h". If the chosen compiler
6786# does not support this we have to bail out.
6787#--------------------------------------------------------------------
6788
6789if test `grep STDC_HEADERS confdefs.h | wc -l` -eq 0
6790then
6791    { { echo "$as_me:$LINENO: error: Compiler does not use stdarg.h, required for TIFF" >&5
6792echo "$as_me: error: Compiler does not use stdarg.h, required for TIFF" >&2;}
6793   { (exit 1); exit 1; }; }
6794fi
6795
6796mv -f confdefs.h tifftcl_confdefs.h
6797if test "X$host" = X -o "X$host" = XNONE
6798then
6799    TIFFHOST=""
6800else
6801    TIFFHOST="$host"
6802fi
6803${srcdir}/../compat/libtiff/configure --disable-zlib --disable-pixarlog --disable-jpeg \
6804	"--with-CC=$TIFFCC" $TIFFHOST
6805mv -f tifftcl_confdefs.h confdefs.h
6806
6807#-----------------------------------------------------------------------
6808# Specify the C source files to compile in TEA_ADD_SOURCES,
6809# public headers that need to be installed in TEA_ADD_HEADERS,
6810# stub library C source files to compile in TEA_ADD_STUB_SOURCES,
6811# and runtime Tcl library files in TEA_ADD_TCL_SOURCES.
6812# This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS
6813# and PKG_TCL_SOURCES.
6814#-----------------------------------------------------------------------
6815
6816
6817    vars="tifftcl.c tifftclStubInit.c"
6818    for i in $vars; do
6819	case $i in
6820	    \$*)
6821		# allow $-var names
6822		PKG_SOURCES="$PKG_SOURCES $i"
6823		PKG_OBJECTS="$PKG_OBJECTS $i"
6824		;;
6825	    *)
6826		# check for existence - allows for generic/win/unix VPATH
6827		# To add more dirs here (like 'src'), you have to update VPATH
6828		# in Makefile.in as well
6829		if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
6830		    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
6831		    -a ! -f "${srcdir}/macosx/$i" \
6832		    ; then
6833		    { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
6834echo "$as_me: error: could not find source file '$i'" >&2;}
6835   { (exit 1); exit 1; }; }
6836		fi
6837		PKG_SOURCES="$PKG_SOURCES $i"
6838		# this assumes it is in a VPATH dir
6839		i=`basename $i`
6840		# handle user calling this before or after TEA_SETUP_COMPILER
6841		if test x"${OBJEXT}" != x ; then
6842		    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
6843		else
6844		    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
6845		fi
6846		PKG_OBJECTS="$PKG_OBJECTS $j"
6847		;;
6848	esac
6849    done
6850
6851
6852
6853
6854
6855    vars="
6856	../compat/libtiff/libtiff/tif_aux.c		../compat/libtiff/libtiff/tif_close.c		../compat/libtiff/libtiff/tif_codec.c
6857	../compat/libtiff/libtiff/tif_compress.c	../compat/libtiff/libtiff/tif_dir.c		../compat/libtiff/libtiff/tif_dirinfo.c
6858	../compat/libtiff/libtiff/tif_dirread.c	../compat/libtiff/libtiff/tif_dirwrite.c	../compat/libtiff/libtiff/tif_dumpmode.c
6859	../compat/libtiff/libtiff/tif_error.c		../compat/libtiff/libtiff/tif_fax3.c
6860	../compat/libtiff/libtiff/tif_getimage.c	../compat/libtiff/libtiff/tif_flush.c		../compat/libtiff/libtiff/tif_luv.c
6861	../compat/libtiff/libtiff/tif_lzw.c		../compat/libtiff/libtiff/tif_next.c		../compat/libtiff/libtiff/tif_open.c
6862	../compat/libtiff/libtiff/tif_packbits.c	../compat/libtiff/libtiff/tif_predict.c	../compat/libtiff/libtiff/tif_print.c
6863	../compat/libtiff/libtiff/tif_read.c		../compat/libtiff/libtiff/tif_swab.c		../compat/libtiff/libtiff/tif_strip.c
6864	../compat/libtiff/libtiff/tif_thunder.c	../compat/libtiff/libtiff/tif_tile.c		../compat/libtiff/libtiff/tif_version.c
6865	../compat/libtiff/libtiff/tif_warning.c	../compat/libtiff/libtiff/tif_write.c
6866	../compat/libtiff/libtiff/tif_color.c		../compat/libtiff/libtiff/tif_extension.c
6867"
6868    for i in $vars; do
6869	case $i in
6870	    \$*)
6871		# allow $-var names
6872		PKG_SOURCES="$PKG_SOURCES $i"
6873		PKG_OBJECTS="$PKG_OBJECTS $i"
6874		;;
6875	    *)
6876		# check for existence - allows for generic/win/unix VPATH
6877		# To add more dirs here (like 'src'), you have to update VPATH
6878		# in Makefile.in as well
6879		if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
6880		    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
6881		    -a ! -f "${srcdir}/macosx/$i" \
6882		    ; then
6883		    { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
6884echo "$as_me: error: could not find source file '$i'" >&2;}
6885   { (exit 1); exit 1; }; }
6886		fi
6887		PKG_SOURCES="$PKG_SOURCES $i"
6888		# this assumes it is in a VPATH dir
6889		i=`basename $i`
6890		# handle user calling this before or after TEA_SETUP_COMPILER
6891		if test x"${OBJEXT}" != x ; then
6892		    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
6893		else
6894		    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
6895		fi
6896		PKG_OBJECTS="$PKG_OBJECTS $j"
6897		;;
6898	esac
6899    done
6900
6901
6902
6903
6904
6905    vars="tifftcl.h tifftclDecls.h"
6906    for i in $vars; do
6907	# check for existence, be strict because it is installed
6908	if test ! -f "${srcdir}/$i" ; then
6909	    { { echo "$as_me:$LINENO: error: could not find header file '${srcdir}/$i'" >&5
6910echo "$as_me: error: could not find header file '${srcdir}/$i'" >&2;}
6911   { (exit 1); exit 1; }; }
6912	fi
6913	PKG_HEADERS="$PKG_HEADERS $i"
6914    done
6915
6916
6917
6918    vars="-I\"`\${CYGPATH} \${srcdir}`\""
6919    for i in $vars; do
6920	PKG_INCLUDES="$PKG_INCLUDES $i"
6921    done
6922
6923
6924
6925    vars="-I\"./libtiff\""
6926    for i in $vars; do
6927	PKG_INCLUDES="$PKG_INCLUDES $i"
6928    done
6929
6930
6931
6932    vars="-I\"`\${CYGPATH} \${srcdir}/../compat/libtiff/libtiff`\""
6933    for i in $vars; do
6934	PKG_INCLUDES="$PKG_INCLUDES $i"
6935    done
6936
6937
6938
6939    vars="tifftclStubLib.c"
6940    for i in $vars; do
6941	# check for existence - allows for generic/win/unix VPATH
6942	if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
6943	    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
6944	    -a ! -f "${srcdir}/macosx/$i" \
6945	    ; then
6946	    { { echo "$as_me:$LINENO: error: could not find stub source file '$i'" >&5
6947echo "$as_me: error: could not find stub source file '$i'" >&2;}
6948   { (exit 1); exit 1; }; }
6949	fi
6950	PKG_STUB_SOURCES="$PKG_STUB_SOURCES $i"
6951	# this assumes it is in a VPATH dir
6952	i=`basename $i`
6953	# handle user calling this before or after TEA_SETUP_COMPILER
6954	if test x"${OBJEXT}" != x ; then
6955	    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
6956	else
6957	    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
6958	fi
6959	PKG_STUB_OBJECTS="$PKG_STUB_OBJECTS $j"
6960    done
6961
6962
6963
6964
6965    vars="tifftclStubLib.c"
6966    for i in $vars; do
6967	case $i in
6968	    \$*)
6969		# allow $-var names
6970		PKG_SOURCES="$PKG_SOURCES $i"
6971		PKG_OBJECTS="$PKG_OBJECTS $i"
6972		;;
6973	    *)
6974		# check for existence - allows for generic/win/unix VPATH
6975		# To add more dirs here (like 'src'), you have to update VPATH
6976		# in Makefile.in as well
6977		if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
6978		    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
6979		    -a ! -f "${srcdir}/macosx/$i" \
6980		    ; then
6981		    { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
6982echo "$as_me: error: could not find source file '$i'" >&2;}
6983   { (exit 1); exit 1; }; }
6984		fi
6985		PKG_SOURCES="$PKG_SOURCES $i"
6986		# this assumes it is in a VPATH dir
6987		i=`basename $i`
6988		# handle user calling this before or after TEA_SETUP_COMPILER
6989		if test x"${OBJEXT}" != x ; then
6990		    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
6991		else
6992		    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
6993		fi
6994		PKG_OBJECTS="$PKG_OBJECTS $j"
6995		;;
6996	esac
6997    done
6998
6999
7000
7001
7002    vars=""
7003    for i in $vars; do
7004	# check for existence, be strict because it is installed
7005	if test ! -f "${srcdir}/$i" ; then
7006	    { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
7007echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
7008   { (exit 1); exit 1; }; }
7009	fi
7010	PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
7011    done
7012
7013
7014
7015#--------------------------------------------------------------------
7016# __CHANGE__
7017# Choose which headers you need.  Extension authors should try very
7018# hard to only rely on the Tcl public header files.  Internal headers
7019# contain private data structures and are subject to change without
7020# notice.
7021# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
7022#--------------------------------------------------------------------
7023
7024
7025    { echo "$as_me:$LINENO: checking for Tcl public headers" >&5
7026echo $ECHO_N "checking for Tcl public headers... $ECHO_C" >&6; }
7027
7028
7029# Check whether --with-tclinclude was given.
7030if test "${with_tclinclude+set}" = set; then
7031  withval=$with_tclinclude; with_tclinclude=${withval}
7032fi
7033
7034
7035    if test "${ac_cv_c_tclh+set}" = set; then
7036  echo $ECHO_N "(cached) $ECHO_C" >&6
7037else
7038
7039	# Use the value from --with-tclinclude, if it was given
7040
7041	if test x"${with_tclinclude}" != x ; then
7042	    if test -f "${with_tclinclude}/tcl.h" ; then
7043		ac_cv_c_tclh=${with_tclinclude}
7044	    else
7045		{ { echo "$as_me:$LINENO: error: ${with_tclinclude} directory does not contain tcl.h" >&5
7046echo "$as_me: error: ${with_tclinclude} directory does not contain tcl.h" >&2;}
7047   { (exit 1); exit 1; }; }
7048	    fi
7049	else
7050	    list=""
7051	    if test "`uname -s`" = "Darwin"; then
7052		# If Tcl was built as a framework, attempt to use
7053		# the framework's Headers directory
7054		case ${TCL_DEFS} in
7055		    *TCL_FRAMEWORK*)
7056			list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
7057			;;
7058		esac
7059	    fi
7060
7061	    # Look in the source dir only if Tcl is not installed,
7062	    # and in that situation, look there before installed locations.
7063	    if test -f "${TCL_BIN_DIR}/Makefile" ; then
7064		list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
7065	    fi
7066
7067	    # Check order: pkg --prefix location, Tcl's --prefix location,
7068	    # relative to directory of tclConfig.sh.
7069
7070	    eval "temp_includedir=${includedir}"
7071	    list="$list \
7072		`ls -d ${temp_includedir}        2>/dev/null` \
7073		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
7074		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
7075	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
7076		list="$list /usr/local/include /usr/include"
7077		if test x"${TCL_INCLUDE_SPEC}" != x ; then
7078		    d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
7079		    list="$list `ls -d ${d} 2>/dev/null`"
7080		fi
7081	    fi
7082	    for i in $list ; do
7083		if test -f "$i/tcl.h" ; then
7084		    ac_cv_c_tclh=$i
7085		    break
7086		fi
7087	    done
7088	fi
7089
7090fi
7091
7092
7093    # Print a message based on how we determined the include path
7094
7095    if test x"${ac_cv_c_tclh}" = x ; then
7096	{ { echo "$as_me:$LINENO: error: tcl.h not found.  Please specify its location with --with-tclinclude" >&5
7097echo "$as_me: error: tcl.h not found.  Please specify its location with --with-tclinclude" >&2;}
7098   { (exit 1); exit 1; }; }
7099    else
7100	{ echo "$as_me:$LINENO: result: ${ac_cv_c_tclh}" >&5
7101echo "${ECHO_T}${ac_cv_c_tclh}" >&6; }
7102    fi
7103
7104    # Convert to a native path and substitute into the output files.
7105
7106    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
7107
7108    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
7109
7110
7111
7112
7113#--------------------------------------------------------------------
7114# A few miscellaneous platform-specific items:
7115#
7116# Windows creates a few extra files that need to be cleaned up.
7117# We can add more files to clean if our extension creates any extra
7118# files in the future.
7119#
7120# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
7121# These will be appended to the current set of compiler flags for
7122# your system.
7123#--------------------------------------------------------------------
7124
7125if test "${TEA_PLATFORM}" = "windows" ; then
7126    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch"
7127
7128    vars="../compat/libtiff/libtiff/tif_win32.c"
7129    for i in $vars; do
7130	case $i in
7131	    \$*)
7132		# allow $-var names
7133		PKG_SOURCES="$PKG_SOURCES $i"
7134		PKG_OBJECTS="$PKG_OBJECTS $i"
7135		;;
7136	    *)
7137		# check for existence - allows for generic/win/unix VPATH
7138		# To add more dirs here (like 'src'), you have to update VPATH
7139		# in Makefile.in as well
7140		if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
7141		    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
7142		    -a ! -f "${srcdir}/macosx/$i" \
7143		    ; then
7144		    { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
7145echo "$as_me: error: could not find source file '$i'" >&2;}
7146   { (exit 1); exit 1; }; }
7147		fi
7148		PKG_SOURCES="$PKG_SOURCES $i"
7149		# this assumes it is in a VPATH dir
7150		i=`basename $i`
7151		# handle user calling this before or after TEA_SETUP_COMPILER
7152		if test x"${OBJEXT}" != x ; then
7153		    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
7154		else
7155		    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
7156		fi
7157		PKG_OBJECTS="$PKG_OBJECTS $j"
7158		;;
7159	esac
7160    done
7161
7162
7163
7164else
7165    CLEANFILES=""
7166
7167    vars="../compat/libtiff/libtiff/tif_unix.c"
7168    for i in $vars; do
7169	case $i in
7170	    \$*)
7171		# allow $-var names
7172		PKG_SOURCES="$PKG_SOURCES $i"
7173		PKG_OBJECTS="$PKG_OBJECTS $i"
7174		;;
7175	    *)
7176		# check for existence - allows for generic/win/unix VPATH
7177		# To add more dirs here (like 'src'), you have to update VPATH
7178		# in Makefile.in as well
7179		if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
7180		    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
7181		    -a ! -f "${srcdir}/macosx/$i" \
7182		    ; then
7183		    { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
7184echo "$as_me: error: could not find source file '$i'" >&2;}
7185   { (exit 1); exit 1; }; }
7186		fi
7187		PKG_SOURCES="$PKG_SOURCES $i"
7188		# this assumes it is in a VPATH dir
7189		i=`basename $i`
7190		# handle user calling this before or after TEA_SETUP_COMPILER
7191		if test x"${OBJEXT}" != x ; then
7192		    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
7193		else
7194		    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
7195		fi
7196		PKG_OBJECTS="$PKG_OBJECTS $j"
7197		;;
7198	esac
7199    done
7200
7201
7202
7203fi
7204
7205
7206#--------------------------------------------------------------------
7207# Check whether --enable-threads or --disable-threads was given.
7208# So far only Tcl responds to this one.
7209#--------------------------------------------------------------------
7210
7211
7212    # Check whether --enable-threads was given.
7213if test "${enable_threads+set}" = set; then
7214  enableval=$enable_threads; tcl_ok=$enableval
7215else
7216  tcl_ok=yes
7217fi
7218
7219
7220    if test "${enable_threads+set}" = set; then
7221	enableval="$enable_threads"
7222	tcl_ok=$enableval
7223    else
7224	tcl_ok=yes
7225    fi
7226
7227    if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
7228	TCL_THREADS=1
7229
7230	if test "${TEA_PLATFORM}" != "windows" ; then
7231	    # We are always OK on Windows, so check what this platform wants:
7232
7233	    # USE_THREAD_ALLOC tells us to try the special thread-based
7234	    # allocator that significantly reduces lock contention
7235
7236cat >>confdefs.h <<\_ACEOF
7237#define USE_THREAD_ALLOC 1
7238_ACEOF
7239
7240
7241cat >>confdefs.h <<\_ACEOF
7242#define _REENTRANT 1
7243_ACEOF
7244
7245	    if test "`uname -s`" = "SunOS" ; then
7246
7247cat >>confdefs.h <<\_ACEOF
7248#define _POSIX_PTHREAD_SEMANTICS 1
7249_ACEOF
7250
7251	    fi
7252
7253cat >>confdefs.h <<\_ACEOF
7254#define _THREAD_SAFE 1
7255_ACEOF
7256
7257	    { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5
7258echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6; }
7259if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then
7260  echo $ECHO_N "(cached) $ECHO_C" >&6
7261else
7262  ac_check_lib_save_LIBS=$LIBS
7263LIBS="-lpthread  $LIBS"
7264cat >conftest.$ac_ext <<_ACEOF
7265/* confdefs.h.  */
7266_ACEOF
7267cat confdefs.h >>conftest.$ac_ext
7268cat >>conftest.$ac_ext <<_ACEOF
7269/* end confdefs.h.  */
7270
7271/* Override any GCC internal prototype to avoid an error.
7272   Use char because int might match the return type of a GCC
7273   builtin and then its argument prototype would still apply.  */
7274#ifdef __cplusplus
7275extern "C"
7276#endif
7277char pthread_mutex_init ();
7278int
7279main ()
7280{
7281return pthread_mutex_init ();
7282  ;
7283  return 0;
7284}
7285_ACEOF
7286rm -f conftest.$ac_objext conftest$ac_exeext
7287if { (ac_try="$ac_link"
7288case "(($ac_try" in
7289  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7290  *) ac_try_echo=$ac_try;;
7291esac
7292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7293  (eval "$ac_link") 2>conftest.er1
7294  ac_status=$?
7295  grep -v '^ *+' conftest.er1 >conftest.err
7296  rm -f conftest.er1
7297  cat conftest.err >&5
7298  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7299  (exit $ac_status); } && {
7300	 test -z "$ac_c_werror_flag" ||
7301	 test ! -s conftest.err
7302       } && test -s conftest$ac_exeext &&
7303       $as_test_x conftest$ac_exeext; then
7304  ac_cv_lib_pthread_pthread_mutex_init=yes
7305else
7306  echo "$as_me: failed program was:" >&5
7307sed 's/^/| /' conftest.$ac_ext >&5
7308
7309	ac_cv_lib_pthread_pthread_mutex_init=no
7310fi
7311
7312rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7313      conftest$ac_exeext conftest.$ac_ext
7314LIBS=$ac_check_lib_save_LIBS
7315fi
7316{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5
7317echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6; }
7318if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then
7319  tcl_ok=yes
7320else
7321  tcl_ok=no
7322fi
7323
7324	    if test "$tcl_ok" = "no"; then
7325		# Check a little harder for __pthread_mutex_init in the same
7326		# library, as some systems hide it there until pthread.h is
7327		# defined.  We could alternatively do an AC_TRY_COMPILE with
7328		# pthread.h, but that will work with libpthread really doesn't
7329		# exist, like AIX 4.2.  [Bug: 4359]
7330		{ echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5
7331echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6; }
7332if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then
7333  echo $ECHO_N "(cached) $ECHO_C" >&6
7334else
7335  ac_check_lib_save_LIBS=$LIBS
7336LIBS="-lpthread  $LIBS"
7337cat >conftest.$ac_ext <<_ACEOF
7338/* confdefs.h.  */
7339_ACEOF
7340cat confdefs.h >>conftest.$ac_ext
7341cat >>conftest.$ac_ext <<_ACEOF
7342/* end confdefs.h.  */
7343
7344/* Override any GCC internal prototype to avoid an error.
7345   Use char because int might match the return type of a GCC
7346   builtin and then its argument prototype would still apply.  */
7347#ifdef __cplusplus
7348extern "C"
7349#endif
7350char __pthread_mutex_init ();
7351int
7352main ()
7353{
7354return __pthread_mutex_init ();
7355  ;
7356  return 0;
7357}
7358_ACEOF
7359rm -f conftest.$ac_objext conftest$ac_exeext
7360if { (ac_try="$ac_link"
7361case "(($ac_try" in
7362  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7363  *) ac_try_echo=$ac_try;;
7364esac
7365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7366  (eval "$ac_link") 2>conftest.er1
7367  ac_status=$?
7368  grep -v '^ *+' conftest.er1 >conftest.err
7369  rm -f conftest.er1
7370  cat conftest.err >&5
7371  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7372  (exit $ac_status); } && {
7373	 test -z "$ac_c_werror_flag" ||
7374	 test ! -s conftest.err
7375       } && test -s conftest$ac_exeext &&
7376       $as_test_x conftest$ac_exeext; then
7377  ac_cv_lib_pthread___pthread_mutex_init=yes
7378else
7379  echo "$as_me: failed program was:" >&5
7380sed 's/^/| /' conftest.$ac_ext >&5
7381
7382	ac_cv_lib_pthread___pthread_mutex_init=no
7383fi
7384
7385rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7386      conftest$ac_exeext conftest.$ac_ext
7387LIBS=$ac_check_lib_save_LIBS
7388fi
7389{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5
7390echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6; }
7391if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then
7392  tcl_ok=yes
7393else
7394  tcl_ok=no
7395fi
7396
7397	    fi
7398
7399	    if test "$tcl_ok" = "yes"; then
7400		# The space is needed
7401		THREADS_LIBS=" -lpthread"
7402	    else
7403		{ echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5
7404echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6; }
7405if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then
7406  echo $ECHO_N "(cached) $ECHO_C" >&6
7407else
7408  ac_check_lib_save_LIBS=$LIBS
7409LIBS="-lpthreads  $LIBS"
7410cat >conftest.$ac_ext <<_ACEOF
7411/* confdefs.h.  */
7412_ACEOF
7413cat confdefs.h >>conftest.$ac_ext
7414cat >>conftest.$ac_ext <<_ACEOF
7415/* end confdefs.h.  */
7416
7417/* Override any GCC internal prototype to avoid an error.
7418   Use char because int might match the return type of a GCC
7419   builtin and then its argument prototype would still apply.  */
7420#ifdef __cplusplus
7421extern "C"
7422#endif
7423char pthread_mutex_init ();
7424int
7425main ()
7426{
7427return pthread_mutex_init ();
7428  ;
7429  return 0;
7430}
7431_ACEOF
7432rm -f conftest.$ac_objext conftest$ac_exeext
7433if { (ac_try="$ac_link"
7434case "(($ac_try" in
7435  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7436  *) ac_try_echo=$ac_try;;
7437esac
7438eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7439  (eval "$ac_link") 2>conftest.er1
7440  ac_status=$?
7441  grep -v '^ *+' conftest.er1 >conftest.err
7442  rm -f conftest.er1
7443  cat conftest.err >&5
7444  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7445  (exit $ac_status); } && {
7446	 test -z "$ac_c_werror_flag" ||
7447	 test ! -s conftest.err
7448       } && test -s conftest$ac_exeext &&
7449       $as_test_x conftest$ac_exeext; then
7450  ac_cv_lib_pthreads_pthread_mutex_init=yes
7451else
7452  echo "$as_me: failed program was:" >&5
7453sed 's/^/| /' conftest.$ac_ext >&5
7454
7455	ac_cv_lib_pthreads_pthread_mutex_init=no
7456fi
7457
7458rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7459      conftest$ac_exeext conftest.$ac_ext
7460LIBS=$ac_check_lib_save_LIBS
7461fi
7462{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5
7463echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6; }
7464if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then
7465  tcl_ok=yes
7466else
7467  tcl_ok=no
7468fi
7469
7470		if test "$tcl_ok" = "yes"; then
7471		    # The space is needed
7472		    THREADS_LIBS=" -lpthreads"
7473		else
7474		    { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5
7475echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6; }
7476if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then
7477  echo $ECHO_N "(cached) $ECHO_C" >&6
7478else
7479  ac_check_lib_save_LIBS=$LIBS
7480LIBS="-lc  $LIBS"
7481cat >conftest.$ac_ext <<_ACEOF
7482/* confdefs.h.  */
7483_ACEOF
7484cat confdefs.h >>conftest.$ac_ext
7485cat >>conftest.$ac_ext <<_ACEOF
7486/* end confdefs.h.  */
7487
7488/* Override any GCC internal prototype to avoid an error.
7489   Use char because int might match the return type of a GCC
7490   builtin and then its argument prototype would still apply.  */
7491#ifdef __cplusplus
7492extern "C"
7493#endif
7494char pthread_mutex_init ();
7495int
7496main ()
7497{
7498return pthread_mutex_init ();
7499  ;
7500  return 0;
7501}
7502_ACEOF
7503rm -f conftest.$ac_objext conftest$ac_exeext
7504if { (ac_try="$ac_link"
7505case "(($ac_try" in
7506  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7507  *) ac_try_echo=$ac_try;;
7508esac
7509eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7510  (eval "$ac_link") 2>conftest.er1
7511  ac_status=$?
7512  grep -v '^ *+' conftest.er1 >conftest.err
7513  rm -f conftest.er1
7514  cat conftest.err >&5
7515  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7516  (exit $ac_status); } && {
7517	 test -z "$ac_c_werror_flag" ||
7518	 test ! -s conftest.err
7519       } && test -s conftest$ac_exeext &&
7520       $as_test_x conftest$ac_exeext; then
7521  ac_cv_lib_c_pthread_mutex_init=yes
7522else
7523  echo "$as_me: failed program was:" >&5
7524sed 's/^/| /' conftest.$ac_ext >&5
7525
7526	ac_cv_lib_c_pthread_mutex_init=no
7527fi
7528
7529rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7530      conftest$ac_exeext conftest.$ac_ext
7531LIBS=$ac_check_lib_save_LIBS
7532fi
7533{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5
7534echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6; }
7535if test $ac_cv_lib_c_pthread_mutex_init = yes; then
7536  tcl_ok=yes
7537else
7538  tcl_ok=no
7539fi
7540
7541		    if test "$tcl_ok" = "no"; then
7542			{ echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5
7543echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6; }
7544if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then
7545  echo $ECHO_N "(cached) $ECHO_C" >&6
7546else
7547  ac_check_lib_save_LIBS=$LIBS
7548LIBS="-lc_r  $LIBS"
7549cat >conftest.$ac_ext <<_ACEOF
7550/* confdefs.h.  */
7551_ACEOF
7552cat confdefs.h >>conftest.$ac_ext
7553cat >>conftest.$ac_ext <<_ACEOF
7554/* end confdefs.h.  */
7555
7556/* Override any GCC internal prototype to avoid an error.
7557   Use char because int might match the return type of a GCC
7558   builtin and then its argument prototype would still apply.  */
7559#ifdef __cplusplus
7560extern "C"
7561#endif
7562char pthread_mutex_init ();
7563int
7564main ()
7565{
7566return pthread_mutex_init ();
7567  ;
7568  return 0;
7569}
7570_ACEOF
7571rm -f conftest.$ac_objext conftest$ac_exeext
7572if { (ac_try="$ac_link"
7573case "(($ac_try" in
7574  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7575  *) ac_try_echo=$ac_try;;
7576esac
7577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7578  (eval "$ac_link") 2>conftest.er1
7579  ac_status=$?
7580  grep -v '^ *+' conftest.er1 >conftest.err
7581  rm -f conftest.er1
7582  cat conftest.err >&5
7583  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7584  (exit $ac_status); } && {
7585	 test -z "$ac_c_werror_flag" ||
7586	 test ! -s conftest.err
7587       } && test -s conftest$ac_exeext &&
7588       $as_test_x conftest$ac_exeext; then
7589  ac_cv_lib_c_r_pthread_mutex_init=yes
7590else
7591  echo "$as_me: failed program was:" >&5
7592sed 's/^/| /' conftest.$ac_ext >&5
7593
7594	ac_cv_lib_c_r_pthread_mutex_init=no
7595fi
7596
7597rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7598      conftest$ac_exeext conftest.$ac_ext
7599LIBS=$ac_check_lib_save_LIBS
7600fi
7601{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5
7602echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6; }
7603if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then
7604  tcl_ok=yes
7605else
7606  tcl_ok=no
7607fi
7608
7609			if test "$tcl_ok" = "yes"; then
7610			    # The space is needed
7611			    THREADS_LIBS=" -pthread"
7612			else
7613			    TCL_THREADS=0
7614			    { echo "$as_me:$LINENO: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&5
7615echo "$as_me: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&2;}
7616			fi
7617		    fi
7618		fi
7619	    fi
7620	fi
7621    else
7622	TCL_THREADS=0
7623    fi
7624    # Do checking message here to not mess up interleaved configure output
7625    { echo "$as_me:$LINENO: checking for building with threads" >&5
7626echo $ECHO_N "checking for building with threads... $ECHO_C" >&6; }
7627    if test "${TCL_THREADS}" = 1; then
7628
7629cat >>confdefs.h <<\_ACEOF
7630#define TCL_THREADS 1
7631_ACEOF
7632
7633	{ echo "$as_me:$LINENO: result: yes (default)" >&5
7634echo "${ECHO_T}yes (default)" >&6; }
7635    else
7636	{ echo "$as_me:$LINENO: result: no" >&5
7637echo "${ECHO_T}no" >&6; }
7638    fi
7639    # TCL_THREADS sanity checking.  See if our request for building with
7640    # threads is the same as the way Tcl was built.  If not, warn the user.
7641    case ${TCL_DEFS} in
7642	*THREADS=1*)
7643	    if test "${TCL_THREADS}" = "0"; then
7644		{ echo "$as_me:$LINENO: WARNING:
7645    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
7646    that IS thread-enabled.  It is recommended to use --enable-threads." >&5
7647echo "$as_me: WARNING:
7648    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
7649    that IS thread-enabled.  It is recommended to use --enable-threads." >&2;}
7650	    fi
7651	    ;;
7652	*)
7653	    if test "${TCL_THREADS}" = "1"; then
7654		{ echo "$as_me:$LINENO: WARNING:
7655    --enable-threads requested, but building against a Tcl that is NOT
7656    thread-enabled.  This is an OK configuration that will also run in
7657    a thread-enabled core." >&5
7658echo "$as_me: WARNING:
7659    --enable-threads requested, but building against a Tcl that is NOT
7660    thread-enabled.  This is an OK configuration that will also run in
7661    a thread-enabled core." >&2;}
7662	    fi
7663	    ;;
7664    esac
7665
7666
7667
7668#--------------------------------------------------------------------
7669# The statement below defines a collection of symbols related to
7670# building as a shared library instead of a static library.
7671#--------------------------------------------------------------------
7672
7673
7674    { echo "$as_me:$LINENO: checking how to build libraries" >&5
7675echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6; }
7676    # Check whether --enable-shared was given.
7677if test "${enable_shared+set}" = set; then
7678  enableval=$enable_shared; tcl_ok=$enableval
7679else
7680  tcl_ok=yes
7681fi
7682
7683
7684    if test "${enable_shared+set}" = set; then
7685	enableval="$enable_shared"
7686	tcl_ok=$enableval
7687    else
7688	tcl_ok=yes
7689    fi
7690
7691    if test "$tcl_ok" = "yes" ; then
7692	{ echo "$as_me:$LINENO: result: shared" >&5
7693echo "${ECHO_T}shared" >&6; }
7694	SHARED_BUILD=1
7695    else
7696	{ echo "$as_me:$LINENO: result: static" >&5
7697echo "${ECHO_T}static" >&6; }
7698	SHARED_BUILD=0
7699
7700cat >>confdefs.h <<\_ACEOF
7701#define STATIC_BUILD 1
7702_ACEOF
7703
7704    fi
7705
7706
7707
7708#--------------------------------------------------------------------
7709# This macro figures out what flags to use with the compiler/linker
7710# when building shared/static debug/optimized objects.  This information
7711# can be taken from the tclConfig.sh file, but this figures it all out.
7712#--------------------------------------------------------------------
7713
7714
7715
7716
7717    # Step 0.a: Enable 64 bit support?
7718
7719    { echo "$as_me:$LINENO: checking if 64bit support is requested" >&5
7720echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6; }
7721    # Check whether --enable-64bit was given.
7722if test "${enable_64bit+set}" = set; then
7723  enableval=$enable_64bit; do64bit=$enableval
7724else
7725  do64bit=no
7726fi
7727
7728    { echo "$as_me:$LINENO: result: $do64bit" >&5
7729echo "${ECHO_T}$do64bit" >&6; }
7730
7731    # Step 0.b: Enable Solaris 64 bit VIS support?
7732
7733    { echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5
7734echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6; }
7735    # Check whether --enable-64bit-vis was given.
7736if test "${enable_64bit_vis+set}" = set; then
7737  enableval=$enable_64bit_vis; do64bitVIS=$enableval
7738else
7739  do64bitVIS=no
7740fi
7741
7742    { echo "$as_me:$LINENO: result: $do64bitVIS" >&5
7743echo "${ECHO_T}$do64bitVIS" >&6; }
7744    # Force 64bit on with VIS
7745    if test "$do64bitVIS" = "yes"; then
7746  do64bit=yes
7747fi
7748
7749
7750    # Step 0.c: Check if visibility support is available. Do this here so
7751    # that platform specific alternatives can be used below if this fails.
7752
7753    { echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5
7754echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6; }
7755if test "${tcl_cv_cc_visibility_hidden+set}" = set; then
7756  echo $ECHO_N "(cached) $ECHO_C" >&6
7757else
7758
7759	hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
7760	cat >conftest.$ac_ext <<_ACEOF
7761/* confdefs.h.  */
7762_ACEOF
7763cat confdefs.h >>conftest.$ac_ext
7764cat >>conftest.$ac_ext <<_ACEOF
7765/* end confdefs.h.  */
7766
7767	    extern __attribute__((__visibility__("hidden"))) void f(void);
7768	    void f(void) {}
7769int
7770main ()
7771{
7772f();
7773  ;
7774  return 0;
7775}
7776_ACEOF
7777rm -f conftest.$ac_objext conftest$ac_exeext
7778if { (ac_try="$ac_link"
7779case "(($ac_try" in
7780  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7781  *) ac_try_echo=$ac_try;;
7782esac
7783eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7784  (eval "$ac_link") 2>conftest.er1
7785  ac_status=$?
7786  grep -v '^ *+' conftest.er1 >conftest.err
7787  rm -f conftest.er1
7788  cat conftest.err >&5
7789  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7790  (exit $ac_status); } && {
7791	 test -z "$ac_c_werror_flag" ||
7792	 test ! -s conftest.err
7793       } && test -s conftest$ac_exeext &&
7794       $as_test_x conftest$ac_exeext; then
7795  tcl_cv_cc_visibility_hidden=yes
7796else
7797  echo "$as_me: failed program was:" >&5
7798sed 's/^/| /' conftest.$ac_ext >&5
7799
7800	tcl_cv_cc_visibility_hidden=no
7801fi
7802
7803rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7804      conftest$ac_exeext conftest.$ac_ext
7805	CFLAGS=$hold_cflags
7806fi
7807{ echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5
7808echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6; }
7809    if test $tcl_cv_cc_visibility_hidden = yes; then
7810
7811
7812cat >>confdefs.h <<\_ACEOF
7813#define MODULE_SCOPE extern __attribute__((__visibility__("hidden")))
7814_ACEOF
7815
7816
7817fi
7818
7819
7820    # Step 0.d: Disable -rpath support?
7821
7822    { echo "$as_me:$LINENO: checking if rpath support is requested" >&5
7823echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6; }
7824    # Check whether --enable-rpath was given.
7825if test "${enable_rpath+set}" = set; then
7826  enableval=$enable_rpath; doRpath=$enableval
7827else
7828  doRpath=yes
7829fi
7830
7831    { echo "$as_me:$LINENO: result: $doRpath" >&5
7832echo "${ECHO_T}$doRpath" >&6; }
7833
7834    # TEA specific: Cross-compiling options for Windows/CE builds?
7835
7836    if test "${TEA_PLATFORM}" = windows; then
7837
7838	{ echo "$as_me:$LINENO: checking if Windows/CE build is requested" >&5
7839echo $ECHO_N "checking if Windows/CE build is requested... $ECHO_C" >&6; }
7840	# Check whether --enable-wince was given.
7841if test "${enable_wince+set}" = set; then
7842  enableval=$enable_wince; doWince=$enableval
7843else
7844  doWince=no
7845fi
7846
7847	{ echo "$as_me:$LINENO: result: $doWince" >&5
7848echo "${ECHO_T}$doWince" >&6; }
7849
7850fi
7851
7852
7853    # Set the variable "system" to hold the name and version number
7854    # for the system.
7855
7856
7857    { echo "$as_me:$LINENO: checking system version" >&5
7858echo $ECHO_N "checking system version... $ECHO_C" >&6; }
7859if test "${tcl_cv_sys_version+set}" = set; then
7860  echo $ECHO_N "(cached) $ECHO_C" >&6
7861else
7862
7863	# TEA specific:
7864	if test "${TEA_PLATFORM}" = "windows" ; then
7865	    tcl_cv_sys_version=windows
7866	else
7867	    tcl_cv_sys_version=`uname -s`-`uname -r`
7868	    if test "$?" -ne 0 ; then
7869		{ echo "$as_me:$LINENO: WARNING: can't find uname command" >&5
7870echo "$as_me: WARNING: can't find uname command" >&2;}
7871		tcl_cv_sys_version=unknown
7872	    else
7873		if test "`uname -s`" = "AIX" ; then
7874		    tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
7875		fi
7876	    fi
7877	fi
7878
7879fi
7880{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5
7881echo "${ECHO_T}$tcl_cv_sys_version" >&6; }
7882    system=$tcl_cv_sys_version
7883
7884
7885    # Require ranlib early so we can override it in special cases below.
7886
7887
7888
7889    # Set configuration options based on system name and version.
7890    # This is similar to Tcl's unix/tcl.m4 except that we've added a
7891    # "windows" case and removed some core-only vars.
7892
7893    do64bit_ok=no
7894    # default to '{$LIBS}' and set to "" on per-platform necessary basis
7895    SHLIB_LD_LIBS='${LIBS}'
7896    # When ld needs options to work in 64-bit mode, put them in
7897    # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
7898    # is disabled by the user. [Bug 1016796]
7899    LDFLAGS_ARCH=""
7900    UNSHARED_LIB_SUFFIX=""
7901    # TEA specific: use PACKAGE_VERSION instead of VERSION
7902    TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
7903    ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
7904    TCL_LIB_VERSIONS_OK=ok
7905    CFLAGS_DEBUG=-g
7906    CFLAGS_OPTIMIZE=-O
7907    if test "$GCC" = yes; then
7908
7909	# TEA specific:
7910	CFLAGS_OPTIMIZE=-O2
7911	CFLAGS_WARNING="-Wall"
7912
7913else
7914  CFLAGS_WARNING=""
7915fi
7916
7917    # Extract the first word of "ar", so it can be a program name with args.
7918set dummy ar; ac_word=$2
7919{ echo "$as_me:$LINENO: checking for $ac_word" >&5
7920echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7921if test "${ac_cv_prog_AR+set}" = set; then
7922  echo $ECHO_N "(cached) $ECHO_C" >&6
7923else
7924  if test -n "$AR"; then
7925  ac_cv_prog_AR="$AR" # Let the user override the test.
7926else
7927as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7928for as_dir in $PATH
7929do
7930  IFS=$as_save_IFS
7931  test -z "$as_dir" && as_dir=.
7932  for ac_exec_ext in '' $ac_executable_extensions; do
7933  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7934    ac_cv_prog_AR="ar"
7935    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7936    break 2
7937  fi
7938done
7939done
7940IFS=$as_save_IFS
7941
7942fi
7943fi
7944AR=$ac_cv_prog_AR
7945if test -n "$AR"; then
7946  { echo "$as_me:$LINENO: result: $AR" >&5
7947echo "${ECHO_T}$AR" >&6; }
7948else
7949  { echo "$as_me:$LINENO: result: no" >&5
7950echo "${ECHO_T}no" >&6; }
7951fi
7952
7953
7954    STLIB_LD='${AR} cr'
7955    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
7956    if test "x$SHLIB_VERSION" = x; then
7957  SHLIB_VERSION="1.0"
7958fi
7959
7960    case $system in
7961	# TEA specific:
7962	windows)
7963	    # This is a 2-stage check to make sure we have the 64-bit SDK
7964	    # We have to know where the SDK is installed.
7965	    # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
7966	    # MACHINE is IX86 for LINK, but this is used by the manifest,
7967	    # which requires x86|amd64|ia64.
7968	    MACHINE="X86"
7969	    if test "$do64bit" != "no" ; then
7970		if test "x${MSSDK}x" = "xx" ; then
7971		    MSSDK="C:/Progra~1/Microsoft Platform SDK"
7972		fi
7973		MSSDK=`echo "$MSSDK" | sed -e  's!\\\!/!g'`
7974		PATH64=""
7975		case "$do64bit" in
7976		    amd64|x64|yes)
7977			MACHINE="AMD64" ; # default to AMD64 64-bit build
7978			PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
7979			;;
7980		    ia64)
7981			MACHINE="IA64"
7982			PATH64="${MSSDK}/Bin/Win64"
7983			;;
7984		esac
7985		if test ! -d "${PATH64}" ; then
7986		    { echo "$as_me:$LINENO: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&5
7987echo "$as_me: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&2;}
7988		    { echo "$as_me:$LINENO: WARNING: Ensure latest Platform SDK is installed" >&5
7989echo "$as_me: WARNING: Ensure latest Platform SDK is installed" >&2;}
7990		    do64bit="no"
7991		else
7992		    { echo "$as_me:$LINENO: result:    Using 64-bit $MACHINE mode" >&5
7993echo "${ECHO_T}   Using 64-bit $MACHINE mode" >&6; }
7994		    do64bit_ok="yes"
7995		fi
7996	    fi
7997
7998	    if test "$doWince" != "no" ; then
7999		if test "$do64bit" != "no" ; then
8000		    { { echo "$as_me:$LINENO: error: Windows/CE and 64-bit builds incompatible" >&5
8001echo "$as_me: error: Windows/CE and 64-bit builds incompatible" >&2;}
8002   { (exit 1); exit 1; }; }
8003		fi
8004		if test "$GCC" = "yes" ; then
8005		    { { echo "$as_me:$LINENO: error: Windows/CE and GCC builds incompatible" >&5
8006echo "$as_me: error: Windows/CE and GCC builds incompatible" >&2;}
8007   { (exit 1); exit 1; }; }
8008		fi
8009
8010    # First, look for one uninstalled.
8011    # the alternative search directory is invoked by --with-celib
8012
8013    if test x"${no_celib}" = x ; then
8014	# we reset no_celib in case something fails here
8015	no_celib=true
8016
8017# Check whether --with-celib was given.
8018if test "${with_celib+set}" = set; then
8019  withval=$with_celib; with_celibconfig=${withval}
8020fi
8021
8022	{ echo "$as_me:$LINENO: checking for Windows/CE celib directory" >&5
8023echo $ECHO_N "checking for Windows/CE celib directory... $ECHO_C" >&6; }
8024	if test "${ac_cv_c_celibconfig+set}" = set; then
8025  echo $ECHO_N "(cached) $ECHO_C" >&6
8026else
8027
8028	    # First check to see if --with-celibconfig was specified.
8029	    if test x"${with_celibconfig}" != x ; then
8030		if test -d "${with_celibconfig}/inc" ; then
8031		    ac_cv_c_celibconfig=`(cd ${with_celibconfig}; pwd)`
8032		else
8033		    { { echo "$as_me:$LINENO: error: ${with_celibconfig} directory doesn't contain inc directory" >&5
8034echo "$as_me: error: ${with_celibconfig} directory doesn't contain inc directory" >&2;}
8035   { (exit 1); exit 1; }; }
8036		fi
8037	    fi
8038
8039	    # then check for a celib library
8040	    if test x"${ac_cv_c_celibconfig}" = x ; then
8041		for i in \
8042			../celib-palm-3.0 \
8043			../celib \
8044			../../celib-palm-3.0 \
8045			../../celib \
8046			`ls -dr ../celib-*3.[0-9]* 2>/dev/null` \
8047			${srcdir}/../celib-palm-3.0 \
8048			${srcdir}/../celib \
8049			`ls -dr ${srcdir}/../celib-*3.[0-9]* 2>/dev/null` \
8050			; do
8051		    if test -d "$i/inc" ; then
8052			ac_cv_c_celibconfig=`(cd $i; pwd)`
8053			break
8054		    fi
8055		done
8056	    fi
8057
8058fi
8059
8060	if test x"${ac_cv_c_celibconfig}" = x ; then
8061	    { { echo "$as_me:$LINENO: error: Cannot find celib support library directory" >&5
8062echo "$as_me: error: Cannot find celib support library directory" >&2;}
8063   { (exit 1); exit 1; }; }
8064	else
8065	    no_celib=
8066	    CELIB_DIR=${ac_cv_c_celibconfig}
8067	    CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
8068	    { echo "$as_me:$LINENO: result: found $CELIB_DIR" >&5
8069echo "${ECHO_T}found $CELIB_DIR" >&6; }
8070	fi
8071    fi
8072
8073		# Set defaults for common evc4/PPC2003 setup
8074		# Currently Tcl requires 300+, possibly 420+ for sockets
8075		CEVERSION=420; 		# could be 211 300 301 400 420 ...
8076		TARGETCPU=ARMV4;	# could be ARMV4 ARM MIPS SH3 X86 ...
8077		ARCH=ARM;		# could be ARM MIPS X86EM ...
8078		PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002"
8079		if test "$doWince" != "yes"; then
8080		    # If !yes then the user specified something
8081		    # Reset ARCH to allow user to skip specifying it
8082		    ARCH=
8083		    eval `echo $doWince | awk -F, '{ \
8084	    if (length($1)) { printf "CEVERSION=\"%s\"\n", $1; \
8085	    if ($1 < 400)   { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \
8086	    if (length($2)) { printf "TARGETCPU=\"%s\"\n", toupper($2) }; \
8087	    if (length($3)) { printf "ARCH=\"%s\"\n", toupper($3) }; \
8088	    if (length($4)) { printf "PLATFORM=\"%s\"\n", $4 }; \
8089		    }'`
8090		    if test "x${ARCH}" = "x" ; then
8091			ARCH=$TARGETCPU;
8092		    fi
8093		fi
8094		OSVERSION=WCE$CEVERSION;
8095	    	if test "x${WCEROOT}" = "x" ; then
8096			WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0"
8097		    if test ! -d "${WCEROOT}" ; then
8098			WCEROOT="C:/Program Files/Microsoft eMbedded Tools"
8099		    fi
8100		fi
8101		if test "x${SDKROOT}" = "x" ; then
8102		    SDKROOT="C:/Program Files/Windows CE Tools"
8103		    if test ! -d "${SDKROOT}" ; then
8104			SDKROOT="C:/Windows CE Tools"
8105		    fi
8106		fi
8107		WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'`
8108		SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
8109		if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \
8110		    -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then
8111		    { { echo "$as_me:$LINENO: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&5
8112echo "$as_me: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&2;}
8113   { (exit 1); exit 1; }; }
8114		    doWince="no"
8115		else
8116		    # We could PATH_NOSPACE these, but that's not important,
8117		    # as long as we quote them when used.
8118		    CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include"
8119		    if test -d "${CEINCLUDE}/${TARGETCPU}" ; then
8120			CEINCLUDE="${CEINCLUDE}/${TARGETCPU}"
8121		    fi
8122		    CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}"
8123    		fi
8124	    fi
8125
8126	    if test "$GCC" != "yes" ; then
8127	        if test "${SHARED_BUILD}" = "0" ; then
8128		    runtime=-MT
8129	        else
8130		    runtime=-MD
8131	        fi
8132
8133                if test "$do64bit" != "no" ; then
8134		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
8135		    CC="\"${PATH64}/cl.exe\""
8136		    CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
8137		    RC="\"${MSSDK}/bin/rc.exe\""
8138		    lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
8139		    LINKBIN="\"${PATH64}/link.exe\""
8140		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
8141		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
8142		    # Avoid 'unresolved external symbol __security_cookie'
8143		    # errors, c.f. http://support.microsoft.com/?id=894573
8144
8145    vars="bufferoverflowU.lib"
8146    for i in $vars; do
8147	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
8148	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
8149	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
8150	fi
8151	PKG_LIBS="$PKG_LIBS $i"
8152    done
8153
8154
8155		elif test "$doWince" != "no" ; then
8156		    CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin"
8157		    if test "${TARGETCPU}" = "X86"; then
8158			CC="\"${CEBINROOT}/cl.exe\""
8159		    else
8160			CC="\"${CEBINROOT}/cl${ARCH}.exe\""
8161		    fi
8162		    CFLAGS="$CFLAGS -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\""
8163		    RC="\"${WCEROOT}/Common/EVC/bin/rc.exe\""
8164		    arch=`echo ${ARCH} | awk '{print tolower($0)}'`
8165		    defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _WINDOWS"
8166		    if test "${SHARED_BUILD}" = "1" ; then
8167			# Static CE builds require static celib as well
8168		    	defs="${defs} _DLL"
8169		    fi
8170		    for i in $defs ; do
8171
8172cat >>confdefs.h <<_ACEOF
8173#define $i 1
8174_ACEOF
8175
8176		    done
8177
8178cat >>confdefs.h <<_ACEOF
8179#define _WIN32_WCE $CEVERSION
8180_ACEOF
8181
8182
8183cat >>confdefs.h <<_ACEOF
8184#define UNDER_CE $CEVERSION
8185_ACEOF
8186
8187		    CFLAGS_DEBUG="-nologo -Zi -Od"
8188		    CFLAGS_OPTIMIZE="-nologo -Ox"
8189		    lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'`
8190		    lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
8191		    LINKBIN="\"${CEBINROOT}/link.exe\""
8192
8193		else
8194		    RC="rc"
8195		    lflags="-nologo"
8196    		    LINKBIN="link"
8197		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
8198		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
8199		fi
8200	    fi
8201
8202	    if test "$GCC" = "yes"; then
8203		# mingw gcc mode
8204		RC="windres"
8205		CFLAGS_DEBUG="-g"
8206		CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
8207		SHLIB_LD="$CC -shared"
8208		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
8209		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
8210		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
8211	    else
8212		SHLIB_LD="${LINKBIN} -dll ${lflags}"
8213		# link -lib only works when -lib is the first arg
8214		STLIB_LD="${LINKBIN} -lib ${lflags}"
8215		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib'
8216		PATHTYPE=-w
8217		# For information on what debugtype is most useful, see:
8218		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
8219		# and also
8220		# http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx
8221		# This essentially turns it all on.
8222		LDFLAGS_DEBUG="-debug -debugtype:cv"
8223		LDFLAGS_OPTIMIZE="-release"
8224		if test "$doWince" != "no" ; then
8225		    LDFLAGS_CONSOLE="-link ${lflags}"
8226		    LDFLAGS_WINDOW=${LDFLAGS_CONSOLE}
8227		else
8228		    LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
8229		    LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
8230		fi
8231	    fi
8232
8233	    SHLIB_SUFFIX=".dll"
8234	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
8235
8236	    TCL_LIB_VERSIONS_OK=nodots
8237    	    ;;
8238	AIX-*)
8239	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"; then
8240
8241		# AIX requires the _r compiler when gcc isn't being used
8242		case "${CC}" in
8243		    *_r|*_r\ *)
8244			# ok ...
8245			;;
8246		    *)
8247			# Make sure only first arg gets _r
8248		    	CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'`
8249			;;
8250		esac
8251		{ echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5
8252echo "${ECHO_T}Using $CC for compiling with threads" >&6; }
8253
8254fi
8255
8256	    LIBS="$LIBS -lc"
8257	    SHLIB_CFLAGS=""
8258	    SHLIB_SUFFIX=".so"
8259
8260	    LD_LIBRARY_PATH_VAR="LIBPATH"
8261
8262	    # Check to enable 64-bit flags for compiler/linker
8263	    if test "$do64bit" = yes; then
8264
8265		if test "$GCC" = yes; then
8266
8267		    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
8268echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
8269
8270else
8271
8272		    do64bit_ok=yes
8273		    CFLAGS="$CFLAGS -q64"
8274		    LDFLAGS_ARCH="-q64"
8275		    RANLIB="${RANLIB} -X64"
8276		    AR="${AR} -X64"
8277		    SHLIB_LD_FLAGS="-b64"
8278
8279fi
8280
8281
8282fi
8283
8284
8285	    if test "`uname -m`" = ia64; then
8286
8287		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
8288		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
8289		if test "$GCC" = yes; then
8290
8291		    CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
8292
8293else
8294
8295		    CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
8296
8297fi
8298
8299		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
8300
8301else
8302
8303		if test "$GCC" = yes; then
8304
8305		    SHLIB_LD='${CC} -shared -Wl,-bexpall'
8306
8307else
8308
8309		    SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bexpall -H512 -T512 -bnoentry"
8310		    LDFLAGS="$LDFLAGS -brtl"
8311
8312fi
8313
8314		SHLIB_LD="${SHLIB_LD} ${SHLIB_LD_FLAGS}"
8315		CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
8316		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8317
8318fi
8319
8320	    ;;
8321	BeOS*)
8322	    SHLIB_CFLAGS="-fPIC"
8323	    SHLIB_LD='${CC} -nostart'
8324	    SHLIB_SUFFIX=".so"
8325
8326	    #-----------------------------------------------------------
8327	    # Check for inet_ntoa in -lbind, for BeOS (which also needs
8328	    # -lsocket, even if the network functions are in -lnet which
8329	    # is always linked to, for compatibility.
8330	    #-----------------------------------------------------------
8331	    { echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5
8332echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6; }
8333if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then
8334  echo $ECHO_N "(cached) $ECHO_C" >&6
8335else
8336  ac_check_lib_save_LIBS=$LIBS
8337LIBS="-lbind  $LIBS"
8338cat >conftest.$ac_ext <<_ACEOF
8339/* confdefs.h.  */
8340_ACEOF
8341cat confdefs.h >>conftest.$ac_ext
8342cat >>conftest.$ac_ext <<_ACEOF
8343/* end confdefs.h.  */
8344
8345/* Override any GCC internal prototype to avoid an error.
8346   Use char because int might match the return type of a GCC
8347   builtin and then its argument prototype would still apply.  */
8348#ifdef __cplusplus
8349extern "C"
8350#endif
8351char inet_ntoa ();
8352int
8353main ()
8354{
8355return inet_ntoa ();
8356  ;
8357  return 0;
8358}
8359_ACEOF
8360rm -f conftest.$ac_objext conftest$ac_exeext
8361if { (ac_try="$ac_link"
8362case "(($ac_try" in
8363  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8364  *) ac_try_echo=$ac_try;;
8365esac
8366eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8367  (eval "$ac_link") 2>conftest.er1
8368  ac_status=$?
8369  grep -v '^ *+' conftest.er1 >conftest.err
8370  rm -f conftest.er1
8371  cat conftest.err >&5
8372  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8373  (exit $ac_status); } && {
8374	 test -z "$ac_c_werror_flag" ||
8375	 test ! -s conftest.err
8376       } && test -s conftest$ac_exeext &&
8377       $as_test_x conftest$ac_exeext; then
8378  ac_cv_lib_bind_inet_ntoa=yes
8379else
8380  echo "$as_me: failed program was:" >&5
8381sed 's/^/| /' conftest.$ac_ext >&5
8382
8383	ac_cv_lib_bind_inet_ntoa=no
8384fi
8385
8386rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8387      conftest$ac_exeext conftest.$ac_ext
8388LIBS=$ac_check_lib_save_LIBS
8389fi
8390{ echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5
8391echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6; }
8392if test $ac_cv_lib_bind_inet_ntoa = yes; then
8393  LIBS="$LIBS -lbind -lsocket"
8394fi
8395
8396	    ;;
8397	BSD/OS-4.*)
8398	    SHLIB_CFLAGS="-export-dynamic -fPIC"
8399	    SHLIB_LD='${CC} -shared'
8400	    SHLIB_SUFFIX=".so"
8401	    LDFLAGS="$LDFLAGS -export-dynamic"
8402	    CC_SEARCH_FLAGS=""
8403	    LD_SEARCH_FLAGS=""
8404	    ;;
8405	CYGWIN_*)
8406	    SHLIB_CFLAGS=""
8407	    SHLIB_LD='${CC} -shared'
8408	    SHLIB_SUFFIX=".dll"
8409	    EXE_SUFFIX=".exe"
8410	    CC_SEARCH_FLAGS=""
8411	    LD_SEARCH_FLAGS=""
8412	    ;;
8413	Haiku*)
8414	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
8415	    SHLIB_CFLAGS="-fPIC"
8416	    SHLIB_SUFFIX=".so"
8417	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
8418	    { echo "$as_me:$LINENO: checking for inet_ntoa in -lnetwork" >&5
8419echo $ECHO_N "checking for inet_ntoa in -lnetwork... $ECHO_C" >&6; }
8420if test "${ac_cv_lib_network_inet_ntoa+set}" = set; then
8421  echo $ECHO_N "(cached) $ECHO_C" >&6
8422else
8423  ac_check_lib_save_LIBS=$LIBS
8424LIBS="-lnetwork  $LIBS"
8425cat >conftest.$ac_ext <<_ACEOF
8426/* confdefs.h.  */
8427_ACEOF
8428cat confdefs.h >>conftest.$ac_ext
8429cat >>conftest.$ac_ext <<_ACEOF
8430/* end confdefs.h.  */
8431
8432/* Override any GCC internal prototype to avoid an error.
8433   Use char because int might match the return type of a GCC
8434   builtin and then its argument prototype would still apply.  */
8435#ifdef __cplusplus
8436extern "C"
8437#endif
8438char inet_ntoa ();
8439int
8440main ()
8441{
8442return inet_ntoa ();
8443  ;
8444  return 0;
8445}
8446_ACEOF
8447rm -f conftest.$ac_objext conftest$ac_exeext
8448if { (ac_try="$ac_link"
8449case "(($ac_try" in
8450  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8451  *) ac_try_echo=$ac_try;;
8452esac
8453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8454  (eval "$ac_link") 2>conftest.er1
8455  ac_status=$?
8456  grep -v '^ *+' conftest.er1 >conftest.err
8457  rm -f conftest.er1
8458  cat conftest.err >&5
8459  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8460  (exit $ac_status); } && {
8461	 test -z "$ac_c_werror_flag" ||
8462	 test ! -s conftest.err
8463       } && test -s conftest$ac_exeext &&
8464       $as_test_x conftest$ac_exeext; then
8465  ac_cv_lib_network_inet_ntoa=yes
8466else
8467  echo "$as_me: failed program was:" >&5
8468sed 's/^/| /' conftest.$ac_ext >&5
8469
8470	ac_cv_lib_network_inet_ntoa=no
8471fi
8472
8473rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8474      conftest$ac_exeext conftest.$ac_ext
8475LIBS=$ac_check_lib_save_LIBS
8476fi
8477{ echo "$as_me:$LINENO: result: $ac_cv_lib_network_inet_ntoa" >&5
8478echo "${ECHO_T}$ac_cv_lib_network_inet_ntoa" >&6; }
8479if test $ac_cv_lib_network_inet_ntoa = yes; then
8480  LIBS="$LIBS -lnetwork"
8481fi
8482
8483	    ;;
8484	HP-UX-*.11.*)
8485	    # Use updated header definitions where possible
8486
8487cat >>confdefs.h <<\_ACEOF
8488#define _XOPEN_SOURCE_EXTENDED 1
8489_ACEOF
8490
8491	    # TEA specific: Needed by Tcl, but not most extensions
8492	    #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
8493	    #LIBS="$LIBS -lxnet"               # Use the XOPEN network library
8494
8495	    if test "`uname -m`" = ia64; then
8496
8497		SHLIB_SUFFIX=".so"
8498		# Use newer C++ library for C++ extensions
8499		#if test "$GCC" != "yes" ; then
8500		#   CPPFLAGS="-AA"
8501		#fi
8502
8503else
8504
8505		SHLIB_SUFFIX=".sl"
8506
8507fi
8508
8509	    { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
8510echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
8511if test "${ac_cv_lib_dld_shl_load+set}" = set; then
8512  echo $ECHO_N "(cached) $ECHO_C" >&6
8513else
8514  ac_check_lib_save_LIBS=$LIBS
8515LIBS="-ldld  $LIBS"
8516cat >conftest.$ac_ext <<_ACEOF
8517/* confdefs.h.  */
8518_ACEOF
8519cat confdefs.h >>conftest.$ac_ext
8520cat >>conftest.$ac_ext <<_ACEOF
8521/* end confdefs.h.  */
8522
8523/* Override any GCC internal prototype to avoid an error.
8524   Use char because int might match the return type of a GCC
8525   builtin and then its argument prototype would still apply.  */
8526#ifdef __cplusplus
8527extern "C"
8528#endif
8529char shl_load ();
8530int
8531main ()
8532{
8533return shl_load ();
8534  ;
8535  return 0;
8536}
8537_ACEOF
8538rm -f conftest.$ac_objext conftest$ac_exeext
8539if { (ac_try="$ac_link"
8540case "(($ac_try" in
8541  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8542  *) ac_try_echo=$ac_try;;
8543esac
8544eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8545  (eval "$ac_link") 2>conftest.er1
8546  ac_status=$?
8547  grep -v '^ *+' conftest.er1 >conftest.err
8548  rm -f conftest.er1
8549  cat conftest.err >&5
8550  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8551  (exit $ac_status); } && {
8552	 test -z "$ac_c_werror_flag" ||
8553	 test ! -s conftest.err
8554       } && test -s conftest$ac_exeext &&
8555       $as_test_x conftest$ac_exeext; then
8556  ac_cv_lib_dld_shl_load=yes
8557else
8558  echo "$as_me: failed program was:" >&5
8559sed 's/^/| /' conftest.$ac_ext >&5
8560
8561	ac_cv_lib_dld_shl_load=no
8562fi
8563
8564rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8565      conftest$ac_exeext conftest.$ac_ext
8566LIBS=$ac_check_lib_save_LIBS
8567fi
8568{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
8569echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
8570if test $ac_cv_lib_dld_shl_load = yes; then
8571  tcl_ok=yes
8572else
8573  tcl_ok=no
8574fi
8575
8576	    if test "$tcl_ok" = yes; then
8577
8578		LDFLAGS="$LDFLAGS -E"
8579		CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
8580		LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
8581		LD_LIBRARY_PATH_VAR="SHLIB_PATH"
8582
8583fi
8584
8585	    if test "$GCC" = yes; then
8586
8587		SHLIB_LD='${CC} -shared'
8588		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8589
8590else
8591
8592		CFLAGS="$CFLAGS -z"
8593		# Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
8594		#CFLAGS="$CFLAGS +DAportable"
8595		SHLIB_CFLAGS="+z"
8596		SHLIB_LD="ld -b"
8597
8598fi
8599
8600
8601	    # Check to enable 64-bit flags for compiler/linker
8602	    if test "$do64bit" = "yes"; then
8603
8604		if test "$GCC" = yes; then
8605
8606		    case `${CC} -dumpmachine` in
8607			hppa64*)
8608			    # 64-bit gcc in use.  Fix flags for GNU ld.
8609			    do64bit_ok=yes
8610			    SHLIB_LD='${CC} -shared'
8611			    if test $doRpath = yes; then
8612
8613				CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8614fi
8615
8616			    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8617			    ;;
8618			*)
8619			    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
8620echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
8621			    ;;
8622		    esac
8623
8624else
8625
8626		    do64bit_ok=yes
8627		    CFLAGS="$CFLAGS +DD64"
8628		    LDFLAGS_ARCH="+DD64"
8629
8630fi
8631
8632
8633fi
8634 ;;
8635	IRIX-6.*)
8636	    SHLIB_CFLAGS=""
8637	    SHLIB_LD="ld -n32 -shared -rdata_shared"
8638	    SHLIB_SUFFIX=".so"
8639	    if test $doRpath = yes; then
8640
8641		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8642		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
8643fi
8644
8645	    if test "$GCC" = yes; then
8646
8647		CFLAGS="$CFLAGS -mabi=n32"
8648		LDFLAGS="$LDFLAGS -mabi=n32"
8649
8650else
8651
8652		case $system in
8653		    IRIX-6.3)
8654			# Use to build 6.2 compatible binaries on 6.3.
8655			CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
8656			;;
8657		    *)
8658			CFLAGS="$CFLAGS -n32"
8659			;;
8660		esac
8661		LDFLAGS="$LDFLAGS -n32"
8662
8663fi
8664
8665	    ;;
8666	IRIX64-6.*)
8667	    SHLIB_CFLAGS=""
8668	    SHLIB_LD="ld -n32 -shared -rdata_shared"
8669	    SHLIB_SUFFIX=".so"
8670	    if test $doRpath = yes; then
8671
8672		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8673		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
8674fi
8675
8676
8677	    # Check to enable 64-bit flags for compiler/linker
8678
8679	    if test "$do64bit" = yes; then
8680
8681	        if test "$GCC" = yes; then
8682
8683	            { echo "$as_me:$LINENO: WARNING: 64bit mode not supported by gcc" >&5
8684echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;}
8685
8686else
8687
8688	            do64bit_ok=yes
8689	            SHLIB_LD="ld -64 -shared -rdata_shared"
8690	            CFLAGS="$CFLAGS -64"
8691	            LDFLAGS_ARCH="-64"
8692
8693fi
8694
8695
8696fi
8697
8698	    ;;
8699	Linux*)
8700	    SHLIB_CFLAGS="-fPIC"
8701	    SHLIB_SUFFIX=".so"
8702
8703	    # TEA specific:
8704	    CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
8705
8706	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
8707	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}'
8708	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
8709	    if test $doRpath = yes; then
8710
8711		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8712fi
8713
8714	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8715	    if test "`uname -m`" = "alpha"; then
8716  CFLAGS="$CFLAGS -mieee"
8717fi
8718
8719	    if test $do64bit = yes; then
8720
8721		{ echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5
8722echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6; }
8723if test "${tcl_cv_cc_m64+set}" = set; then
8724  echo $ECHO_N "(cached) $ECHO_C" >&6
8725else
8726
8727		    hold_cflags=$CFLAGS
8728		    CFLAGS="$CFLAGS -m64"
8729		    cat >conftest.$ac_ext <<_ACEOF
8730/* confdefs.h.  */
8731_ACEOF
8732cat confdefs.h >>conftest.$ac_ext
8733cat >>conftest.$ac_ext <<_ACEOF
8734/* end confdefs.h.  */
8735
8736int
8737main ()
8738{
8739
8740  ;
8741  return 0;
8742}
8743_ACEOF
8744rm -f conftest.$ac_objext conftest$ac_exeext
8745if { (ac_try="$ac_link"
8746case "(($ac_try" in
8747  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8748  *) ac_try_echo=$ac_try;;
8749esac
8750eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8751  (eval "$ac_link") 2>conftest.er1
8752  ac_status=$?
8753  grep -v '^ *+' conftest.er1 >conftest.err
8754  rm -f conftest.er1
8755  cat conftest.err >&5
8756  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8757  (exit $ac_status); } && {
8758	 test -z "$ac_c_werror_flag" ||
8759	 test ! -s conftest.err
8760       } && test -s conftest$ac_exeext &&
8761       $as_test_x conftest$ac_exeext; then
8762  tcl_cv_cc_m64=yes
8763else
8764  echo "$as_me: failed program was:" >&5
8765sed 's/^/| /' conftest.$ac_ext >&5
8766
8767	tcl_cv_cc_m64=no
8768fi
8769
8770rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8771      conftest$ac_exeext conftest.$ac_ext
8772		    CFLAGS=$hold_cflags
8773fi
8774{ echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5
8775echo "${ECHO_T}$tcl_cv_cc_m64" >&6; }
8776		if test $tcl_cv_cc_m64 = yes; then
8777
8778		    CFLAGS="$CFLAGS -m64"
8779		    do64bit_ok=yes
8780
8781fi
8782
8783
8784fi
8785
8786
8787	    # The combo of gcc + glibc has a bug related to inlining of
8788	    # functions like strtod(). The -fno-builtin flag should address
8789	    # this problem but it does not work. The -fno-inline flag is kind
8790	    # of overkill but it works. Disable inlining only when one of the
8791	    # files in compat/*.c is being linked in.
8792
8793	    if test x"${USE_COMPAT}" != x; then
8794  CFLAGS="$CFLAGS -fno-inline"
8795fi
8796
8797
8798	    ;;
8799	GNU*)
8800	    SHLIB_CFLAGS="-fPIC"
8801	    SHLIB_SUFFIX=".so"
8802
8803	    SHLIB_LD='${CC} -shared'
8804	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
8805	    CC_SEARCH_FLAGS=""
8806	    LD_SEARCH_FLAGS=""
8807	    if test "`uname -m`" = "alpha"; then
8808  CFLAGS="$CFLAGS -mieee"
8809fi
8810
8811	    ;;
8812	Lynx*)
8813	    SHLIB_CFLAGS="-fPIC"
8814	    SHLIB_SUFFIX=".so"
8815	    CFLAGS_OPTIMIZE=-02
8816	    SHLIB_LD='${CC} -shared'
8817	    LD_FLAGS="-Wl,--export-dynamic"
8818	    if test $doRpath = yes; then
8819
8820		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8821		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8822fi
8823
8824	    ;;
8825	OpenBSD-*)
8826	    SHLIB_CFLAGS="-fPIC"
8827	    SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
8828	    SHLIB_SUFFIX=".so"
8829	    if test $doRpath = yes; then
8830
8831		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8832fi
8833
8834	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8835	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
8836	    { echo "$as_me:$LINENO: checking for ELF" >&5
8837echo $ECHO_N "checking for ELF... $ECHO_C" >&6; }
8838if test "${tcl_cv_ld_elf+set}" = set; then
8839  echo $ECHO_N "(cached) $ECHO_C" >&6
8840else
8841
8842		cat >conftest.$ac_ext <<_ACEOF
8843/* confdefs.h.  */
8844_ACEOF
8845cat confdefs.h >>conftest.$ac_ext
8846cat >>conftest.$ac_ext <<_ACEOF
8847/* end confdefs.h.  */
8848
8849#ifdef __ELF__
8850	yes
8851#endif
8852
8853_ACEOF
8854if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8855  $EGREP "yes" >/dev/null 2>&1; then
8856  tcl_cv_ld_elf=yes
8857else
8858  tcl_cv_ld_elf=no
8859fi
8860rm -f -r conftest*
8861
8862fi
8863{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5
8864echo "${ECHO_T}$tcl_cv_ld_elf" >&6; }
8865	    if test $tcl_cv_ld_elf = yes; then
8866
8867		LDFLAGS=-Wl,-export-dynamic
8868
8869else
8870  LDFLAGS=""
8871fi
8872
8873	    if test "${TCL_THREADS}" = "1"; then
8874
8875		# OpenBSD builds and links with -pthread, never -lpthread.
8876		LIBS=`echo $LIBS | sed s/-lpthread//`
8877		CFLAGS="$CFLAGS -pthread"
8878		SHLIB_CFLAGS="$SHLIB_CFLAGS -pthread"
8879
8880fi
8881
8882	    # OpenBSD doesn't do version numbers with dots.
8883	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
8884	    TCL_LIB_VERSIONS_OK=nodots
8885	    ;;
8886	NetBSD-*|FreeBSD-[3-4].*)
8887	    # FreeBSD 3.* and greater have ELF.
8888	    # NetBSD 2.* has ELF and can use 'cc -shared' to build shared libs
8889	    SHLIB_CFLAGS="-fPIC"
8890	    SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
8891	    SHLIB_SUFFIX=".so"
8892	    LDFLAGS="$LDFLAGS -export-dynamic"
8893	    if test $doRpath = yes; then
8894
8895		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8896fi
8897
8898	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8899	    if test "${TCL_THREADS}" = "1"; then
8900
8901		# The -pthread needs to go in the CFLAGS, not LIBS
8902		LIBS=`echo $LIBS | sed s/-pthread//`
8903		CFLAGS="$CFLAGS -pthread"
8904	    	LDFLAGS="$LDFLAGS -pthread"
8905
8906fi
8907
8908	    case $system in
8909	    FreeBSD-3.*)
8910	    	# FreeBSD-3 doesn't handle version numbers with dots.
8911	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
8912	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
8913	    	TCL_LIB_VERSIONS_OK=nodots
8914		;;
8915	    esac
8916	    ;;
8917	FreeBSD-*)
8918	    # This configuration from FreeBSD Ports.
8919	    SHLIB_CFLAGS="-fPIC"
8920	    SHLIB_LD="${CC} -shared"
8921	    TCL_SHLIB_LD_EXTRAS="-soname \$@"
8922	    SHLIB_SUFFIX=".so"
8923	    LDFLAGS=""
8924	    if test $doRpath = yes; then
8925
8926		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8927		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
8928fi
8929
8930	    if test "${TCL_THREADS}" = "1"; then
8931
8932		# The -pthread needs to go in the LDFLAGS, not LIBS
8933		LIBS=`echo $LIBS | sed s/-pthread//`
8934		CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8935		LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
8936fi
8937
8938	    # Version numbers are dot-stripped by system policy.
8939	    TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .`
8940	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
8941	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
8942	    TCL_LIB_VERSIONS_OK=nodots
8943	    ;;
8944	Darwin-*)
8945	    CFLAGS_OPTIMIZE="-Os"
8946	    SHLIB_CFLAGS="-fno-common"
8947	    # To avoid discrepancies between what headers configure sees during
8948	    # preprocessing tests and compiling tests, move any -isysroot and
8949	    # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
8950	    CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
8951		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
8952		if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`"
8953	    CFLAGS="`echo " ${CFLAGS}" | \
8954		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
8955		if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`"
8956	    if test $do64bit = yes; then
8957
8958		case `arch` in
8959		    ppc)
8960			{ echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5
8961echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6; }
8962if test "${tcl_cv_cc_arch_ppc64+set}" = set; then
8963  echo $ECHO_N "(cached) $ECHO_C" >&6
8964else
8965
8966			    hold_cflags=$CFLAGS
8967			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
8968			    cat >conftest.$ac_ext <<_ACEOF
8969/* confdefs.h.  */
8970_ACEOF
8971cat confdefs.h >>conftest.$ac_ext
8972cat >>conftest.$ac_ext <<_ACEOF
8973/* end confdefs.h.  */
8974
8975int
8976main ()
8977{
8978
8979  ;
8980  return 0;
8981}
8982_ACEOF
8983rm -f conftest.$ac_objext conftest$ac_exeext
8984if { (ac_try="$ac_link"
8985case "(($ac_try" in
8986  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8987  *) ac_try_echo=$ac_try;;
8988esac
8989eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8990  (eval "$ac_link") 2>conftest.er1
8991  ac_status=$?
8992  grep -v '^ *+' conftest.er1 >conftest.err
8993  rm -f conftest.er1
8994  cat conftest.err >&5
8995  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8996  (exit $ac_status); } && {
8997	 test -z "$ac_c_werror_flag" ||
8998	 test ! -s conftest.err
8999       } && test -s conftest$ac_exeext &&
9000       $as_test_x conftest$ac_exeext; then
9001  tcl_cv_cc_arch_ppc64=yes
9002else
9003  echo "$as_me: failed program was:" >&5
9004sed 's/^/| /' conftest.$ac_ext >&5
9005
9006	tcl_cv_cc_arch_ppc64=no
9007fi
9008
9009rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9010      conftest$ac_exeext conftest.$ac_ext
9011			    CFLAGS=$hold_cflags
9012fi
9013{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5
9014echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6; }
9015			if test $tcl_cv_cc_arch_ppc64 = yes; then
9016
9017			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
9018			    do64bit_ok=yes
9019
9020fi
9021;;
9022		    i386)
9023			{ echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5
9024echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6; }
9025if test "${tcl_cv_cc_arch_x86_64+set}" = set; then
9026  echo $ECHO_N "(cached) $ECHO_C" >&6
9027else
9028
9029			    hold_cflags=$CFLAGS
9030			    CFLAGS="$CFLAGS -arch x86_64"
9031			    cat >conftest.$ac_ext <<_ACEOF
9032/* confdefs.h.  */
9033_ACEOF
9034cat confdefs.h >>conftest.$ac_ext
9035cat >>conftest.$ac_ext <<_ACEOF
9036/* end confdefs.h.  */
9037
9038int
9039main ()
9040{
9041
9042  ;
9043  return 0;
9044}
9045_ACEOF
9046rm -f conftest.$ac_objext conftest$ac_exeext
9047if { (ac_try="$ac_link"
9048case "(($ac_try" in
9049  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9050  *) ac_try_echo=$ac_try;;
9051esac
9052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9053  (eval "$ac_link") 2>conftest.er1
9054  ac_status=$?
9055  grep -v '^ *+' conftest.er1 >conftest.err
9056  rm -f conftest.er1
9057  cat conftest.err >&5
9058  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9059  (exit $ac_status); } && {
9060	 test -z "$ac_c_werror_flag" ||
9061	 test ! -s conftest.err
9062       } && test -s conftest$ac_exeext &&
9063       $as_test_x conftest$ac_exeext; then
9064  tcl_cv_cc_arch_x86_64=yes
9065else
9066  echo "$as_me: failed program was:" >&5
9067sed 's/^/| /' conftest.$ac_ext >&5
9068
9069	tcl_cv_cc_arch_x86_64=no
9070fi
9071
9072rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9073      conftest$ac_exeext conftest.$ac_ext
9074			    CFLAGS=$hold_cflags
9075fi
9076{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5
9077echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6; }
9078			if test $tcl_cv_cc_arch_x86_64 = yes; then
9079
9080			    CFLAGS="$CFLAGS -arch x86_64"
9081			    do64bit_ok=yes
9082
9083fi
9084;;
9085		    *)
9086			{ echo "$as_me:$LINENO: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5
9087echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};;
9088		esac
9089
9090else
9091
9092		# Check for combined 32-bit and 64-bit fat build
9093		if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
9094		    && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '; then
9095
9096		    fat_32_64=yes
9097fi
9098
9099
9100fi
9101
9102	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
9103	    SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
9104	    { echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5
9105echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6; }
9106if test "${tcl_cv_ld_single_module+set}" = set; then
9107  echo $ECHO_N "(cached) $ECHO_C" >&6
9108else
9109
9110		hold_ldflags=$LDFLAGS
9111		LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
9112		cat >conftest.$ac_ext <<_ACEOF
9113/* confdefs.h.  */
9114_ACEOF
9115cat confdefs.h >>conftest.$ac_ext
9116cat >>conftest.$ac_ext <<_ACEOF
9117/* end confdefs.h.  */
9118
9119int
9120main ()
9121{
9122int i;
9123  ;
9124  return 0;
9125}
9126_ACEOF
9127rm -f conftest.$ac_objext conftest$ac_exeext
9128if { (ac_try="$ac_link"
9129case "(($ac_try" in
9130  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9131  *) ac_try_echo=$ac_try;;
9132esac
9133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9134  (eval "$ac_link") 2>conftest.er1
9135  ac_status=$?
9136  grep -v '^ *+' conftest.er1 >conftest.err
9137  rm -f conftest.er1
9138  cat conftest.err >&5
9139  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9140  (exit $ac_status); } && {
9141	 test -z "$ac_c_werror_flag" ||
9142	 test ! -s conftest.err
9143       } && test -s conftest$ac_exeext &&
9144       $as_test_x conftest$ac_exeext; then
9145  tcl_cv_ld_single_module=yes
9146else
9147  echo "$as_me: failed program was:" >&5
9148sed 's/^/| /' conftest.$ac_ext >&5
9149
9150	tcl_cv_ld_single_module=no
9151fi
9152
9153rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9154      conftest$ac_exeext conftest.$ac_ext
9155		LDFLAGS=$hold_ldflags
9156fi
9157{ echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5
9158echo "${ECHO_T}$tcl_cv_ld_single_module" >&6; }
9159	    if test $tcl_cv_ld_single_module = yes; then
9160
9161		SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
9162
9163fi
9164
9165	    # TEA specific: link shlib with current and compatiblity version flags
9166	    vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([0-9]\{1,5\}\)\(\(\.[0-9]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d`
9167	    SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}"
9168	    SHLIB_SUFFIX=".dylib"
9169	    # Don't use -prebind when building for Mac OS X 10.4 or later only:
9170	    if test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \
9171		"`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4; then
9172
9173		LDFLAGS="$LDFLAGS -prebind"
9174fi
9175
9176	    LDFLAGS="$LDFLAGS -headerpad_max_install_names"
9177	    { echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5
9178echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6; }
9179if test "${tcl_cv_ld_search_paths_first+set}" = set; then
9180  echo $ECHO_N "(cached) $ECHO_C" >&6
9181else
9182
9183		hold_ldflags=$LDFLAGS
9184		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
9185		cat >conftest.$ac_ext <<_ACEOF
9186/* confdefs.h.  */
9187_ACEOF
9188cat confdefs.h >>conftest.$ac_ext
9189cat >>conftest.$ac_ext <<_ACEOF
9190/* end confdefs.h.  */
9191
9192int
9193main ()
9194{
9195int i;
9196  ;
9197  return 0;
9198}
9199_ACEOF
9200rm -f conftest.$ac_objext conftest$ac_exeext
9201if { (ac_try="$ac_link"
9202case "(($ac_try" in
9203  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9204  *) ac_try_echo=$ac_try;;
9205esac
9206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9207  (eval "$ac_link") 2>conftest.er1
9208  ac_status=$?
9209  grep -v '^ *+' conftest.er1 >conftest.err
9210  rm -f conftest.er1
9211  cat conftest.err >&5
9212  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9213  (exit $ac_status); } && {
9214	 test -z "$ac_c_werror_flag" ||
9215	 test ! -s conftest.err
9216       } && test -s conftest$ac_exeext &&
9217       $as_test_x conftest$ac_exeext; then
9218  tcl_cv_ld_search_paths_first=yes
9219else
9220  echo "$as_me: failed program was:" >&5
9221sed 's/^/| /' conftest.$ac_ext >&5
9222
9223	tcl_cv_ld_search_paths_first=no
9224fi
9225
9226rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9227      conftest$ac_exeext conftest.$ac_ext
9228		LDFLAGS=$hold_ldflags
9229fi
9230{ echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5
9231echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6; }
9232	    if test $tcl_cv_ld_search_paths_first = yes; then
9233
9234		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
9235
9236fi
9237
9238	    if test "$tcl_cv_cc_visibility_hidden" != yes; then
9239
9240
9241cat >>confdefs.h <<\_ACEOF
9242#define MODULE_SCOPE __private_extern__
9243_ACEOF
9244
9245		tcl_cv_cc_visibility_hidden=yes
9246
9247fi
9248
9249	    CC_SEARCH_FLAGS=""
9250	    LD_SEARCH_FLAGS=""
9251	    LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
9252	    # TEA specific: for combined 32 & 64 bit fat builds of Tk
9253	    # extensions, verify that 64-bit build is possible.
9254	    if test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"; then
9255
9256		if test "${TEA_WINDOWINGSYSTEM}" = x11; then
9257
9258		    { echo "$as_me:$LINENO: checking for 64-bit X11" >&5
9259echo $ECHO_N "checking for 64-bit X11... $ECHO_C" >&6; }
9260if test "${tcl_cv_lib_x11_64+set}" = set; then
9261  echo $ECHO_N "(cached) $ECHO_C" >&6
9262else
9263
9264			for v in CFLAGS CPPFLAGS LDFLAGS; do
9265			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
9266			done
9267			CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
9268			LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
9269			cat >conftest.$ac_ext <<_ACEOF
9270/* confdefs.h.  */
9271_ACEOF
9272cat confdefs.h >>conftest.$ac_ext
9273cat >>conftest.$ac_ext <<_ACEOF
9274/* end confdefs.h.  */
9275#include <X11/Xlib.h>
9276int
9277main ()
9278{
9279XrmInitialize();
9280  ;
9281  return 0;
9282}
9283_ACEOF
9284rm -f conftest.$ac_objext conftest$ac_exeext
9285if { (ac_try="$ac_link"
9286case "(($ac_try" in
9287  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9288  *) ac_try_echo=$ac_try;;
9289esac
9290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9291  (eval "$ac_link") 2>conftest.er1
9292  ac_status=$?
9293  grep -v '^ *+' conftest.er1 >conftest.err
9294  rm -f conftest.er1
9295  cat conftest.err >&5
9296  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9297  (exit $ac_status); } && {
9298	 test -z "$ac_c_werror_flag" ||
9299	 test ! -s conftest.err
9300       } && test -s conftest$ac_exeext &&
9301       $as_test_x conftest$ac_exeext; then
9302  tcl_cv_lib_x11_64=yes
9303else
9304  echo "$as_me: failed program was:" >&5
9305sed 's/^/| /' conftest.$ac_ext >&5
9306
9307	tcl_cv_lib_x11_64=no
9308fi
9309
9310rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9311      conftest$ac_exeext conftest.$ac_ext
9312			for v in CFLAGS CPPFLAGS LDFLAGS; do
9313			    eval $v'="$hold_'$v'"'
9314			done
9315fi
9316{ echo "$as_me:$LINENO: result: $tcl_cv_lib_x11_64" >&5
9317echo "${ECHO_T}$tcl_cv_lib_x11_64" >&6; }
9318
9319fi
9320
9321		if test "${TEA_WINDOWINGSYSTEM}" = aqua; then
9322
9323		    { echo "$as_me:$LINENO: checking for 64-bit Tk" >&5
9324echo $ECHO_N "checking for 64-bit Tk... $ECHO_C" >&6; }
9325if test "${tcl_cv_lib_tk_64+set}" = set; then
9326  echo $ECHO_N "(cached) $ECHO_C" >&6
9327else
9328
9329			for v in CFLAGS CPPFLAGS LDFLAGS; do
9330			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
9331			done
9332			CPPFLAGS="$CPPFLAGS -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 `eval "echo ${TCL_INCLUDES} ${TK_INCLUDES}"`"
9333			LDFLAGS="$LDFLAGS ${TCL_STUB_LIB_SPEC} ${TK_STUB_LIB_SPEC}"
9334			cat >conftest.$ac_ext <<_ACEOF
9335/* confdefs.h.  */
9336_ACEOF
9337cat confdefs.h >>conftest.$ac_ext
9338cat >>conftest.$ac_ext <<_ACEOF
9339/* end confdefs.h.  */
9340#include <tk.h>
9341int
9342main ()
9343{
9344Tk_InitStubs(NULL, "", 0);
9345  ;
9346  return 0;
9347}
9348_ACEOF
9349rm -f conftest.$ac_objext conftest$ac_exeext
9350if { (ac_try="$ac_link"
9351case "(($ac_try" in
9352  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9353  *) ac_try_echo=$ac_try;;
9354esac
9355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9356  (eval "$ac_link") 2>conftest.er1
9357  ac_status=$?
9358  grep -v '^ *+' conftest.er1 >conftest.err
9359  rm -f conftest.er1
9360  cat conftest.err >&5
9361  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9362  (exit $ac_status); } && {
9363	 test -z "$ac_c_werror_flag" ||
9364	 test ! -s conftest.err
9365       } && test -s conftest$ac_exeext &&
9366       $as_test_x conftest$ac_exeext; then
9367  tcl_cv_lib_tk_64=yes
9368else
9369  echo "$as_me: failed program was:" >&5
9370sed 's/^/| /' conftest.$ac_ext >&5
9371
9372	tcl_cv_lib_tk_64=no
9373fi
9374
9375rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9376      conftest$ac_exeext conftest.$ac_ext
9377			for v in CFLAGS CPPFLAGS LDFLAGS; do
9378			    eval $v'="$hold_'$v'"'
9379			done
9380fi
9381{ echo "$as_me:$LINENO: result: $tcl_cv_lib_tk_64" >&5
9382echo "${ECHO_T}$tcl_cv_lib_tk_64" >&6; }
9383
9384fi
9385
9386		# remove 64-bit arch flags from CFLAGS et al. if configuration
9387		# does not support 64-bit.
9388		if test "$tcl_cv_lib_tk_64" = no -o "$tcl_cv_lib_x11_64" = no; then
9389
9390		    { echo "$as_me:$LINENO: Removing 64-bit architectures from compiler & linker flags" >&5
9391echo "$as_me: Removing 64-bit architectures from compiler & linker flags" >&6;}
9392		    for v in CFLAGS CPPFLAGS LDFLAGS; do
9393			eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
9394		    done
9395fi
9396
9397
9398fi
9399
9400	    ;;
9401	OS/390-*)
9402	    CFLAGS_OPTIMIZE=""		# Optimizer is buggy
9403
9404cat >>confdefs.h <<\_ACEOF
9405#define _OE_SOCKETS 1
9406_ACEOF
9407
9408	    ;;
9409	OSF1-V*)
9410	    # Digital OSF/1
9411	    SHLIB_CFLAGS=""
9412	    if test "$SHARED_BUILD" = 1; then
9413
9414	        SHLIB_LD='ld -shared -expect_unresolved "*"'
9415
9416else
9417
9418	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
9419
9420fi
9421
9422	    SHLIB_SUFFIX=".so"
9423	    if test $doRpath = yes; then
9424
9425		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9426		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
9427fi
9428
9429	    if test "$GCC" = yes; then
9430  CFLAGS="$CFLAGS -mieee"
9431else
9432
9433		CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
9434fi
9435
9436	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
9437	    if test "${TCL_THREADS}" = 1; then
9438
9439		CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
9440		CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
9441		LIBS=`echo $LIBS | sed s/-lpthreads//`
9442		if test "$GCC" = yes; then
9443
9444		    LIBS="$LIBS -lpthread -lmach -lexc"
9445
9446else
9447
9448		    CFLAGS="$CFLAGS -pthread"
9449		    LDFLAGS="$LDFLAGS -pthread"
9450
9451fi
9452
9453
9454fi
9455
9456	    ;;
9457	QNX-6*)
9458	    # QNX RTP
9459	    # This may work for all QNX, but it was only reported for v6.
9460	    SHLIB_CFLAGS="-fPIC"
9461	    SHLIB_LD="ld -Bshareable -x"
9462	    SHLIB_LD_LIBS=""
9463	    SHLIB_SUFFIX=".so"
9464	    CC_SEARCH_FLAGS=""
9465	    LD_SEARCH_FLAGS=""
9466	    ;;
9467	SCO_SV-3.2*)
9468	    if test "$GCC" = yes; then
9469
9470		SHLIB_CFLAGS="-fPIC -melf"
9471		LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
9472
9473else
9474
9475	       SHLIB_CFLAGS="-Kpic -belf"
9476	       LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
9477
9478fi
9479
9480	    SHLIB_LD="ld -G"
9481	    SHLIB_LD_LIBS=""
9482	    SHLIB_SUFFIX=".so"
9483	    CC_SEARCH_FLAGS=""
9484	    LD_SEARCH_FLAGS=""
9485	    ;;
9486	SunOS-5.[0-6])
9487	    # Careful to not let 5.10+ fall into this case
9488
9489	    # Note: If _REENTRANT isn't defined, then Solaris
9490	    # won't define thread-safe library routines.
9491
9492
9493cat >>confdefs.h <<\_ACEOF
9494#define _REENTRANT 1
9495_ACEOF
9496
9497
9498cat >>confdefs.h <<\_ACEOF
9499#define _POSIX_PTHREAD_SEMANTICS 1
9500_ACEOF
9501
9502
9503	    SHLIB_CFLAGS="-KPIC"
9504	    SHLIB_SUFFIX=".so"
9505	    if test "$GCC" = yes; then
9506
9507		SHLIB_LD='${CC} -shared'
9508		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
9509		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9510
9511else
9512
9513		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
9514		CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
9515		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9516
9517fi
9518
9519	    ;;
9520	SunOS-5*)
9521	    # Note: If _REENTRANT isn't defined, then Solaris
9522	    # won't define thread-safe library routines.
9523
9524
9525cat >>confdefs.h <<\_ACEOF
9526#define _REENTRANT 1
9527_ACEOF
9528
9529
9530cat >>confdefs.h <<\_ACEOF
9531#define _POSIX_PTHREAD_SEMANTICS 1
9532_ACEOF
9533
9534
9535	    SHLIB_CFLAGS="-KPIC"
9536
9537	    # Check to enable 64-bit flags for compiler/linker
9538	    if test "$do64bit" = yes; then
9539
9540		arch=`isainfo`
9541		if test "$arch" = "sparcv9 sparc"; then
9542
9543		    if test "$GCC" = yes; then
9544
9545			if test "`${CC} -dumpversion | awk -F. '{print $1}'`" -lt 3; then
9546
9547			    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5
9548echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;}
9549
9550else
9551
9552			    do64bit_ok=yes
9553			    CFLAGS="$CFLAGS -m64 -mcpu=v9"
9554			    LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
9555			    SHLIB_CFLAGS="-fPIC"
9556
9557fi
9558
9559
9560else
9561
9562			do64bit_ok=yes
9563			if test "$do64bitVIS" = yes; then
9564
9565			    CFLAGS="$CFLAGS -xarch=v9a"
9566			    LDFLAGS_ARCH="-xarch=v9a"
9567
9568else
9569
9570			    CFLAGS="$CFLAGS -xarch=v9"
9571			    LDFLAGS_ARCH="-xarch=v9"
9572
9573fi
9574
9575			# Solaris 64 uses this as well
9576			#LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
9577
9578fi
9579
9580
9581else
9582  if test "$arch" = "amd64 i386"; then
9583
9584		    if test "$GCC" = yes; then
9585
9586			case $system in
9587			    SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
9588				do64bit_ok=yes
9589				CFLAGS="$CFLAGS -m64"
9590				LDFLAGS="$LDFLAGS -m64";;
9591			    *)
9592				{ echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
9593echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;};;
9594			esac
9595
9596else
9597
9598			do64bit_ok=yes
9599			case $system in
9600			    SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
9601				CFLAGS="$CFLAGS -m64"
9602				LDFLAGS="$LDFLAGS -m64";;
9603			    *)
9604				CFLAGS="$CFLAGS -xarch=amd64"
9605				LDFLAGS="$LDFLAGS -xarch=amd64";;
9606			esac
9607
9608fi
9609
9610
9611else
9612  { echo "$as_me:$LINENO: WARNING: 64bit mode not supported for $arch" >&5
9613echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;}
9614fi
9615
9616fi
9617
9618
9619fi
9620
9621
9622	    SHLIB_SUFFIX=".so"
9623	    if test "$GCC" = yes; then
9624
9625		SHLIB_LD='${CC} -shared'
9626		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
9627		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9628		if test "$do64bit_ok" = yes; then
9629
9630		    if test "$arch" = "sparcv9 sparc"; then
9631
9632			# We need to specify -static-libgcc or we need to
9633			# add the path to the sparv9 libgcc.
9634			# JH: static-libgcc is necessary for core Tcl, but may
9635			# not be necessary for extensions.
9636			SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
9637			# for finding sparcv9 libgcc, get the regular libgcc
9638			# path, remove so name and append 'sparcv9'
9639			#v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
9640			#CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
9641
9642else
9643  if test "$arch" = "amd64 i386"; then
9644
9645			# JH: static-libgcc is necessary for core Tcl, but may
9646			# not be necessary for extensions.
9647			SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
9648
9649fi
9650
9651fi
9652
9653
9654fi
9655
9656
9657else
9658
9659		case $system in
9660		    SunOS-5.[1-9][0-9]*)
9661			# TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
9662			SHLIB_LD='${CC} -G -z text ${LDFLAGS_DEFAULT}';;
9663		    *)
9664			SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
9665		esac
9666		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
9667		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
9668
9669fi
9670
9671	    ;;
9672    esac
9673
9674    if test "$do64bit" = yes -a "$do64bit_ok" = no; then
9675
9676	{ echo "$as_me:$LINENO: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5
9677echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;}
9678
9679fi
9680
9681
9682
9683
9684    # Add in the arch flags late to ensure it wasn't removed.
9685    # Not necessary in TEA, but this is aligned with core
9686    LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
9687
9688    # If we're running gcc, then change the C flags for compiling shared
9689    # libraries to the right flags for gcc, instead of those for the
9690    # standard manufacturer compiler.
9691
9692    if test "$GCC" = yes; then
9693
9694	case $system in
9695	    AIX-*) ;;
9696	    BSD/OS*) ;;
9697	    CYGWIN_*) ;;
9698	    IRIX*) ;;
9699	    NetBSD-*|FreeBSD-*|OpenBSD-*) ;;
9700	    Darwin-*) ;;
9701	    SCO_SV-3.2*) ;;
9702	    windows) ;;
9703	    *) SHLIB_CFLAGS="-fPIC" ;;
9704	esac
9705fi
9706
9707
9708    if test "$tcl_cv_cc_visibility_hidden" != yes; then
9709
9710
9711cat >>confdefs.h <<\_ACEOF
9712#define MODULE_SCOPE extern
9713_ACEOF
9714
9715
9716cat >>confdefs.h <<\_ACEOF
9717#define NO_VIZ
9718_ACEOF
9719
9720
9721fi
9722
9723
9724    if test "$SHARED_LIB_SUFFIX" = ""; then
9725
9726	# TEA specific: use PACKAGE_VERSION instead of VERSION
9727	SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'
9728fi
9729
9730    if test "$UNSHARED_LIB_SUFFIX" = ""; then
9731
9732	# TEA specific: use PACKAGE_VERSION instead of VERSION
9733	UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
9734fi
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749    # These must be called after we do the basic CFLAGS checks and
9750    # verify any possible 64-bit or similar switches are necessary
9751
9752    { echo "$as_me:$LINENO: checking for required early compiler flags" >&5
9753echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6; }
9754    tcl_flags=""
9755
9756    if test "${tcl_cv_flag__isoc99_source+set}" = set; then
9757  echo $ECHO_N "(cached) $ECHO_C" >&6
9758else
9759  cat >conftest.$ac_ext <<_ACEOF
9760/* confdefs.h.  */
9761_ACEOF
9762cat confdefs.h >>conftest.$ac_ext
9763cat >>conftest.$ac_ext <<_ACEOF
9764/* end confdefs.h.  */
9765#include <stdlib.h>
9766int
9767main ()
9768{
9769char *p = (char *)strtoll; char *q = (char *)strtoull;
9770  ;
9771  return 0;
9772}
9773_ACEOF
9774rm -f conftest.$ac_objext
9775if { (ac_try="$ac_compile"
9776case "(($ac_try" in
9777  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9778  *) ac_try_echo=$ac_try;;
9779esac
9780eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9781  (eval "$ac_compile") 2>conftest.er1
9782  ac_status=$?
9783  grep -v '^ *+' conftest.er1 >conftest.err
9784  rm -f conftest.er1
9785  cat conftest.err >&5
9786  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9787  (exit $ac_status); } && {
9788	 test -z "$ac_c_werror_flag" ||
9789	 test ! -s conftest.err
9790       } && test -s conftest.$ac_objext; then
9791  tcl_cv_flag__isoc99_source=no
9792else
9793  echo "$as_me: failed program was:" >&5
9794sed 's/^/| /' conftest.$ac_ext >&5
9795
9796	cat >conftest.$ac_ext <<_ACEOF
9797/* confdefs.h.  */
9798_ACEOF
9799cat confdefs.h >>conftest.$ac_ext
9800cat >>conftest.$ac_ext <<_ACEOF
9801/* end confdefs.h.  */
9802#define _ISOC99_SOURCE 1
9803#include <stdlib.h>
9804int
9805main ()
9806{
9807char *p = (char *)strtoll; char *q = (char *)strtoull;
9808  ;
9809  return 0;
9810}
9811_ACEOF
9812rm -f conftest.$ac_objext
9813if { (ac_try="$ac_compile"
9814case "(($ac_try" in
9815  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9816  *) ac_try_echo=$ac_try;;
9817esac
9818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9819  (eval "$ac_compile") 2>conftest.er1
9820  ac_status=$?
9821  grep -v '^ *+' conftest.er1 >conftest.err
9822  rm -f conftest.er1
9823  cat conftest.err >&5
9824  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9825  (exit $ac_status); } && {
9826	 test -z "$ac_c_werror_flag" ||
9827	 test ! -s conftest.err
9828       } && test -s conftest.$ac_objext; then
9829  tcl_cv_flag__isoc99_source=yes
9830else
9831  echo "$as_me: failed program was:" >&5
9832sed 's/^/| /' conftest.$ac_ext >&5
9833
9834	tcl_cv_flag__isoc99_source=no
9835fi
9836
9837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9838fi
9839
9840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9841fi
9842
9843    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
9844
9845cat >>confdefs.h <<\_ACEOF
9846#define _ISOC99_SOURCE 1
9847_ACEOF
9848
9849	tcl_flags="$tcl_flags _ISOC99_SOURCE"
9850    fi
9851
9852
9853    if test "${tcl_cv_flag__largefile64_source+set}" = set; then
9854  echo $ECHO_N "(cached) $ECHO_C" >&6
9855else
9856  cat >conftest.$ac_ext <<_ACEOF
9857/* confdefs.h.  */
9858_ACEOF
9859cat confdefs.h >>conftest.$ac_ext
9860cat >>conftest.$ac_ext <<_ACEOF
9861/* end confdefs.h.  */
9862#include <sys/stat.h>
9863int
9864main ()
9865{
9866struct stat64 buf; int i = stat64("/", &buf);
9867  ;
9868  return 0;
9869}
9870_ACEOF
9871rm -f conftest.$ac_objext
9872if { (ac_try="$ac_compile"
9873case "(($ac_try" in
9874  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9875  *) ac_try_echo=$ac_try;;
9876esac
9877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9878  (eval "$ac_compile") 2>conftest.er1
9879  ac_status=$?
9880  grep -v '^ *+' conftest.er1 >conftest.err
9881  rm -f conftest.er1
9882  cat conftest.err >&5
9883  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9884  (exit $ac_status); } && {
9885	 test -z "$ac_c_werror_flag" ||
9886	 test ! -s conftest.err
9887       } && test -s conftest.$ac_objext; then
9888  tcl_cv_flag__largefile64_source=no
9889else
9890  echo "$as_me: failed program was:" >&5
9891sed 's/^/| /' conftest.$ac_ext >&5
9892
9893	cat >conftest.$ac_ext <<_ACEOF
9894/* confdefs.h.  */
9895_ACEOF
9896cat confdefs.h >>conftest.$ac_ext
9897cat >>conftest.$ac_ext <<_ACEOF
9898/* end confdefs.h.  */
9899#define _LARGEFILE64_SOURCE 1
9900#include <sys/stat.h>
9901int
9902main ()
9903{
9904struct stat64 buf; int i = stat64("/", &buf);
9905  ;
9906  return 0;
9907}
9908_ACEOF
9909rm -f conftest.$ac_objext
9910if { (ac_try="$ac_compile"
9911case "(($ac_try" in
9912  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9913  *) ac_try_echo=$ac_try;;
9914esac
9915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9916  (eval "$ac_compile") 2>conftest.er1
9917  ac_status=$?
9918  grep -v '^ *+' conftest.er1 >conftest.err
9919  rm -f conftest.er1
9920  cat conftest.err >&5
9921  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9922  (exit $ac_status); } && {
9923	 test -z "$ac_c_werror_flag" ||
9924	 test ! -s conftest.err
9925       } && test -s conftest.$ac_objext; then
9926  tcl_cv_flag__largefile64_source=yes
9927else
9928  echo "$as_me: failed program was:" >&5
9929sed 's/^/| /' conftest.$ac_ext >&5
9930
9931	tcl_cv_flag__largefile64_source=no
9932fi
9933
9934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9935fi
9936
9937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9938fi
9939
9940    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
9941
9942cat >>confdefs.h <<\_ACEOF
9943#define _LARGEFILE64_SOURCE 1
9944_ACEOF
9945
9946	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
9947    fi
9948
9949
9950    if test "${tcl_cv_flag__largefile_source64+set}" = set; then
9951  echo $ECHO_N "(cached) $ECHO_C" >&6
9952else
9953  cat >conftest.$ac_ext <<_ACEOF
9954/* confdefs.h.  */
9955_ACEOF
9956cat confdefs.h >>conftest.$ac_ext
9957cat >>conftest.$ac_ext <<_ACEOF
9958/* end confdefs.h.  */
9959#include <sys/stat.h>
9960int
9961main ()
9962{
9963char *p = (char *)open64;
9964  ;
9965  return 0;
9966}
9967_ACEOF
9968rm -f conftest.$ac_objext
9969if { (ac_try="$ac_compile"
9970case "(($ac_try" in
9971  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9972  *) ac_try_echo=$ac_try;;
9973esac
9974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9975  (eval "$ac_compile") 2>conftest.er1
9976  ac_status=$?
9977  grep -v '^ *+' conftest.er1 >conftest.err
9978  rm -f conftest.er1
9979  cat conftest.err >&5
9980  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9981  (exit $ac_status); } && {
9982	 test -z "$ac_c_werror_flag" ||
9983	 test ! -s conftest.err
9984       } && test -s conftest.$ac_objext; then
9985  tcl_cv_flag__largefile_source64=no
9986else
9987  echo "$as_me: failed program was:" >&5
9988sed 's/^/| /' conftest.$ac_ext >&5
9989
9990	cat >conftest.$ac_ext <<_ACEOF
9991/* confdefs.h.  */
9992_ACEOF
9993cat confdefs.h >>conftest.$ac_ext
9994cat >>conftest.$ac_ext <<_ACEOF
9995/* end confdefs.h.  */
9996#define _LARGEFILE_SOURCE64 1
9997#include <sys/stat.h>
9998int
9999main ()
10000{
10001char *p = (char *)open64;
10002  ;
10003  return 0;
10004}
10005_ACEOF
10006rm -f conftest.$ac_objext
10007if { (ac_try="$ac_compile"
10008case "(($ac_try" in
10009  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10010  *) ac_try_echo=$ac_try;;
10011esac
10012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10013  (eval "$ac_compile") 2>conftest.er1
10014  ac_status=$?
10015  grep -v '^ *+' conftest.er1 >conftest.err
10016  rm -f conftest.er1
10017  cat conftest.err >&5
10018  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10019  (exit $ac_status); } && {
10020	 test -z "$ac_c_werror_flag" ||
10021	 test ! -s conftest.err
10022       } && test -s conftest.$ac_objext; then
10023  tcl_cv_flag__largefile_source64=yes
10024else
10025  echo "$as_me: failed program was:" >&5
10026sed 's/^/| /' conftest.$ac_ext >&5
10027
10028	tcl_cv_flag__largefile_source64=no
10029fi
10030
10031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10032fi
10033
10034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10035fi
10036
10037    if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then
10038
10039cat >>confdefs.h <<\_ACEOF
10040#define _LARGEFILE_SOURCE64 1
10041_ACEOF
10042
10043	tcl_flags="$tcl_flags _LARGEFILE_SOURCE64"
10044    fi
10045
10046    if test "x${tcl_flags}" = "x" ; then
10047	{ echo "$as_me:$LINENO: result: none" >&5
10048echo "${ECHO_T}none" >&6; }
10049    else
10050	{ echo "$as_me:$LINENO: result: ${tcl_flags}" >&5
10051echo "${ECHO_T}${tcl_flags}" >&6; }
10052    fi
10053
10054
10055    { echo "$as_me:$LINENO: checking for 64-bit integer type" >&5
10056echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6; }
10057    if test "${tcl_cv_type_64bit+set}" = set; then
10058  echo $ECHO_N "(cached) $ECHO_C" >&6
10059else
10060
10061	tcl_cv_type_64bit=none
10062	# See if the compiler knows natively about __int64
10063	cat >conftest.$ac_ext <<_ACEOF
10064/* confdefs.h.  */
10065_ACEOF
10066cat confdefs.h >>conftest.$ac_ext
10067cat >>conftest.$ac_ext <<_ACEOF
10068/* end confdefs.h.  */
10069
10070int
10071main ()
10072{
10073__int64 value = (__int64) 0;
10074  ;
10075  return 0;
10076}
10077_ACEOF
10078rm -f conftest.$ac_objext
10079if { (ac_try="$ac_compile"
10080case "(($ac_try" in
10081  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10082  *) ac_try_echo=$ac_try;;
10083esac
10084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10085  (eval "$ac_compile") 2>conftest.er1
10086  ac_status=$?
10087  grep -v '^ *+' conftest.er1 >conftest.err
10088  rm -f conftest.er1
10089  cat conftest.err >&5
10090  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10091  (exit $ac_status); } && {
10092	 test -z "$ac_c_werror_flag" ||
10093	 test ! -s conftest.err
10094       } && test -s conftest.$ac_objext; then
10095  tcl_type_64bit=__int64
10096else
10097  echo "$as_me: failed program was:" >&5
10098sed 's/^/| /' conftest.$ac_ext >&5
10099
10100	tcl_type_64bit="long long"
10101fi
10102
10103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10104	# See if we should use long anyway  Note that we substitute in the
10105	# type that is our current guess for a 64-bit type inside this check
10106	# program, so it should be modified only carefully...
10107        cat >conftest.$ac_ext <<_ACEOF
10108/* confdefs.h.  */
10109_ACEOF
10110cat confdefs.h >>conftest.$ac_ext
10111cat >>conftest.$ac_ext <<_ACEOF
10112/* end confdefs.h.  */
10113
10114int
10115main ()
10116{
10117switch (0) {
10118            case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
10119        }
10120  ;
10121  return 0;
10122}
10123_ACEOF
10124rm -f conftest.$ac_objext
10125if { (ac_try="$ac_compile"
10126case "(($ac_try" in
10127  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10128  *) ac_try_echo=$ac_try;;
10129esac
10130eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10131  (eval "$ac_compile") 2>conftest.er1
10132  ac_status=$?
10133  grep -v '^ *+' conftest.er1 >conftest.err
10134  rm -f conftest.er1
10135  cat conftest.err >&5
10136  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10137  (exit $ac_status); } && {
10138	 test -z "$ac_c_werror_flag" ||
10139	 test ! -s conftest.err
10140       } && test -s conftest.$ac_objext; then
10141  tcl_cv_type_64bit=${tcl_type_64bit}
10142else
10143  echo "$as_me: failed program was:" >&5
10144sed 's/^/| /' conftest.$ac_ext >&5
10145
10146
10147fi
10148
10149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10150fi
10151
10152    if test "${tcl_cv_type_64bit}" = none ; then
10153
10154cat >>confdefs.h <<\_ACEOF
10155#define TCL_WIDE_INT_IS_LONG 1
10156_ACEOF
10157
10158	{ echo "$as_me:$LINENO: result: using long" >&5
10159echo "${ECHO_T}using long" >&6; }
10160    elif test "${tcl_cv_type_64bit}" = "__int64" \
10161		-a "${TEA_PLATFORM}" = "windows" ; then
10162	# TEA specific: We actually want to use the default tcl.h checks in
10163	# this case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER*
10164	{ echo "$as_me:$LINENO: result: using Tcl header defaults" >&5
10165echo "${ECHO_T}using Tcl header defaults" >&6; }
10166    else
10167
10168cat >>confdefs.h <<_ACEOF
10169#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
10170_ACEOF
10171
10172	{ echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5
10173echo "${ECHO_T}${tcl_cv_type_64bit}" >&6; }
10174
10175	# Now check for auxiliary declarations
10176	{ echo "$as_me:$LINENO: checking for struct dirent64" >&5
10177echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6; }
10178if test "${tcl_cv_struct_dirent64+set}" = set; then
10179  echo $ECHO_N "(cached) $ECHO_C" >&6
10180else
10181
10182	    cat >conftest.$ac_ext <<_ACEOF
10183/* confdefs.h.  */
10184_ACEOF
10185cat confdefs.h >>conftest.$ac_ext
10186cat >>conftest.$ac_ext <<_ACEOF
10187/* end confdefs.h.  */
10188#include <sys/types.h>
10189#include <sys/dirent.h>
10190int
10191main ()
10192{
10193struct dirent64 p;
10194  ;
10195  return 0;
10196}
10197_ACEOF
10198rm -f conftest.$ac_objext
10199if { (ac_try="$ac_compile"
10200case "(($ac_try" in
10201  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10202  *) ac_try_echo=$ac_try;;
10203esac
10204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10205  (eval "$ac_compile") 2>conftest.er1
10206  ac_status=$?
10207  grep -v '^ *+' conftest.er1 >conftest.err
10208  rm -f conftest.er1
10209  cat conftest.err >&5
10210  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10211  (exit $ac_status); } && {
10212	 test -z "$ac_c_werror_flag" ||
10213	 test ! -s conftest.err
10214       } && test -s conftest.$ac_objext; then
10215  tcl_cv_struct_dirent64=yes
10216else
10217  echo "$as_me: failed program was:" >&5
10218sed 's/^/| /' conftest.$ac_ext >&5
10219
10220	tcl_cv_struct_dirent64=no
10221fi
10222
10223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10224fi
10225{ echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5
10226echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6; }
10227	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
10228
10229cat >>confdefs.h <<\_ACEOF
10230#define HAVE_STRUCT_DIRENT64 1
10231_ACEOF
10232
10233	fi
10234
10235	{ echo "$as_me:$LINENO: checking for struct stat64" >&5
10236echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6; }
10237if test "${tcl_cv_struct_stat64+set}" = set; then
10238  echo $ECHO_N "(cached) $ECHO_C" >&6
10239else
10240
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 <sys/stat.h>
10248int
10249main ()
10250{
10251struct stat64 p;
10252
10253  ;
10254  return 0;
10255}
10256_ACEOF
10257rm -f conftest.$ac_objext
10258if { (ac_try="$ac_compile"
10259case "(($ac_try" in
10260  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10261  *) ac_try_echo=$ac_try;;
10262esac
10263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10264  (eval "$ac_compile") 2>conftest.er1
10265  ac_status=$?
10266  grep -v '^ *+' conftest.er1 >conftest.err
10267  rm -f conftest.er1
10268  cat conftest.err >&5
10269  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10270  (exit $ac_status); } && {
10271	 test -z "$ac_c_werror_flag" ||
10272	 test ! -s conftest.err
10273       } && test -s conftest.$ac_objext; then
10274  tcl_cv_struct_stat64=yes
10275else
10276  echo "$as_me: failed program was:" >&5
10277sed 's/^/| /' conftest.$ac_ext >&5
10278
10279	tcl_cv_struct_stat64=no
10280fi
10281
10282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10283fi
10284{ echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5
10285echo "${ECHO_T}$tcl_cv_struct_stat64" >&6; }
10286	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
10287
10288cat >>confdefs.h <<\_ACEOF
10289#define HAVE_STRUCT_STAT64 1
10290_ACEOF
10291
10292	fi
10293
10294
10295
10296for ac_func in open64 lseek64
10297do
10298as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10299{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10300echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10301if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
10302  echo $ECHO_N "(cached) $ECHO_C" >&6
10303else
10304  cat >conftest.$ac_ext <<_ACEOF
10305/* confdefs.h.  */
10306_ACEOF
10307cat confdefs.h >>conftest.$ac_ext
10308cat >>conftest.$ac_ext <<_ACEOF
10309/* end confdefs.h.  */
10310/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10311   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10312#define $ac_func innocuous_$ac_func
10313
10314/* System header to define __stub macros and hopefully few prototypes,
10315    which can conflict with char $ac_func (); below.
10316    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10317    <limits.h> exists even on freestanding compilers.  */
10318
10319#ifdef __STDC__
10320# include <limits.h>
10321#else
10322# include <assert.h>
10323#endif
10324
10325#undef $ac_func
10326
10327/* Override any GCC internal prototype to avoid an error.
10328   Use char because int might match the return type of a GCC
10329   builtin and then its argument prototype would still apply.  */
10330#ifdef __cplusplus
10331extern "C"
10332#endif
10333char $ac_func ();
10334/* The GNU C library defines this for functions which it implements
10335    to always fail with ENOSYS.  Some functions are actually named
10336    something starting with __ and the normal name is an alias.  */
10337#if defined __stub_$ac_func || defined __stub___$ac_func
10338choke me
10339#endif
10340
10341int
10342main ()
10343{
10344return $ac_func ();
10345  ;
10346  return 0;
10347}
10348_ACEOF
10349rm -f conftest.$ac_objext conftest$ac_exeext
10350if { (ac_try="$ac_link"
10351case "(($ac_try" in
10352  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10353  *) ac_try_echo=$ac_try;;
10354esac
10355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10356  (eval "$ac_link") 2>conftest.er1
10357  ac_status=$?
10358  grep -v '^ *+' conftest.er1 >conftest.err
10359  rm -f conftest.er1
10360  cat conftest.err >&5
10361  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10362  (exit $ac_status); } && {
10363	 test -z "$ac_c_werror_flag" ||
10364	 test ! -s conftest.err
10365       } && test -s conftest$ac_exeext &&
10366       $as_test_x conftest$ac_exeext; then
10367  eval "$as_ac_var=yes"
10368else
10369  echo "$as_me: failed program was:" >&5
10370sed 's/^/| /' conftest.$ac_ext >&5
10371
10372	eval "$as_ac_var=no"
10373fi
10374
10375rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10376      conftest$ac_exeext conftest.$ac_ext
10377fi
10378ac_res=`eval echo '${'$as_ac_var'}'`
10379	       { echo "$as_me:$LINENO: result: $ac_res" >&5
10380echo "${ECHO_T}$ac_res" >&6; }
10381if test `eval echo '${'$as_ac_var'}'` = yes; then
10382  cat >>confdefs.h <<_ACEOF
10383#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10384_ACEOF
10385
10386fi
10387done
10388
10389	{ echo "$as_me:$LINENO: checking for off64_t" >&5
10390echo $ECHO_N "checking for off64_t... $ECHO_C" >&6; }
10391	if test "${tcl_cv_type_off64_t+set}" = set; then
10392  echo $ECHO_N "(cached) $ECHO_C" >&6
10393else
10394
10395	    cat >conftest.$ac_ext <<_ACEOF
10396/* confdefs.h.  */
10397_ACEOF
10398cat confdefs.h >>conftest.$ac_ext
10399cat >>conftest.$ac_ext <<_ACEOF
10400/* end confdefs.h.  */
10401#include <sys/types.h>
10402int
10403main ()
10404{
10405off64_t offset;
10406
10407  ;
10408  return 0;
10409}
10410_ACEOF
10411rm -f conftest.$ac_objext
10412if { (ac_try="$ac_compile"
10413case "(($ac_try" in
10414  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10415  *) ac_try_echo=$ac_try;;
10416esac
10417eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10418  (eval "$ac_compile") 2>conftest.er1
10419  ac_status=$?
10420  grep -v '^ *+' conftest.er1 >conftest.err
10421  rm -f conftest.er1
10422  cat conftest.err >&5
10423  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10424  (exit $ac_status); } && {
10425	 test -z "$ac_c_werror_flag" ||
10426	 test ! -s conftest.err
10427       } && test -s conftest.$ac_objext; then
10428  tcl_cv_type_off64_t=yes
10429else
10430  echo "$as_me: failed program was:" >&5
10431sed 's/^/| /' conftest.$ac_ext >&5
10432
10433	tcl_cv_type_off64_t=no
10434fi
10435
10436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10437fi
10438
10439			if test "x${tcl_cv_type_off64_t}" = "xyes" && \
10440	        test "x${ac_cv_func_lseek64}" = "xyes" && \
10441	        test "x${ac_cv_func_open64}" = "xyes" ; then
10442
10443cat >>confdefs.h <<\_ACEOF
10444#define HAVE_TYPE_OFF64_T 1
10445_ACEOF
10446
10447	    { echo "$as_me:$LINENO: result: yes" >&5
10448echo "${ECHO_T}yes" >&6; }
10449	else
10450	    { echo "$as_me:$LINENO: result: no" >&5
10451echo "${ECHO_T}no" >&6; }
10452	fi
10453    fi
10454
10455
10456
10457#--------------------------------------------------------------------
10458# Set the default compiler switches based on the --enable-symbols option.
10459#--------------------------------------------------------------------
10460
10461
10462
10463    { echo "$as_me:$LINENO: checking for build with symbols" >&5
10464echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6; }
10465    # Check whether --enable-symbols was given.
10466if test "${enable_symbols+set}" = set; then
10467  enableval=$enable_symbols; tcl_ok=$enableval
10468else
10469  tcl_ok=no
10470fi
10471
10472    DBGX=""
10473    if test "$tcl_ok" = "no"; then
10474	CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}"
10475	LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
10476	{ echo "$as_me:$LINENO: result: no" >&5
10477echo "${ECHO_T}no" >&6; }
10478    else
10479	CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
10480	LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
10481	if test "$tcl_ok" = "yes"; then
10482	    { echo "$as_me:$LINENO: result: yes (standard debugging)" >&5
10483echo "${ECHO_T}yes (standard debugging)" >&6; }
10484	fi
10485    fi
10486    # TEA specific:
10487    if test "${TEA_PLATFORM}" != "windows" ; then
10488	LDFLAGS_DEFAULT="${LDFLAGS}"
10489    fi
10490
10491
10492
10493
10494    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
10495
10496cat >>confdefs.h <<\_ACEOF
10497#define TCL_MEM_DEBUG 1
10498_ACEOF
10499
10500    fi
10501
10502    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
10503	if test "$tcl_ok" = "all"; then
10504	    { echo "$as_me:$LINENO: result: enabled symbols mem debugging" >&5
10505echo "${ECHO_T}enabled symbols mem debugging" >&6; }
10506	else
10507	    { echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5
10508echo "${ECHO_T}enabled $tcl_ok debugging" >&6; }
10509	fi
10510    fi
10511
10512
10513#--------------------------------------------------------------------
10514# For Unix/Tk builds, make sure that the X libraries/headers are found.
10515# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS.
10516#--------------------------------------------------------------------
10517
10518# See [Bug #82910]
10519#TEA_PATH_X
10520
10521#--------------------------------------------------------------------
10522# Everyone should be linking against the Tcl stub library.  If you
10523# can't for some reason, remove this definition.  If you aren't using
10524# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
10525# link against the non-stubbed Tcl library.
10526#--------------------------------------------------------------------
10527
10528cat >>confdefs.h <<\_ACEOF
10529#define USE_TCL_STUBS 1
10530_ACEOF
10531
10532
10533#--------------------------------------------------------------------
10534# This macro generates a line to use when building a library.  It
10535# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
10536# and TEA_LOAD_TCLCONFIG macros above.
10537#--------------------------------------------------------------------
10538
10539
10540    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
10541	MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(PKG_OBJECTS)"
10542	MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\$@ \$(PKG_OBJECTS)"
10543	cat >conftest.$ac_ext <<_ACEOF
10544/* confdefs.h.  */
10545_ACEOF
10546cat confdefs.h >>conftest.$ac_ext
10547cat >>conftest.$ac_ext <<_ACEOF
10548/* end confdefs.h.  */
10549
10550#if defined(_MSC_VER) && _MSC_VER >= 1400
10551print("manifest needed")
10552#endif
10553
10554_ACEOF
10555if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10556  $EGREP "manifest needed" >/dev/null 2>&1; then
10557
10558	# Could do a CHECK_PROG for mt, but should always be with MSVC8+
10559	VC_MANIFEST_EMBED_DLL="mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;2"
10560	VC_MANIFEST_EMBED_EXE="mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;1"
10561	MAKE_SHARED_LIB="${MAKE_SHARED_LIB} ; ${VC_MANIFEST_EMBED_DLL}"
10562
10563    CLEANFILES="$CLEANFILES *.manifest"
10564
10565
10566fi
10567rm -f -r conftest*
10568
10569	MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(PKG_STUB_OBJECTS)"
10570    else
10571	MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(PKG_OBJECTS)"
10572	MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
10573	MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(PKG_STUB_OBJECTS)"
10574    fi
10575
10576    if test "${SHARED_BUILD}" = "1" ; then
10577	MAKE_LIB="${MAKE_SHARED_LIB} "
10578    else
10579	MAKE_LIB="${MAKE_STATIC_LIB} "
10580    fi
10581
10582    #--------------------------------------------------------------------
10583    # Shared libraries and static libraries have different names.
10584    # Use the double eval to make sure any variables in the suffix is
10585    # substituted. (@@@ Might not be necessary anymore)
10586    #--------------------------------------------------------------------
10587
10588    if test "${TEA_PLATFORM}" = "windows" ; then
10589	if test "${SHARED_BUILD}" = "1" ; then
10590	    # We force the unresolved linking of symbols that are really in
10591	    # the private libraries of Tcl and Tk.
10592	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
10593	    if test x"${TK_BIN_DIR}" != x ; then
10594		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
10595	    fi
10596	    eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
10597	else
10598	    eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
10599	fi
10600	# Some packages build their own stubs libraries
10601	eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
10602	if test "$GCC" = "yes"; then
10603	    PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
10604	fi
10605	# These aren't needed on Windows (either MSVC or gcc)
10606	RANLIB=:
10607	RANLIB_STUB=:
10608    else
10609	RANLIB_STUB="${RANLIB}"
10610	if test "${SHARED_BUILD}" = "1" ; then
10611	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
10612	    if test x"${TK_BIN_DIR}" != x ; then
10613		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
10614	    fi
10615	    eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
10616	    RANLIB=:
10617	else
10618	    eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
10619	fi
10620	# Some packages build their own stubs libraries
10621	eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
10622    fi
10623
10624    # These are escaped so that only CFLAGS is picked up at configure time.
10625    # The other values will be substituted at make time.
10626    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
10627    if test "${SHARED_BUILD}" = "1" ; then
10628	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
10629    fi
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640#--------------------------------------------------------------------
10641# __CHANGE__
10642# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
10643#--------------------------------------------------------------------
10644
10645if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
10646
10647    vars="user32.lib"
10648    for i in $vars; do
10649	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
10650	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
10651	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
10652	fi
10653	PKG_LIBS="$PKG_LIBS $i"
10654    done
10655
10656
10657else
10658
10659    vars="-lm"
10660    for i in $vars; do
10661	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
10662	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
10663	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
10664	fi
10665	PKG_LIBS="$PKG_LIBS $i"
10666    done
10667
10668
10669fi
10670
10671#--------------------------------------------------------------------
10672# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
10673# file during the install process.  Don't run the TCLSH_PROG through
10674# ${CYGPATH} because it's being used directly by make.
10675# Require that we use a tclsh shell version 8.2 or later since earlier
10676# versions have bugs in the pkg_mkIndex routine.
10677# Add WISH as well if this is a Tk extension.
10678#--------------------------------------------------------------------
10679
10680
10681    { echo "$as_me:$LINENO: checking for tclsh" >&5
10682echo $ECHO_N "checking for tclsh... $ECHO_C" >&6; }
10683    if test -f "${TCL_BIN_DIR}/Makefile" ; then
10684        # tclConfig.sh is in Tcl build directory
10685        if test "${TEA_PLATFORM}" = "windows"; then
10686            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
10687        else
10688            TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
10689        fi
10690    else
10691        # tclConfig.sh is in install location
10692        if test "${TEA_PLATFORM}" = "windows"; then
10693            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
10694        else
10695            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}"
10696        fi
10697        list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
10698              `ls -d ${TCL_BIN_DIR}/..     2>/dev/null` \
10699              `ls -d ${TCL_PREFIX}/bin     2>/dev/null`"
10700        for i in $list ; do
10701            if test -f "$i/${TCLSH_PROG}" ; then
10702                REAL_TCL_BIN_DIR="`cd "$i"; pwd`/"
10703                break
10704            fi
10705        done
10706        TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}"
10707    fi
10708    { echo "$as_me:$LINENO: result: ${TCLSH_PROG}" >&5
10709echo "${ECHO_T}${TCLSH_PROG}" >&6; }
10710
10711
10712
10713    #--------------------------------------------------------------------
10714    # These are for tifftclConfig.sh
10715    #--------------------------------------------------------------------
10716
10717    # pkglibdir must be a fully qualified path and (not ${exec_prefix}/lib)
10718    eval pkglibdir="${libdir}/tifftcl${PACKAGE_VERSION}"
10719    if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
10720	eval tifftcl_LIB_FLAG="-ltifftcl${PACKAGE_VERSION}${DBGX}"
10721	eval tifftcl_STUB_LIB_FLAG="-ltifftclstub${PACKAGE_VERSION}${DBGX}"
10722    else
10723	eval tifftcl_LIB_FLAG="-ltifftcl`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}"
10724	eval tifftcl_STUB_LIB_FLAG="-ltifftclstub`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}"
10725    fi
10726    tifftcl_BUILD_LIB_SPEC="-L`pwd` ${tifftcl_LIB_FLAG}"
10727    tifftcl_LIB_SPEC="-L${pkglibdir} ${tifftcl_LIB_FLAG}"
10728    tifftcl_BUILD_STUB_LIB_SPEC="-L`pwd` ${tifftcl_STUB_LIB_FLAG}"
10729    tifftcl_STUB_LIB_SPEC="-L${pkglibdir} ${tifftcl_STUB_LIB_FLAG}"
10730    tifftcl_BUILD_STUB_LIB_PATH="`pwd`/${PKG_STUB_LIB_FILE}"
10731    tifftcl_STUB_LIB_PATH="${pkglibdir}/${PKG_STUB_LIB_FILE}"
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745#--------------------------------------------------------------------
10746# Finally, substitute all of the various values into the Makefile.
10747# You may alternatively have a special pkgIndex.tcl.in or other files
10748# which require substituting th AC variables in.  Include these here.
10749#--------------------------------------------------------------------
10750
10751ac_config_files="$ac_config_files Makefile tifftclConfig.sh"
10752
10753cat >confcache <<\_ACEOF
10754# This file is a shell script that caches the results of configure
10755# tests run on this system so they can be shared between configure
10756# scripts and configure runs, see configure's option --config-cache.
10757# It is not useful on other systems.  If it contains results you don't
10758# want to keep, you may remove or edit it.
10759#
10760# config.status only pays attention to the cache file if you give it
10761# the --recheck option to rerun configure.
10762#
10763# `ac_cv_env_foo' variables (set or unset) will be overridden when
10764# loading this file, other *unset* `ac_cv_foo' will be assigned the
10765# following values.
10766
10767_ACEOF
10768
10769# The following way of writing the cache mishandles newlines in values,
10770# but we know of no workaround that is simple, portable, and efficient.
10771# So, we kill variables containing newlines.
10772# Ultrix sh set writes to stderr and can't be redirected directly,
10773# and sets the high bit in the cache file unless we assign to the vars.
10774(
10775  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
10776    eval ac_val=\$$ac_var
10777    case $ac_val in #(
10778    *${as_nl}*)
10779      case $ac_var in #(
10780      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
10781echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
10782      esac
10783      case $ac_var in #(
10784      _ | IFS | as_nl) ;; #(
10785      *) $as_unset $ac_var ;;
10786      esac ;;
10787    esac
10788  done
10789
10790  (set) 2>&1 |
10791    case $as_nl`(ac_space=' '; set) 2>&1` in #(
10792    *${as_nl}ac_space=\ *)
10793      # `set' does not quote correctly, so add quotes (double-quote
10794      # substitution turns \\\\ into \\, and sed turns \\ into \).
10795      sed -n \
10796	"s/'/'\\\\''/g;
10797	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
10798      ;; #(
10799    *)
10800      # `set' quotes correctly as required by POSIX, so do not add quotes.
10801      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
10802      ;;
10803    esac |
10804    sort
10805) |
10806  sed '
10807     /^ac_cv_env_/b end
10808     t clear
10809     :clear
10810     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
10811     t end
10812     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
10813     :end' >>confcache
10814if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
10815  if test -w "$cache_file"; then
10816    test "x$cache_file" != "x/dev/null" &&
10817      { echo "$as_me:$LINENO: updating cache $cache_file" >&5
10818echo "$as_me: updating cache $cache_file" >&6;}
10819    cat confcache >$cache_file
10820  else
10821    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
10822echo "$as_me: not updating unwritable cache $cache_file" >&6;}
10823  fi
10824fi
10825rm -f confcache
10826
10827test "x$prefix" = xNONE && prefix=$ac_default_prefix
10828# Let make expand exec_prefix.
10829test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10830
10831# Transform confdefs.h into DEFS.
10832# Protect against shell expansion while executing Makefile rules.
10833# Protect against Makefile macro expansion.
10834#
10835# If the first sed substitution is executed (which looks for macros that
10836# take arguments), then branch to the quote section.  Otherwise,
10837# look for a macro that doesn't take arguments.
10838ac_script='
10839t clear
10840:clear
10841s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
10842t quote
10843s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
10844t quote
10845b any
10846:quote
10847s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
10848s/\[/\\&/g
10849s/\]/\\&/g
10850s/\$/$$/g
10851H
10852:any
10853${
10854	g
10855	s/^\n//
10856	s/\n/ /g
10857	p
10858}
10859'
10860DEFS=`sed -n "$ac_script" confdefs.h`
10861
10862
10863ac_libobjs=
10864ac_ltlibobjs=
10865for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
10866  # 1. Remove the extension, and $U if already installed.
10867  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
10868  ac_i=`echo "$ac_i" | sed "$ac_script"`
10869  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
10870  #    will be set to the directory where LIBOBJS objects are built.
10871  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
10872  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
10873done
10874LIBOBJS=$ac_libobjs
10875
10876LTLIBOBJS=$ac_ltlibobjs
10877
10878
10879CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""
10880
10881: ${CONFIG_STATUS=./config.status}
10882ac_clean_files_save=$ac_clean_files
10883ac_clean_files="$ac_clean_files $CONFIG_STATUS"
10884{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
10885echo "$as_me: creating $CONFIG_STATUS" >&6;}
10886cat >$CONFIG_STATUS <<_ACEOF
10887#! $SHELL
10888# Generated by $as_me.
10889# Run this file to recreate the current configuration.
10890# Compiler output produced by configure, useful for debugging
10891# configure, is in config.log if it exists.
10892
10893debug=false
10894ac_cs_recheck=false
10895ac_cs_silent=false
10896SHELL=\${CONFIG_SHELL-$SHELL}
10897_ACEOF
10898
10899cat >>$CONFIG_STATUS <<\_ACEOF
10900## --------------------- ##
10901## M4sh Initialization.  ##
10902## --------------------- ##
10903
10904# Be more Bourne compatible
10905DUALCASE=1; export DUALCASE # for MKS sh
10906if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
10907  emulate sh
10908  NULLCMD=:
10909  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
10910  # is contrary to our usage.  Disable this feature.
10911  alias -g '${1+"$@"}'='"$@"'
10912  setopt NO_GLOB_SUBST
10913else
10914  case `(set -o) 2>/dev/null` in
10915  *posix*) set -o posix ;;
10916esac
10917
10918fi
10919
10920
10921
10922
10923# PATH needs CR
10924# Avoid depending upon Character Ranges.
10925as_cr_letters='abcdefghijklmnopqrstuvwxyz'
10926as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
10927as_cr_Letters=$as_cr_letters$as_cr_LETTERS
10928as_cr_digits='0123456789'
10929as_cr_alnum=$as_cr_Letters$as_cr_digits
10930
10931# The user is always right.
10932if test "${PATH_SEPARATOR+set}" != set; then
10933  echo "#! /bin/sh" >conf$$.sh
10934  echo  "exit 0"   >>conf$$.sh
10935  chmod +x conf$$.sh
10936  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10937    PATH_SEPARATOR=';'
10938  else
10939    PATH_SEPARATOR=:
10940  fi
10941  rm -f conf$$.sh
10942fi
10943
10944# Support unset when possible.
10945if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
10946  as_unset=unset
10947else
10948  as_unset=false
10949fi
10950
10951
10952# IFS
10953# We need space, tab and new line, in precisely that order.  Quoting is
10954# there to prevent editors from complaining about space-tab.
10955# (If _AS_PATH_WALK were called with IFS unset, it would disable word
10956# splitting by setting IFS to empty value.)
10957as_nl='
10958'
10959IFS=" ""	$as_nl"
10960
10961# Find who we are.  Look in the path if we contain no directory separator.
10962case $0 in
10963  *[\\/]* ) as_myself=$0 ;;
10964  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10965for as_dir in $PATH
10966do
10967  IFS=$as_save_IFS
10968  test -z "$as_dir" && as_dir=.
10969  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
10970done
10971IFS=$as_save_IFS
10972
10973     ;;
10974esac
10975# We did not find ourselves, most probably we were run as `sh COMMAND'
10976# in which case we are not to be found in the path.
10977if test "x$as_myself" = x; then
10978  as_myself=$0
10979fi
10980if test ! -f "$as_myself"; then
10981  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
10982  { (exit 1); exit 1; }
10983fi
10984
10985# Work around bugs in pre-3.0 UWIN ksh.
10986for as_var in ENV MAIL MAILPATH
10987do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
10988done
10989PS1='$ '
10990PS2='> '
10991PS4='+ '
10992
10993# NLS nuisances.
10994for as_var in \
10995  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
10996  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
10997  LC_TELEPHONE LC_TIME
10998do
10999  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
11000    eval $as_var=C; export $as_var
11001  else
11002    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
11003  fi
11004done
11005
11006# Required to use basename.
11007if expr a : '\(a\)' >/dev/null 2>&1 &&
11008   test "X`expr 00001 : '.*\(...\)'`" = X001; then
11009  as_expr=expr
11010else
11011  as_expr=false
11012fi
11013
11014if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
11015  as_basename=basename
11016else
11017  as_basename=false
11018fi
11019
11020
11021# Name of the executable.
11022as_me=`$as_basename -- "$0" ||
11023$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
11024	 X"$0" : 'X\(//\)$' \| \
11025	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
11026echo X/"$0" |
11027    sed '/^.*\/\([^/][^/]*\)\/*$/{
11028	    s//\1/
11029	    q
11030	  }
11031	  /^X\/\(\/\/\)$/{
11032	    s//\1/
11033	    q
11034	  }
11035	  /^X\/\(\/\).*/{
11036	    s//\1/
11037	    q
11038	  }
11039	  s/.*/./; q'`
11040
11041# CDPATH.
11042$as_unset CDPATH
11043
11044
11045
11046  as_lineno_1=$LINENO
11047  as_lineno_2=$LINENO
11048  test "x$as_lineno_1" != "x$as_lineno_2" &&
11049  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
11050
11051  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
11052  # uniformly replaced by the line number.  The first 'sed' inserts a
11053  # line-number line after each line using $LINENO; the second 'sed'
11054  # does the real work.  The second script uses 'N' to pair each
11055  # line-number line with the line containing $LINENO, and appends
11056  # trailing '-' during substitution so that $LINENO is not a special
11057  # case at line end.
11058  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
11059  # scripts with optimization help from Paolo Bonzini.  Blame Lee
11060  # E. McMahon (1931-1989) for sed's syntax.  :-)
11061  sed -n '
11062    p
11063    /[$]LINENO/=
11064  ' <$as_myself |
11065    sed '
11066      s/[$]LINENO.*/&-/
11067      t lineno
11068      b
11069      :lineno
11070      N
11071      :loop
11072      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
11073      t loop
11074      s/-\n.*//
11075    ' >$as_me.lineno &&
11076  chmod +x "$as_me.lineno" ||
11077    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
11078   { (exit 1); exit 1; }; }
11079
11080  # Don't try to exec as it changes $[0], causing all sort of problems
11081  # (the dirname of $[0] is not the place where we might find the
11082  # original and so on.  Autoconf is especially sensitive to this).
11083  . "./$as_me.lineno"
11084  # Exit status is that of the last command.
11085  exit
11086}
11087
11088
11089if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
11090  as_dirname=dirname
11091else
11092  as_dirname=false
11093fi
11094
11095ECHO_C= ECHO_N= ECHO_T=
11096case `echo -n x` in
11097-n*)
11098  case `echo 'x\c'` in
11099  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
11100  *)   ECHO_C='\c';;
11101  esac;;
11102*)
11103  ECHO_N='-n';;
11104esac
11105
11106if expr a : '\(a\)' >/dev/null 2>&1 &&
11107   test "X`expr 00001 : '.*\(...\)'`" = X001; then
11108  as_expr=expr
11109else
11110  as_expr=false
11111fi
11112
11113rm -f conf$$ conf$$.exe conf$$.file
11114if test -d conf$$.dir; then
11115  rm -f conf$$.dir/conf$$.file
11116else
11117  rm -f conf$$.dir
11118  mkdir conf$$.dir
11119fi
11120echo >conf$$.file
11121if ln -s conf$$.file conf$$ 2>/dev/null; then
11122  as_ln_s='ln -s'
11123  # ... but there are two gotchas:
11124  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
11125  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
11126  # In both cases, we have to default to `cp -p'.
11127  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
11128    as_ln_s='cp -p'
11129elif ln conf$$.file conf$$ 2>/dev/null; then
11130  as_ln_s=ln
11131else
11132  as_ln_s='cp -p'
11133fi
11134rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
11135rmdir conf$$.dir 2>/dev/null
11136
11137if mkdir -p . 2>/dev/null; then
11138  as_mkdir_p=:
11139else
11140  test -d ./-p && rmdir ./-p
11141  as_mkdir_p=false
11142fi
11143
11144if test -x / >/dev/null 2>&1; then
11145  as_test_x='test -x'
11146else
11147  if ls -dL / >/dev/null 2>&1; then
11148    as_ls_L_option=L
11149  else
11150    as_ls_L_option=
11151  fi
11152  as_test_x='
11153    eval sh -c '\''
11154      if test -d "$1"; then
11155        test -d "$1/.";
11156      else
11157	case $1 in
11158        -*)set "./$1";;
11159	esac;
11160	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
11161	???[sx]*):;;*)false;;esac;fi
11162    '\'' sh
11163  '
11164fi
11165as_executable_p=$as_test_x
11166
11167# Sed expression to map a string onto a valid CPP name.
11168as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
11169
11170# Sed expression to map a string onto a valid variable name.
11171as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
11172
11173
11174exec 6>&1
11175
11176# Save the log message, to keep $[0] and so on meaningful, and to
11177# report actual input values of CONFIG_FILES etc. instead of their
11178# values after options handling.
11179ac_log="
11180This file was extended by tifftcl $as_me 3.9.4, which was
11181generated by GNU Autoconf 2.61.  Invocation command line was
11182
11183  CONFIG_FILES    = $CONFIG_FILES
11184  CONFIG_HEADERS  = $CONFIG_HEADERS
11185  CONFIG_LINKS    = $CONFIG_LINKS
11186  CONFIG_COMMANDS = $CONFIG_COMMANDS
11187  $ $0 $@
11188
11189on `(hostname || uname -n) 2>/dev/null | sed 1q`
11190"
11191
11192_ACEOF
11193
11194cat >>$CONFIG_STATUS <<_ACEOF
11195# Files that config.status was made for.
11196config_files="$ac_config_files"
11197
11198_ACEOF
11199
11200cat >>$CONFIG_STATUS <<\_ACEOF
11201ac_cs_usage="\
11202\`$as_me' instantiates files from templates according to the
11203current configuration.
11204
11205Usage: $0 [OPTIONS] [FILE]...
11206
11207  -h, --help       print this help, then exit
11208  -V, --version    print version number and configuration settings, then exit
11209  -q, --quiet      do not print progress messages
11210  -d, --debug      don't remove temporary files
11211      --recheck    update $as_me by reconfiguring in the same conditions
11212  --file=FILE[:TEMPLATE]
11213		   instantiate the configuration file FILE
11214
11215Configuration files:
11216$config_files
11217
11218Report bugs to <bug-autoconf@gnu.org>."
11219
11220_ACEOF
11221cat >>$CONFIG_STATUS <<_ACEOF
11222ac_cs_version="\\
11223tifftcl config.status 3.9.4
11224configured by $0, generated by GNU Autoconf 2.61,
11225  with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
11226
11227Copyright (C) 2006 Free Software Foundation, Inc.
11228This config.status script is free software; the Free Software Foundation
11229gives unlimited permission to copy, distribute and modify it."
11230
11231ac_pwd='$ac_pwd'
11232srcdir='$srcdir'
11233INSTALL='$INSTALL'
11234_ACEOF
11235
11236cat >>$CONFIG_STATUS <<\_ACEOF
11237# If no file are specified by the user, then we need to provide default
11238# value.  By we need to know if files were specified by the user.
11239ac_need_defaults=:
11240while test $# != 0
11241do
11242  case $1 in
11243  --*=*)
11244    ac_option=`expr "X$1" : 'X\([^=]*\)='`
11245    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
11246    ac_shift=:
11247    ;;
11248  *)
11249    ac_option=$1
11250    ac_optarg=$2
11251    ac_shift=shift
11252    ;;
11253  esac
11254
11255  case $ac_option in
11256  # Handling of the options.
11257  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11258    ac_cs_recheck=: ;;
11259  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
11260    echo "$ac_cs_version"; exit ;;
11261  --debug | --debu | --deb | --de | --d | -d )
11262    debug=: ;;
11263  --file | --fil | --fi | --f )
11264    $ac_shift
11265    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
11266    ac_need_defaults=false;;
11267  --he | --h |  --help | --hel | -h )
11268    echo "$ac_cs_usage"; exit ;;
11269  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
11270  | -silent | --silent | --silen | --sile | --sil | --si | --s)
11271    ac_cs_silent=: ;;
11272
11273  # This is an error.
11274  -*) { echo "$as_me: error: unrecognized option: $1
11275Try \`$0 --help' for more information." >&2
11276   { (exit 1); exit 1; }; } ;;
11277
11278  *) ac_config_targets="$ac_config_targets $1"
11279     ac_need_defaults=false ;;
11280
11281  esac
11282  shift
11283done
11284
11285ac_configure_extra_args=
11286
11287if $ac_cs_silent; then
11288  exec 6>/dev/null
11289  ac_configure_extra_args="$ac_configure_extra_args --silent"
11290fi
11291
11292_ACEOF
11293cat >>$CONFIG_STATUS <<_ACEOF
11294if \$ac_cs_recheck; then
11295  echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
11296  CONFIG_SHELL=$SHELL
11297  export CONFIG_SHELL
11298  exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
11299fi
11300
11301_ACEOF
11302cat >>$CONFIG_STATUS <<\_ACEOF
11303exec 5>>config.log
11304{
11305  echo
11306  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
11307## Running $as_me. ##
11308_ASBOX
11309  echo "$ac_log"
11310} >&5
11311
11312_ACEOF
11313cat >>$CONFIG_STATUS <<_ACEOF
11314_ACEOF
11315
11316cat >>$CONFIG_STATUS <<\_ACEOF
11317
11318# Handling of arguments.
11319for ac_config_target in $ac_config_targets
11320do
11321  case $ac_config_target in
11322    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
11323    "tifftclConfig.sh") CONFIG_FILES="$CONFIG_FILES tifftclConfig.sh" ;;
11324
11325  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
11326echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
11327   { (exit 1); exit 1; }; };;
11328  esac
11329done
11330
11331
11332# If the user did not use the arguments to specify the items to instantiate,
11333# then the envvar interface is used.  Set only those that are not.
11334# We use the long form for the default assignment because of an extremely
11335# bizarre bug on SunOS 4.1.3.
11336if $ac_need_defaults; then
11337  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
11338fi
11339
11340# Have a temporary directory for convenience.  Make it in the build tree
11341# simply because there is no reason against having it here, and in addition,
11342# creating and moving files from /tmp can sometimes cause problems.
11343# Hook for its removal unless debugging.
11344# Note that there is a small window in which the directory will not be cleaned:
11345# after its creation but before its name has been assigned to `$tmp'.
11346$debug ||
11347{
11348  tmp=
11349  trap 'exit_status=$?
11350  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
11351' 0
11352  trap '{ (exit 1); exit 1; }' 1 2 13 15
11353}
11354# Create a (secure) tmp directory for tmp files.
11355
11356{
11357  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
11358  test -n "$tmp" && test -d "$tmp"
11359}  ||
11360{
11361  tmp=./conf$$-$RANDOM
11362  (umask 077 && mkdir "$tmp")
11363} ||
11364{
11365   echo "$me: cannot create a temporary directory in ." >&2
11366   { (exit 1); exit 1; }
11367}
11368
11369#
11370# Set up the sed scripts for CONFIG_FILES section.
11371#
11372
11373# No need to generate the scripts if there are no CONFIG_FILES.
11374# This happens for instance when ./config.status config.h
11375if test -n "$CONFIG_FILES"; then
11376
11377_ACEOF
11378
11379
11380
11381ac_delim='%!_!# '
11382for ac_last_try in false false false false false :; do
11383  cat >conf$$subs.sed <<_ACEOF
11384SHELL!$SHELL$ac_delim
11385PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
11386PACKAGE_NAME!$PACKAGE_NAME$ac_delim
11387PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
11388PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
11389PACKAGE_STRING!$PACKAGE_STRING$ac_delim
11390PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
11391exec_prefix!$exec_prefix$ac_delim
11392prefix!$prefix$ac_delim
11393program_transform_name!$program_transform_name$ac_delim
11394bindir!$bindir$ac_delim
11395sbindir!$sbindir$ac_delim
11396libexecdir!$libexecdir$ac_delim
11397datarootdir!$datarootdir$ac_delim
11398datadir!$datadir$ac_delim
11399sysconfdir!$sysconfdir$ac_delim
11400sharedstatedir!$sharedstatedir$ac_delim
11401localstatedir!$localstatedir$ac_delim
11402includedir!$includedir$ac_delim
11403oldincludedir!$oldincludedir$ac_delim
11404docdir!$docdir$ac_delim
11405infodir!$infodir$ac_delim
11406htmldir!$htmldir$ac_delim
11407dvidir!$dvidir$ac_delim
11408pdfdir!$pdfdir$ac_delim
11409psdir!$psdir$ac_delim
11410libdir!$libdir$ac_delim
11411localedir!$localedir$ac_delim
11412mandir!$mandir$ac_delim
11413DEFS!$DEFS$ac_delim
11414ECHO_C!$ECHO_C$ac_delim
11415ECHO_N!$ECHO_N$ac_delim
11416ECHO_T!$ECHO_T$ac_delim
11417LIBS!$LIBS$ac_delim
11418build_alias!$build_alias$ac_delim
11419host_alias!$host_alias$ac_delim
11420target_alias!$target_alias$ac_delim
11421CYGPATH!$CYGPATH$ac_delim
11422EXEEXT!$EXEEXT$ac_delim
11423PKG_LIB_FILE!$PKG_LIB_FILE$ac_delim
11424PKG_STUB_LIB_FILE!$PKG_STUB_LIB_FILE$ac_delim
11425PKG_STUB_SOURCES!$PKG_STUB_SOURCES$ac_delim
11426PKG_STUB_OBJECTS!$PKG_STUB_OBJECTS$ac_delim
11427PKG_TCL_SOURCES!$PKG_TCL_SOURCES$ac_delim
11428PKG_HEADERS!$PKG_HEADERS$ac_delim
11429PKG_INCLUDES!$PKG_INCLUDES$ac_delim
11430PKG_LIBS!$PKG_LIBS$ac_delim
11431PKG_CFLAGS!$PKG_CFLAGS$ac_delim
11432TCL_VERSION!$TCL_VERSION$ac_delim
11433TCL_PATCH_LEVEL!$TCL_PATCH_LEVEL$ac_delim
11434TCL_BIN_DIR!$TCL_BIN_DIR$ac_delim
11435TCL_SRC_DIR!$TCL_SRC_DIR$ac_delim
11436TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim
11437TCL_LIB_FLAG!$TCL_LIB_FLAG$ac_delim
11438TCL_LIB_SPEC!$TCL_LIB_SPEC$ac_delim
11439TCL_STUB_LIB_FILE!$TCL_STUB_LIB_FILE$ac_delim
11440TCL_STUB_LIB_FLAG!$TCL_STUB_LIB_FLAG$ac_delim
11441TCL_STUB_LIB_SPEC!$TCL_STUB_LIB_SPEC$ac_delim
11442CLEANFILES!$CLEANFILES$ac_delim
11443TCL_LIBS!$TCL_LIBS$ac_delim
11444TCL_DEFS!$TCL_DEFS$ac_delim
11445TCL_EXTRA_CFLAGS!$TCL_EXTRA_CFLAGS$ac_delim
11446TCL_LD_FLAGS!$TCL_LD_FLAGS$ac_delim
11447TCL_SHLIB_LD_LIBS!$TCL_SHLIB_LD_LIBS$ac_delim
11448CC!$CC$ac_delim
11449CFLAGS!$CFLAGS$ac_delim
11450LDFLAGS!$LDFLAGS$ac_delim
11451CPPFLAGS!$CPPFLAGS$ac_delim
11452ac_ct_CC!$ac_ct_CC$ac_delim
11453OBJEXT!$OBJEXT$ac_delim
11454CPP!$CPP$ac_delim
11455INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
11456INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
11457INSTALL_DATA!$INSTALL_DATA$ac_delim
11458SET_MAKE!$SET_MAKE$ac_delim
11459RANLIB!$RANLIB$ac_delim
11460GREP!$GREP$ac_delim
11461EGREP!$EGREP$ac_delim
11462MATH_LIBS!$MATH_LIBS$ac_delim
11463PKG_SOURCES!$PKG_SOURCES$ac_delim
11464PKG_OBJECTS!$PKG_OBJECTS$ac_delim
11465TCL_INCLUDES!$TCL_INCLUDES$ac_delim
11466TCL_THREADS!$TCL_THREADS$ac_delim
11467SHARED_BUILD!$SHARED_BUILD$ac_delim
11468AR!$AR$ac_delim
11469CELIB_DIR!$CELIB_DIR$ac_delim
11470CFLAGS_DEBUG!$CFLAGS_DEBUG$ac_delim
11471CFLAGS_OPTIMIZE!$CFLAGS_OPTIMIZE$ac_delim
11472CFLAGS_WARNING!$CFLAGS_WARNING$ac_delim
11473STLIB_LD!$STLIB_LD$ac_delim
11474SHLIB_LD!$SHLIB_LD$ac_delim
11475SHLIB_LD_LIBS!$SHLIB_LD_LIBS$ac_delim
11476SHLIB_CFLAGS!$SHLIB_CFLAGS$ac_delim
11477LD_LIBRARY_PATH_VAR!$LD_LIBRARY_PATH_VAR$ac_delim
11478CFLAGS_DEFAULT!$CFLAGS_DEFAULT$ac_delim
11479LDFLAGS_DEFAULT!$LDFLAGS_DEFAULT$ac_delim
11480TCL_DBGX!$TCL_DBGX$ac_delim
11481_ACEOF
11482
11483  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
11484    break
11485  elif $ac_last_try; then
11486    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
11487echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
11488   { (exit 1); exit 1; }; }
11489  else
11490    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
11491  fi
11492done
11493
11494ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
11495if test -n "$ac_eof"; then
11496  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
11497  ac_eof=`expr $ac_eof + 1`
11498fi
11499
11500cat >>$CONFIG_STATUS <<_ACEOF
11501cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
11502/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
11503_ACEOF
11504sed '
11505s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
11506s/^/s,@/; s/!/@,|#_!!_#|/
11507:n
11508t n
11509s/'"$ac_delim"'$/,g/; t
11510s/$/\\/; p
11511N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
11512' >>$CONFIG_STATUS <conf$$subs.sed
11513rm -f conf$$subs.sed
11514cat >>$CONFIG_STATUS <<_ACEOF
11515CEOF$ac_eof
11516_ACEOF
11517
11518
11519ac_delim='%!_!# '
11520for ac_last_try in false false false false false :; do
11521  cat >conf$$subs.sed <<_ACEOF
11522MAKE_LIB!$MAKE_LIB$ac_delim
11523MAKE_SHARED_LIB!$MAKE_SHARED_LIB$ac_delim
11524MAKE_STATIC_LIB!$MAKE_STATIC_LIB$ac_delim
11525MAKE_STUB_LIB!$MAKE_STUB_LIB$ac_delim
11526RANLIB_STUB!$RANLIB_STUB$ac_delim
11527VC_MANIFEST_EMBED_DLL!$VC_MANIFEST_EMBED_DLL$ac_delim
11528VC_MANIFEST_EMBED_EXE!$VC_MANIFEST_EMBED_EXE$ac_delim
11529TCLSH_PROG!$TCLSH_PROG$ac_delim
11530tifftcl_BUILD_LIB_SPEC!$tifftcl_BUILD_LIB_SPEC$ac_delim
11531tifftcl_LIB_SPEC!$tifftcl_LIB_SPEC$ac_delim
11532tifftcl_BUILD_STUB_LIB_SPEC!$tifftcl_BUILD_STUB_LIB_SPEC$ac_delim
11533tifftcl_STUB_LIB_SPEC!$tifftcl_STUB_LIB_SPEC$ac_delim
11534tifftcl_BUILD_STUB_LIB_PATH!$tifftcl_BUILD_STUB_LIB_PATH$ac_delim
11535tifftcl_STUB_LIB_PATH!$tifftcl_STUB_LIB_PATH$ac_delim
11536MAJOR_VERSION!$MAJOR_VERSION$ac_delim
11537MINOR_VERSION!$MINOR_VERSION$ac_delim
11538PATCHLEVEL!$PATCHLEVEL$ac_delim
11539LIBOBJS!$LIBOBJS$ac_delim
11540LTLIBOBJS!$LTLIBOBJS$ac_delim
11541_ACEOF
11542
11543  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 19; then
11544    break
11545  elif $ac_last_try; then
11546    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
11547echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
11548   { (exit 1); exit 1; }; }
11549  else
11550    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
11551  fi
11552done
11553
11554ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
11555if test -n "$ac_eof"; then
11556  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
11557  ac_eof=`expr $ac_eof + 1`
11558fi
11559
11560cat >>$CONFIG_STATUS <<_ACEOF
11561cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
11562/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
11563_ACEOF
11564sed '
11565s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
11566s/^/s,@/; s/!/@,|#_!!_#|/
11567:n
11568t n
11569s/'"$ac_delim"'$/,g/; t
11570s/$/\\/; p
11571N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
11572' >>$CONFIG_STATUS <conf$$subs.sed
11573rm -f conf$$subs.sed
11574cat >>$CONFIG_STATUS <<_ACEOF
11575:end
11576s/|#_!!_#|//g
11577CEOF$ac_eof
11578_ACEOF
11579
11580
11581# VPATH may cause trouble with some makes, so we remove $(srcdir),
11582# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
11583# trailing colons and then remove the whole line if VPATH becomes empty
11584# (actually we leave an empty line to preserve line numbers).
11585if test "x$srcdir" = x.; then
11586  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
11587s/:*\$(srcdir):*/:/
11588s/:*\${srcdir}:*/:/
11589s/:*@srcdir@:*/:/
11590s/^\([^=]*=[	 ]*\):*/\1/
11591s/:*$//
11592s/^[^=]*=[	 ]*$//
11593}'
11594fi
11595
11596cat >>$CONFIG_STATUS <<\_ACEOF
11597fi # test -n "$CONFIG_FILES"
11598
11599
11600for ac_tag in  :F $CONFIG_FILES
11601do
11602  case $ac_tag in
11603  :[FHLC]) ac_mode=$ac_tag; continue;;
11604  esac
11605  case $ac_mode$ac_tag in
11606  :[FHL]*:*);;
11607  :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
11608echo "$as_me: error: Invalid tag $ac_tag." >&2;}
11609   { (exit 1); exit 1; }; };;
11610  :[FH]-) ac_tag=-:-;;
11611  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
11612  esac
11613  ac_save_IFS=$IFS
11614  IFS=:
11615  set x $ac_tag
11616  IFS=$ac_save_IFS
11617  shift
11618  ac_file=$1
11619  shift
11620
11621  case $ac_mode in
11622  :L) ac_source=$1;;
11623  :[FH])
11624    ac_file_inputs=
11625    for ac_f
11626    do
11627      case $ac_f in
11628      -) ac_f="$tmp/stdin";;
11629      *) # Look for the file first in the build tree, then in the source tree
11630	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
11631	 # because $ac_f cannot contain `:'.
11632	 test -f "$ac_f" ||
11633	   case $ac_f in
11634	   [\\/$]*) false;;
11635	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
11636	   esac ||
11637	   { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
11638echo "$as_me: error: cannot find input file: $ac_f" >&2;}
11639   { (exit 1); exit 1; }; };;
11640      esac
11641      ac_file_inputs="$ac_file_inputs $ac_f"
11642    done
11643
11644    # Let's still pretend it is `configure' which instantiates (i.e., don't
11645    # use $as_me), people would be surprised to read:
11646    #    /* config.h.  Generated by config.status.  */
11647    configure_input="Generated from "`IFS=:
11648	  echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
11649    if test x"$ac_file" != x-; then
11650      configure_input="$ac_file.  $configure_input"
11651      { echo "$as_me:$LINENO: creating $ac_file" >&5
11652echo "$as_me: creating $ac_file" >&6;}
11653    fi
11654
11655    case $ac_tag in
11656    *:-:* | *:-) cat >"$tmp/stdin";;
11657    esac
11658    ;;
11659  esac
11660
11661  ac_dir=`$as_dirname -- "$ac_file" ||
11662$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11663	 X"$ac_file" : 'X\(//\)[^/]' \| \
11664	 X"$ac_file" : 'X\(//\)$' \| \
11665	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
11666echo X"$ac_file" |
11667    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
11668	    s//\1/
11669	    q
11670	  }
11671	  /^X\(\/\/\)[^/].*/{
11672	    s//\1/
11673	    q
11674	  }
11675	  /^X\(\/\/\)$/{
11676	    s//\1/
11677	    q
11678	  }
11679	  /^X\(\/\).*/{
11680	    s//\1/
11681	    q
11682	  }
11683	  s/.*/./; q'`
11684  { as_dir="$ac_dir"
11685  case $as_dir in #(
11686  -*) as_dir=./$as_dir;;
11687  esac
11688  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
11689    as_dirs=
11690    while :; do
11691      case $as_dir in #(
11692      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
11693      *) as_qdir=$as_dir;;
11694      esac
11695      as_dirs="'$as_qdir' $as_dirs"
11696      as_dir=`$as_dirname -- "$as_dir" ||
11697$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11698	 X"$as_dir" : 'X\(//\)[^/]' \| \
11699	 X"$as_dir" : 'X\(//\)$' \| \
11700	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
11701echo X"$as_dir" |
11702    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
11703	    s//\1/
11704	    q
11705	  }
11706	  /^X\(\/\/\)[^/].*/{
11707	    s//\1/
11708	    q
11709	  }
11710	  /^X\(\/\/\)$/{
11711	    s//\1/
11712	    q
11713	  }
11714	  /^X\(\/\).*/{
11715	    s//\1/
11716	    q
11717	  }
11718	  s/.*/./; q'`
11719      test -d "$as_dir" && break
11720    done
11721    test -z "$as_dirs" || eval "mkdir $as_dirs"
11722  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
11723echo "$as_me: error: cannot create directory $as_dir" >&2;}
11724   { (exit 1); exit 1; }; }; }
11725  ac_builddir=.
11726
11727case "$ac_dir" in
11728.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
11729*)
11730  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
11731  # A ".." for each directory in $ac_dir_suffix.
11732  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
11733  case $ac_top_builddir_sub in
11734  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
11735  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
11736  esac ;;
11737esac
11738ac_abs_top_builddir=$ac_pwd
11739ac_abs_builddir=$ac_pwd$ac_dir_suffix
11740# for backward compatibility:
11741ac_top_builddir=$ac_top_build_prefix
11742
11743case $srcdir in
11744  .)  # We are building in place.
11745    ac_srcdir=.
11746    ac_top_srcdir=$ac_top_builddir_sub
11747    ac_abs_top_srcdir=$ac_pwd ;;
11748  [\\/]* | ?:[\\/]* )  # Absolute name.
11749    ac_srcdir=$srcdir$ac_dir_suffix;
11750    ac_top_srcdir=$srcdir
11751    ac_abs_top_srcdir=$srcdir ;;
11752  *) # Relative name.
11753    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
11754    ac_top_srcdir=$ac_top_build_prefix$srcdir
11755    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
11756esac
11757ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
11758
11759
11760  case $ac_mode in
11761  :F)
11762  #
11763  # CONFIG_FILE
11764  #
11765
11766  case $INSTALL in
11767  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
11768  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
11769  esac
11770_ACEOF
11771
11772cat >>$CONFIG_STATUS <<\_ACEOF
11773# If the template does not know about datarootdir, expand it.
11774# FIXME: This hack should be removed a few years after 2.60.
11775ac_datarootdir_hack=; ac_datarootdir_seen=
11776
11777case `sed -n '/datarootdir/ {
11778  p
11779  q
11780}
11781/@datadir@/p
11782/@docdir@/p
11783/@infodir@/p
11784/@localedir@/p
11785/@mandir@/p
11786' $ac_file_inputs` in
11787*datarootdir*) ac_datarootdir_seen=yes;;
11788*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
11789  { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
11790echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
11791_ACEOF
11792cat >>$CONFIG_STATUS <<_ACEOF
11793  ac_datarootdir_hack='
11794  s&@datadir@&$datadir&g
11795  s&@docdir@&$docdir&g
11796  s&@infodir@&$infodir&g
11797  s&@localedir@&$localedir&g
11798  s&@mandir@&$mandir&g
11799    s&\\\${datarootdir}&$datarootdir&g' ;;
11800esac
11801_ACEOF
11802
11803# Neutralize VPATH when `$srcdir' = `.'.
11804# Shell code in configure.ac might set extrasub.
11805# FIXME: do we really want to maintain this feature?
11806cat >>$CONFIG_STATUS <<_ACEOF
11807  sed "$ac_vpsub
11808$extrasub
11809_ACEOF
11810cat >>$CONFIG_STATUS <<\_ACEOF
11811:t
11812/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
11813s&@configure_input@&$configure_input&;t t
11814s&@top_builddir@&$ac_top_builddir_sub&;t t
11815s&@srcdir@&$ac_srcdir&;t t
11816s&@abs_srcdir@&$ac_abs_srcdir&;t t
11817s&@top_srcdir@&$ac_top_srcdir&;t t
11818s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
11819s&@builddir@&$ac_builddir&;t t
11820s&@abs_builddir@&$ac_abs_builddir&;t t
11821s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
11822s&@INSTALL@&$ac_INSTALL&;t t
11823$ac_datarootdir_hack
11824" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
11825
11826test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
11827  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
11828  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
11829  { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
11830which seems to be undefined.  Please make sure it is defined." >&5
11831echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
11832which seems to be undefined.  Please make sure it is defined." >&2;}
11833
11834  rm -f "$tmp/stdin"
11835  case $ac_file in
11836  -) cat "$tmp/out"; rm -f "$tmp/out";;
11837  *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
11838  esac
11839 ;;
11840
11841
11842
11843  esac
11844
11845done # for ac_tag
11846
11847
11848{ (exit 0); exit 0; }
11849_ACEOF
11850chmod +x $CONFIG_STATUS
11851ac_clean_files=$ac_clean_files_save
11852
11853
11854# configure is writing to config.log, and then calls config.status.
11855# config.status does its own redirection, appending to config.log.
11856# Unfortunately, on DOS this fails, as config.log is still kept open
11857# by configure, so config.status won't be able to write to it; its
11858# output is simply discarded.  So we exec the FD to /dev/null,
11859# effectively closing config.log, so it can be properly (re)opened and
11860# appended to by config.status.  When coming back to configure, we
11861# need to make the FD available again.
11862if test "$no_create" != yes; then
11863  ac_cs_success=:
11864  ac_config_status_args=
11865  test "$silent" = yes &&
11866    ac_config_status_args="$ac_config_status_args --quiet"
11867  exec 5>/dev/null
11868  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
11869  exec 5>>config.log
11870  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
11871  # would make configure fail if this is the last instruction.
11872  $ac_cs_success || { (exit 1); exit 1; }
11873fi
11874
11875
11876#--------------------------------------------------------------------
11877