1#! /bin/sh
2# From configure.in Id: configure.in.
3# Guess values for system-dependent variables and create Makefiles.
4# Generated by GNU Autoconf 2.61 for Memchan 2.3.
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='Memchan'
575PACKAGE_TARNAME='memchan'
576PACKAGE_VERSION='2.3'
577PACKAGE_STRING='Memchan 2.3'
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
710SHLIB_SUFFIX
711CFLAGS_DEFAULT
712LDFLAGS_DEFAULT
713TCL_DBGX
714MAKE_LIB
715MAKE_SHARED_LIB
716MAKE_STATIC_LIB
717MAKE_STUB_LIB
718RANLIB_STUB
719VC_MANIFEST_EMBED_DLL
720VC_MANIFEST_EMBED_EXE
721TCLSH_PROG
722LIBOBJS
723LTLIBOBJS'
724ac_subst_files=''
725      ac_precious_vars='build_alias
726host_alias
727target_alias
728CC
729CFLAGS
730LDFLAGS
731LIBS
732CPPFLAGS
733CPP'
734
735
736# Initialize some variables set by options.
737ac_init_help=
738ac_init_version=false
739# The variables have the same names as the options, with
740# dashes changed to underlines.
741cache_file=/dev/null
742exec_prefix=NONE
743no_create=
744no_recursion=
745prefix=NONE
746program_prefix=NONE
747program_suffix=NONE
748program_transform_name=s,x,x,
749silent=
750site=
751srcdir=
752verbose=
753x_includes=NONE
754x_libraries=NONE
755
756# Installation directory options.
757# These are left unexpanded so users can "make install exec_prefix=/foo"
758# and all the variables that are supposed to be based on exec_prefix
759# by default will actually change.
760# Use braces instead of parens because sh, perl, etc. also accept them.
761# (The list follows the same order as the GNU Coding Standards.)
762bindir='${exec_prefix}/bin'
763sbindir='${exec_prefix}/sbin'
764libexecdir='${exec_prefix}/libexec'
765datarootdir='${prefix}/share'
766datadir='${datarootdir}'
767sysconfdir='${prefix}/etc'
768sharedstatedir='${prefix}/com'
769localstatedir='${prefix}/var'
770includedir='${prefix}/include'
771oldincludedir='/usr/include'
772docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
773infodir='${datarootdir}/info'
774htmldir='${docdir}'
775dvidir='${docdir}'
776pdfdir='${docdir}'
777psdir='${docdir}'
778libdir='${exec_prefix}/lib'
779localedir='${datarootdir}/locale'
780mandir='${datarootdir}/man'
781
782ac_prev=
783ac_dashdash=
784for ac_option
785do
786  # If the previous option needs an argument, assign it.
787  if test -n "$ac_prev"; then
788    eval $ac_prev=\$ac_option
789    ac_prev=
790    continue
791  fi
792
793  case $ac_option in
794  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
795  *)	ac_optarg=yes ;;
796  esac
797
798  # Accept the important Cygnus configure options, so we can diagnose typos.
799
800  case $ac_dashdash$ac_option in
801  --)
802    ac_dashdash=yes ;;
803
804  -bindir | --bindir | --bindi | --bind | --bin | --bi)
805    ac_prev=bindir ;;
806  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
807    bindir=$ac_optarg ;;
808
809  -build | --build | --buil | --bui | --bu)
810    ac_prev=build_alias ;;
811  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
812    build_alias=$ac_optarg ;;
813
814  -cache-file | --cache-file | --cache-fil | --cache-fi \
815  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
816    ac_prev=cache_file ;;
817  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
818  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
819    cache_file=$ac_optarg ;;
820
821  --config-cache | -C)
822    cache_file=config.cache ;;
823
824  -datadir | --datadir | --datadi | --datad)
825    ac_prev=datadir ;;
826  -datadir=* | --datadir=* | --datadi=* | --datad=*)
827    datadir=$ac_optarg ;;
828
829  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
830  | --dataroo | --dataro | --datar)
831    ac_prev=datarootdir ;;
832  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
833  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
834    datarootdir=$ac_optarg ;;
835
836  -disable-* | --disable-*)
837    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
838    # Reject names that are not valid shell variable names.
839    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
840      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
841   { (exit 1); exit 1; }; }
842    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
843    eval enable_$ac_feature=no ;;
844
845  -docdir | --docdir | --docdi | --doc | --do)
846    ac_prev=docdir ;;
847  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
848    docdir=$ac_optarg ;;
849
850  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
851    ac_prev=dvidir ;;
852  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
853    dvidir=$ac_optarg ;;
854
855  -enable-* | --enable-*)
856    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
857    # Reject names that are not valid shell variable names.
858    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
859      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
860   { (exit 1); exit 1; }; }
861    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
862    eval enable_$ac_feature=\$ac_optarg ;;
863
864  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
865  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
866  | --exec | --exe | --ex)
867    ac_prev=exec_prefix ;;
868  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
869  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
870  | --exec=* | --exe=* | --ex=*)
871    exec_prefix=$ac_optarg ;;
872
873  -gas | --gas | --ga | --g)
874    # Obsolete; use --with-gas.
875    with_gas=yes ;;
876
877  -help | --help | --hel | --he | -h)
878    ac_init_help=long ;;
879  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
880    ac_init_help=recursive ;;
881  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
882    ac_init_help=short ;;
883
884  -host | --host | --hos | --ho)
885    ac_prev=host_alias ;;
886  -host=* | --host=* | --hos=* | --ho=*)
887    host_alias=$ac_optarg ;;
888
889  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
890    ac_prev=htmldir ;;
891  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
892  | --ht=*)
893    htmldir=$ac_optarg ;;
894
895  -includedir | --includedir | --includedi | --included | --include \
896  | --includ | --inclu | --incl | --inc)
897    ac_prev=includedir ;;
898  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
899  | --includ=* | --inclu=* | --incl=* | --inc=*)
900    includedir=$ac_optarg ;;
901
902  -infodir | --infodir | --infodi | --infod | --info | --inf)
903    ac_prev=infodir ;;
904  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
905    infodir=$ac_optarg ;;
906
907  -libdir | --libdir | --libdi | --libd)
908    ac_prev=libdir ;;
909  -libdir=* | --libdir=* | --libdi=* | --libd=*)
910    libdir=$ac_optarg ;;
911
912  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
913  | --libexe | --libex | --libe)
914    ac_prev=libexecdir ;;
915  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
916  | --libexe=* | --libex=* | --libe=*)
917    libexecdir=$ac_optarg ;;
918
919  -localedir | --localedir | --localedi | --localed | --locale)
920    ac_prev=localedir ;;
921  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
922    localedir=$ac_optarg ;;
923
924  -localstatedir | --localstatedir | --localstatedi | --localstated \
925  | --localstate | --localstat | --localsta | --localst | --locals)
926    ac_prev=localstatedir ;;
927  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
928  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
929    localstatedir=$ac_optarg ;;
930
931  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
932    ac_prev=mandir ;;
933  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
934    mandir=$ac_optarg ;;
935
936  -nfp | --nfp | --nf)
937    # Obsolete; use --without-fp.
938    with_fp=no ;;
939
940  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
941  | --no-cr | --no-c | -n)
942    no_create=yes ;;
943
944  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
945  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
946    no_recursion=yes ;;
947
948  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
949  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
950  | --oldin | --oldi | --old | --ol | --o)
951    ac_prev=oldincludedir ;;
952  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
953  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
954  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
955    oldincludedir=$ac_optarg ;;
956
957  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
958    ac_prev=prefix ;;
959  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
960    prefix=$ac_optarg ;;
961
962  -program-prefix | --program-prefix | --program-prefi | --program-pref \
963  | --program-pre | --program-pr | --program-p)
964    ac_prev=program_prefix ;;
965  -program-prefix=* | --program-prefix=* | --program-prefi=* \
966  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
967    program_prefix=$ac_optarg ;;
968
969  -program-suffix | --program-suffix | --program-suffi | --program-suff \
970  | --program-suf | --program-su | --program-s)
971    ac_prev=program_suffix ;;
972  -program-suffix=* | --program-suffix=* | --program-suffi=* \
973  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
974    program_suffix=$ac_optarg ;;
975
976  -program-transform-name | --program-transform-name \
977  | --program-transform-nam | --program-transform-na \
978  | --program-transform-n | --program-transform- \
979  | --program-transform | --program-transfor \
980  | --program-transfo | --program-transf \
981  | --program-trans | --program-tran \
982  | --progr-tra | --program-tr | --program-t)
983    ac_prev=program_transform_name ;;
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    program_transform_name=$ac_optarg ;;
992
993  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
994    ac_prev=pdfdir ;;
995  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
996    pdfdir=$ac_optarg ;;
997
998  -psdir | --psdir | --psdi | --psd | --ps)
999    ac_prev=psdir ;;
1000  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1001    psdir=$ac_optarg ;;
1002
1003  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1004  | -silent | --silent | --silen | --sile | --sil)
1005    silent=yes ;;
1006
1007  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1008    ac_prev=sbindir ;;
1009  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1010  | --sbi=* | --sb=*)
1011    sbindir=$ac_optarg ;;
1012
1013  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1014  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1015  | --sharedst | --shareds | --shared | --share | --shar \
1016  | --sha | --sh)
1017    ac_prev=sharedstatedir ;;
1018  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1019  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1020  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1021  | --sha=* | --sh=*)
1022    sharedstatedir=$ac_optarg ;;
1023
1024  -site | --site | --sit)
1025    ac_prev=site ;;
1026  -site=* | --site=* | --sit=*)
1027    site=$ac_optarg ;;
1028
1029  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1030    ac_prev=srcdir ;;
1031  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1032    srcdir=$ac_optarg ;;
1033
1034  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1035  | --syscon | --sysco | --sysc | --sys | --sy)
1036    ac_prev=sysconfdir ;;
1037  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1038  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1039    sysconfdir=$ac_optarg ;;
1040
1041  -target | --target | --targe | --targ | --tar | --ta | --t)
1042    ac_prev=target_alias ;;
1043  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1044    target_alias=$ac_optarg ;;
1045
1046  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1047    verbose=yes ;;
1048
1049  -version | --version | --versio | --versi | --vers | -V)
1050    ac_init_version=: ;;
1051
1052  -with-* | --with-*)
1053    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1054    # Reject names that are not valid shell variable names.
1055    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1056      { echo "$as_me: error: invalid package name: $ac_package" >&2
1057   { (exit 1); exit 1; }; }
1058    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1059    eval with_$ac_package=\$ac_optarg ;;
1060
1061  -without-* | --without-*)
1062    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1063    # Reject names that are not valid shell variable names.
1064    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1065      { echo "$as_me: error: invalid package name: $ac_package" >&2
1066   { (exit 1); exit 1; }; }
1067    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1068    eval with_$ac_package=no ;;
1069
1070  --x)
1071    # Obsolete; use --with-x.
1072    with_x=yes ;;
1073
1074  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1075  | --x-incl | --x-inc | --x-in | --x-i)
1076    ac_prev=x_includes ;;
1077  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1078  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1079    x_includes=$ac_optarg ;;
1080
1081  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1082  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1083    ac_prev=x_libraries ;;
1084  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1085  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1086    x_libraries=$ac_optarg ;;
1087
1088  -*) { echo "$as_me: error: unrecognized option: $ac_option
1089Try \`$0 --help' for more information." >&2
1090   { (exit 1); exit 1; }; }
1091    ;;
1092
1093  *=*)
1094    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1095    # Reject names that are not valid shell variable names.
1096    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1097      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1098   { (exit 1); exit 1; }; }
1099    eval $ac_envvar=\$ac_optarg
1100    export $ac_envvar ;;
1101
1102  *)
1103    # FIXME: should be removed in autoconf 3.0.
1104    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1105    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1106      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1107    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1108    ;;
1109
1110  esac
1111done
1112
1113if test -n "$ac_prev"; then
1114  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1115  { echo "$as_me: error: missing argument to $ac_option" >&2
1116   { (exit 1); exit 1; }; }
1117fi
1118
1119# Be sure to have absolute directory names.
1120for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1121		datadir sysconfdir sharedstatedir localstatedir includedir \
1122		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1123		libdir localedir mandir
1124do
1125  eval ac_val=\$$ac_var
1126  case $ac_val in
1127    [\\/$]* | ?:[\\/]* )  continue;;
1128    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1129  esac
1130  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1131   { (exit 1); exit 1; }; }
1132done
1133
1134# There might be people who depend on the old broken behavior: `$host'
1135# used to hold the argument of --host etc.
1136# FIXME: To remove some day.
1137build=$build_alias
1138host=$host_alias
1139target=$target_alias
1140
1141# FIXME: To remove some day.
1142if test "x$host_alias" != x; then
1143  if test "x$build_alias" = x; then
1144    cross_compiling=maybe
1145    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1146    If a cross compiler is detected then cross compile mode will be used." >&2
1147  elif test "x$build_alias" != "x$host_alias"; then
1148    cross_compiling=yes
1149  fi
1150fi
1151
1152ac_tool_prefix=
1153test -n "$host_alias" && ac_tool_prefix=$host_alias-
1154
1155test "$silent" = yes && exec 6>/dev/null
1156
1157
1158ac_pwd=`pwd` && test -n "$ac_pwd" &&
1159ac_ls_di=`ls -di .` &&
1160ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1161  { echo "$as_me: error: Working directory cannot be determined" >&2
1162   { (exit 1); exit 1; }; }
1163test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1164  { echo "$as_me: error: pwd does not report name of working directory" >&2
1165   { (exit 1); exit 1; }; }
1166
1167
1168# Find the source files, if location was not specified.
1169if test -z "$srcdir"; then
1170  ac_srcdir_defaulted=yes
1171  # Try the directory containing this script, then the parent directory.
1172  ac_confdir=`$as_dirname -- "$0" ||
1173$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1174	 X"$0" : 'X\(//\)[^/]' \| \
1175	 X"$0" : 'X\(//\)$' \| \
1176	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1177echo X"$0" |
1178    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1179	    s//\1/
1180	    q
1181	  }
1182	  /^X\(\/\/\)[^/].*/{
1183	    s//\1/
1184	    q
1185	  }
1186	  /^X\(\/\/\)$/{
1187	    s//\1/
1188	    q
1189	  }
1190	  /^X\(\/\).*/{
1191	    s//\1/
1192	    q
1193	  }
1194	  s/.*/./; q'`
1195  srcdir=$ac_confdir
1196  if test ! -r "$srcdir/$ac_unique_file"; then
1197    srcdir=..
1198  fi
1199else
1200  ac_srcdir_defaulted=no
1201fi
1202if test ! -r "$srcdir/$ac_unique_file"; then
1203  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1204  { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1205   { (exit 1); exit 1; }; }
1206fi
1207ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1208ac_abs_confdir=`(
1209	cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
1210   { (exit 1); exit 1; }; }
1211	pwd)`
1212# When building in place, set srcdir=.
1213if test "$ac_abs_confdir" = "$ac_pwd"; then
1214  srcdir=.
1215fi
1216# Remove unnecessary trailing slashes from srcdir.
1217# Double slashes in file names in object file debugging info
1218# mess up M-x gdb in Emacs.
1219case $srcdir in
1220*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1221esac
1222for ac_var in $ac_precious_vars; do
1223  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1224  eval ac_env_${ac_var}_value=\$${ac_var}
1225  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1226  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1227done
1228
1229#
1230# Report the --help message.
1231#
1232if test "$ac_init_help" = "long"; then
1233  # Omit some internal or obsolete options to make the list less imposing.
1234  # This message is too long to be a string in the A/UX 3.1 sh.
1235  cat <<_ACEOF
1236\`configure' configures Memchan 2.3 to adapt to many kinds of systems.
1237
1238Usage: $0 [OPTION]... [VAR=VALUE]...
1239
1240To assign environment variables (e.g., CC, CFLAGS...), specify them as
1241VAR=VALUE.  See below for descriptions of some of the useful variables.
1242
1243Defaults for the options are specified in brackets.
1244
1245Configuration:
1246  -h, --help              display this help and exit
1247      --help=short        display options specific to this package
1248      --help=recursive    display the short help of all the included packages
1249  -V, --version           display version information and exit
1250  -q, --quiet, --silent   do not print \`checking...' messages
1251      --cache-file=FILE   cache test results in FILE [disabled]
1252  -C, --config-cache      alias for \`--cache-file=config.cache'
1253  -n, --no-create         do not create output files
1254      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1255
1256Installation directories:
1257  --prefix=PREFIX         install architecture-independent files in PREFIX
1258			  [$ac_default_prefix]
1259  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1260			  [PREFIX]
1261
1262By default, \`make install' will install all the files in
1263\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1264an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1265for instance \`--prefix=\$HOME'.
1266
1267For better control, use the options below.
1268
1269Fine tuning of the installation directories:
1270  --bindir=DIR           user executables [EPREFIX/bin]
1271  --sbindir=DIR          system admin executables [EPREFIX/sbin]
1272  --libexecdir=DIR       program executables [EPREFIX/libexec]
1273  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
1274  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
1275  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
1276  --libdir=DIR           object code libraries [EPREFIX/lib]
1277  --includedir=DIR       C header files [PREFIX/include]
1278  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
1279  --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
1280  --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
1281  --infodir=DIR          info documentation [DATAROOTDIR/info]
1282  --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
1283  --mandir=DIR           man documentation [DATAROOTDIR/man]
1284  --docdir=DIR           documentation root [DATAROOTDIR/doc/memchan]
1285  --htmldir=DIR          html documentation [DOCDIR]
1286  --dvidir=DIR           dvi documentation [DOCDIR]
1287  --pdfdir=DIR           pdf documentation [DOCDIR]
1288  --psdir=DIR            ps documentation [DOCDIR]
1289_ACEOF
1290
1291  cat <<\_ACEOF
1292_ACEOF
1293fi
1294
1295if test -n "$ac_init_help"; then
1296  case $ac_init_help in
1297     short | recursive ) echo "Configuration of Memchan 2.3:";;
1298   esac
1299  cat <<\_ACEOF
1300
1301Optional Features:
1302  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1303  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1304  --enable-threads        build with threads
1305  --enable-shared         build and link with shared libraries (default: on)
1306  --enable-64bit          enable 64bit support (default: off)
1307  --enable-64bit-vis      enable 64bit Sparc VIS support (default: off)
1308  --disable-rpath         disable rpath support (default: on)
1309  --enable-wince          enable Win/CE support (where applicable)
1310  --enable-symbols        build with debugging symbols (default: off)
1311
1312Optional Packages:
1313  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1314  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1315  --with-tcl              directory containing tcl configuration
1316                          (tclConfig.sh)
1317  --with-tclinclude       directory containing the public Tcl header files
1318  --with-celib=DIR        use Windows/CE support library from DIR
1319
1320Some influential environment variables:
1321  CC          C compiler command
1322  CFLAGS      C compiler flags
1323  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1324              nonstandard directory <lib dir>
1325  LIBS        libraries to pass to the linker, e.g. -l<library>
1326  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1327              you have headers in a nonstandard directory <include dir>
1328  CPP         C preprocessor
1329
1330Use these variables to override the choices made by `configure' or to help
1331it to find libraries and programs with nonstandard names/locations.
1332
1333_ACEOF
1334ac_status=$?
1335fi
1336
1337if test "$ac_init_help" = "recursive"; then
1338  # If there are subdirs, report their specific --help.
1339  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1340    test -d "$ac_dir" || continue
1341    ac_builddir=.
1342
1343case "$ac_dir" in
1344.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1345*)
1346  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
1347  # A ".." for each directory in $ac_dir_suffix.
1348  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1349  case $ac_top_builddir_sub in
1350  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1351  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1352  esac ;;
1353esac
1354ac_abs_top_builddir=$ac_pwd
1355ac_abs_builddir=$ac_pwd$ac_dir_suffix
1356# for backward compatibility:
1357ac_top_builddir=$ac_top_build_prefix
1358
1359case $srcdir in
1360  .)  # We are building in place.
1361    ac_srcdir=.
1362    ac_top_srcdir=$ac_top_builddir_sub
1363    ac_abs_top_srcdir=$ac_pwd ;;
1364  [\\/]* | ?:[\\/]* )  # Absolute name.
1365    ac_srcdir=$srcdir$ac_dir_suffix;
1366    ac_top_srcdir=$srcdir
1367    ac_abs_top_srcdir=$srcdir ;;
1368  *) # Relative name.
1369    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1370    ac_top_srcdir=$ac_top_build_prefix$srcdir
1371    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1372esac
1373ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1374
1375    cd "$ac_dir" || { ac_status=$?; continue; }
1376    # Check for guested configure.
1377    if test -f "$ac_srcdir/configure.gnu"; then
1378      echo &&
1379      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1380    elif test -f "$ac_srcdir/configure"; then
1381      echo &&
1382      $SHELL "$ac_srcdir/configure" --help=recursive
1383    else
1384      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1385    fi || ac_status=$?
1386    cd "$ac_pwd" || { ac_status=$?; break; }
1387  done
1388fi
1389
1390test -n "$ac_init_help" && exit $ac_status
1391if $ac_init_version; then
1392  cat <<\_ACEOF
1393Memchan configure 2.3
1394generated by GNU Autoconf 2.61
1395
1396Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
13972002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1398This configure script is free software; the Free Software Foundation
1399gives unlimited permission to copy, distribute and modify it.
1400_ACEOF
1401  exit
1402fi
1403cat >config.log <<_ACEOF
1404This file contains any messages produced by compilers while
1405running configure, to aid debugging if configure makes a mistake.
1406
1407It was created by Memchan $as_me 2.3, which was
1408generated by GNU Autoconf 2.61.  Invocation command line was
1409
1410  $ $0 $@
1411
1412_ACEOF
1413exec 5>>config.log
1414{
1415cat <<_ASUNAME
1416## --------- ##
1417## Platform. ##
1418## --------- ##
1419
1420hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1421uname -m = `(uname -m) 2>/dev/null || echo unknown`
1422uname -r = `(uname -r) 2>/dev/null || echo unknown`
1423uname -s = `(uname -s) 2>/dev/null || echo unknown`
1424uname -v = `(uname -v) 2>/dev/null || echo unknown`
1425
1426/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1427/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1428
1429/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1430/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1431/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1432/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1433/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1434/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1435/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1436
1437_ASUNAME
1438
1439as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1440for as_dir in $PATH
1441do
1442  IFS=$as_save_IFS
1443  test -z "$as_dir" && as_dir=.
1444  echo "PATH: $as_dir"
1445done
1446IFS=$as_save_IFS
1447
1448} >&5
1449
1450cat >&5 <<_ACEOF
1451
1452
1453## ----------- ##
1454## Core tests. ##
1455## ----------- ##
1456
1457_ACEOF
1458
1459
1460# Keep a trace of the command line.
1461# Strip out --no-create and --no-recursion so they do not pile up.
1462# Strip out --silent because we don't want to record it for future runs.
1463# Also quote any args containing shell meta-characters.
1464# Make two passes to allow for proper duplicate-argument suppression.
1465ac_configure_args=
1466ac_configure_args0=
1467ac_configure_args1=
1468ac_must_keep_next=false
1469for ac_pass in 1 2
1470do
1471  for ac_arg
1472  do
1473    case $ac_arg in
1474    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1475    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1476    | -silent | --silent | --silen | --sile | --sil)
1477      continue ;;
1478    *\'*)
1479      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1480    esac
1481    case $ac_pass in
1482    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1483    2)
1484      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1485      if test $ac_must_keep_next = true; then
1486	ac_must_keep_next=false # Got value, back to normal.
1487      else
1488	case $ac_arg in
1489	  *=* | --config-cache | -C | -disable-* | --disable-* \
1490	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1491	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1492	  | -with-* | --with-* | -without-* | --without-* | --x)
1493	    case "$ac_configure_args0 " in
1494	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1495	    esac
1496	    ;;
1497	  -* ) ac_must_keep_next=true ;;
1498	esac
1499      fi
1500      ac_configure_args="$ac_configure_args '$ac_arg'"
1501      ;;
1502    esac
1503  done
1504done
1505$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1506$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1507
1508# When interrupted or exit'd, cleanup temporary files, and complete
1509# config.log.  We remove comments because anyway the quotes in there
1510# would cause problems or look ugly.
1511# WARNING: Use '\'' to represent an apostrophe within the trap.
1512# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1513trap 'exit_status=$?
1514  # Save into config.log some information that might help in debugging.
1515  {
1516    echo
1517
1518    cat <<\_ASBOX
1519## ---------------- ##
1520## Cache variables. ##
1521## ---------------- ##
1522_ASBOX
1523    echo
1524    # The following way of writing the cache mishandles newlines in values,
1525(
1526  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1527    eval ac_val=\$$ac_var
1528    case $ac_val in #(
1529    *${as_nl}*)
1530      case $ac_var in #(
1531      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1532echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1533      esac
1534      case $ac_var in #(
1535      _ | IFS | as_nl) ;; #(
1536      *) $as_unset $ac_var ;;
1537      esac ;;
1538    esac
1539  done
1540  (set) 2>&1 |
1541    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1542    *${as_nl}ac_space=\ *)
1543      sed -n \
1544	"s/'\''/'\''\\\\'\'''\''/g;
1545	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1546      ;; #(
1547    *)
1548      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1549      ;;
1550    esac |
1551    sort
1552)
1553    echo
1554
1555    cat <<\_ASBOX
1556## ----------------- ##
1557## Output variables. ##
1558## ----------------- ##
1559_ASBOX
1560    echo
1561    for ac_var in $ac_subst_vars
1562    do
1563      eval ac_val=\$$ac_var
1564      case $ac_val in
1565      *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1566      esac
1567      echo "$ac_var='\''$ac_val'\''"
1568    done | sort
1569    echo
1570
1571    if test -n "$ac_subst_files"; then
1572      cat <<\_ASBOX
1573## ------------------- ##
1574## File substitutions. ##
1575## ------------------- ##
1576_ASBOX
1577      echo
1578      for ac_var in $ac_subst_files
1579      do
1580	eval ac_val=\$$ac_var
1581	case $ac_val in
1582	*\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1583	esac
1584	echo "$ac_var='\''$ac_val'\''"
1585      done | sort
1586      echo
1587    fi
1588
1589    if test -s confdefs.h; then
1590      cat <<\_ASBOX
1591## ----------- ##
1592## confdefs.h. ##
1593## ----------- ##
1594_ASBOX
1595      echo
1596      cat confdefs.h
1597      echo
1598    fi
1599    test "$ac_signal" != 0 &&
1600      echo "$as_me: caught signal $ac_signal"
1601    echo "$as_me: exit $exit_status"
1602  } >&5
1603  rm -f core *.core core.conftest.* &&
1604    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1605    exit $exit_status
1606' 0
1607for ac_signal in 1 2 13 15; do
1608  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1609done
1610ac_signal=0
1611
1612# confdefs.h avoids OS command line length limits that DEFS can exceed.
1613rm -f -r conftest* confdefs.h
1614
1615# Predefined preprocessor variables.
1616
1617cat >>confdefs.h <<_ACEOF
1618#define PACKAGE_NAME "$PACKAGE_NAME"
1619_ACEOF
1620
1621
1622cat >>confdefs.h <<_ACEOF
1623#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1624_ACEOF
1625
1626
1627cat >>confdefs.h <<_ACEOF
1628#define PACKAGE_VERSION "$PACKAGE_VERSION"
1629_ACEOF
1630
1631
1632cat >>confdefs.h <<_ACEOF
1633#define PACKAGE_STRING "$PACKAGE_STRING"
1634_ACEOF
1635
1636
1637cat >>confdefs.h <<_ACEOF
1638#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1639_ACEOF
1640
1641
1642# Let the site file select an alternate cache file if it wants to.
1643# Prefer explicitly selected file to automatically selected ones.
1644if test -n "$CONFIG_SITE"; then
1645  set x "$CONFIG_SITE"
1646elif test "x$prefix" != xNONE; then
1647  set x "$prefix/share/config.site" "$prefix/etc/config.site"
1648else
1649  set x "$ac_default_prefix/share/config.site" \
1650	"$ac_default_prefix/etc/config.site"
1651fi
1652shift
1653for ac_site_file
1654do
1655  if test -r "$ac_site_file"; then
1656    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1657echo "$as_me: loading site script $ac_site_file" >&6;}
1658    sed 's/^/| /' "$ac_site_file" >&5
1659    . "$ac_site_file"
1660  fi
1661done
1662
1663if test -r "$cache_file"; then
1664  # Some versions of bash will fail to source /dev/null (special
1665  # files actually), so we avoid doing that.
1666  if test -f "$cache_file"; then
1667    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1668echo "$as_me: loading cache $cache_file" >&6;}
1669    case $cache_file in
1670      [\\/]* | ?:[\\/]* ) . "$cache_file";;
1671      *)                      . "./$cache_file";;
1672    esac
1673  fi
1674else
1675  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1676echo "$as_me: creating cache $cache_file" >&6;}
1677  >$cache_file
1678fi
1679
1680# Check that the precious variables saved in the cache have kept the same
1681# value.
1682ac_cache_corrupted=false
1683for ac_var in $ac_precious_vars; do
1684  eval ac_old_set=\$ac_cv_env_${ac_var}_set
1685  eval ac_new_set=\$ac_env_${ac_var}_set
1686  eval ac_old_val=\$ac_cv_env_${ac_var}_value
1687  eval ac_new_val=\$ac_env_${ac_var}_value
1688  case $ac_old_set,$ac_new_set in
1689    set,)
1690      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1691echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1692      ac_cache_corrupted=: ;;
1693    ,set)
1694      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1695echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1696      ac_cache_corrupted=: ;;
1697    ,);;
1698    *)
1699      if test "x$ac_old_val" != "x$ac_new_val"; then
1700	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1701echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1702	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1703echo "$as_me:   former value:  $ac_old_val" >&2;}
1704	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1705echo "$as_me:   current value: $ac_new_val" >&2;}
1706	ac_cache_corrupted=:
1707      fi;;
1708  esac
1709  # Pass precious variables to config.status.
1710  if test "$ac_new_set" = set; then
1711    case $ac_new_val in
1712    *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1713    *) ac_arg=$ac_var=$ac_new_val ;;
1714    esac
1715    case " $ac_configure_args " in
1716      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1717      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1718    esac
1719  fi
1720done
1721if $ac_cache_corrupted; then
1722  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1723echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1724  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1725echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1726   { (exit 1); exit 1; }; }
1727fi
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753ac_ext=c
1754ac_cpp='$CPP $CPPFLAGS'
1755ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1756ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1757ac_compiler_gnu=$ac_cv_c_compiler_gnu
1758
1759
1760
1761
1762    # TEA extensions pass this us the version of TEA they think they
1763    # are compatible with.
1764    TEA_VERSION="3.9"
1765
1766    { echo "$as_me:$LINENO: checking for correct TEA configuration" >&5
1767echo $ECHO_N "checking for correct TEA configuration... $ECHO_C" >&6; }
1768    if test x"${PACKAGE_NAME}" = x ; then
1769	{ { echo "$as_me:$LINENO: error:
1770The PACKAGE_NAME variable must be defined by your TEA configure.in" >&5
1771echo "$as_me: error:
1772The PACKAGE_NAME variable must be defined by your TEA configure.in" >&2;}
1773   { (exit 1); exit 1; }; }
1774    fi
1775    if test x"3.9" = x ; then
1776	{ { echo "$as_me:$LINENO: error:
1777TEA version not specified." >&5
1778echo "$as_me: error:
1779TEA version not specified." >&2;}
1780   { (exit 1); exit 1; }; }
1781    elif test "3.9" != "${TEA_VERSION}" ; then
1782	{ echo "$as_me:$LINENO: result: warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&5
1783echo "${ECHO_T}warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&6; }
1784    else
1785	{ echo "$as_me:$LINENO: result: ok (TEA ${TEA_VERSION})" >&5
1786echo "${ECHO_T}ok (TEA ${TEA_VERSION})" >&6; }
1787    fi
1788    case "`uname -s`" in
1789	*win32*|*WIN32*|*MINGW32_*)
1790	    # Extract the first word of "cygpath", so it can be a program name with args.
1791set dummy cygpath; ac_word=$2
1792{ echo "$as_me:$LINENO: checking for $ac_word" >&5
1793echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
1794if test "${ac_cv_prog_CYGPATH+set}" = set; then
1795  echo $ECHO_N "(cached) $ECHO_C" >&6
1796else
1797  if test -n "$CYGPATH"; then
1798  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
1799else
1800as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1801for as_dir in $PATH
1802do
1803  IFS=$as_save_IFS
1804  test -z "$as_dir" && as_dir=.
1805  for ac_exec_ext in '' $ac_executable_extensions; do
1806  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
1807    ac_cv_prog_CYGPATH="cygpath -w"
1808    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1809    break 2
1810  fi
1811done
1812done
1813IFS=$as_save_IFS
1814
1815  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
1816fi
1817fi
1818CYGPATH=$ac_cv_prog_CYGPATH
1819if test -n "$CYGPATH"; then
1820  { echo "$as_me:$LINENO: result: $CYGPATH" >&5
1821echo "${ECHO_T}$CYGPATH" >&6; }
1822else
1823  { echo "$as_me:$LINENO: result: no" >&5
1824echo "${ECHO_T}no" >&6; }
1825fi
1826
1827
1828	    EXEEXT=".exe"
1829	    TEA_PLATFORM="windows"
1830	    ;;
1831	*CYGWIN_*)
1832	    CYGPATH=echo
1833	    EXEEXT=".exe"
1834	    # TEA_PLATFORM is determined later in LOAD_TCLCONFIG
1835	    ;;
1836	*)
1837	    CYGPATH=echo
1838	    EXEEXT=""
1839	    TEA_PLATFORM="unix"
1840	    ;;
1841    esac
1842
1843    # Check if exec_prefix is set. If not use fall back to prefix.
1844    # Note when adjusted, so that TEA_PREFIX can correct for this.
1845    # This is needed for recursive configures, since autoconf propagates
1846    # $prefix, but not $exec_prefix (doh!).
1847    if test x$exec_prefix = xNONE ; then
1848	exec_prefix_default=yes
1849	exec_prefix=$prefix
1850    fi
1851
1852    { echo "$as_me:$LINENO: configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}" >&5
1853echo "$as_me: configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}" >&6;}
1854
1855
1856
1857
1858    # This package name must be replaced statically for AC_SUBST to work
1859
1860    # Substitute STUB_LIB_FILE in case package creates a stub library too.
1861
1862
1863    # We AC_SUBST these here to ensure they are subst'ed,
1864    # in case the user doesn't call TEA_ADD_...
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874ac_aux_dir=
1875for ac_dir in tclconfig "$srcdir"/tclconfig; do
1876  if test -f "$ac_dir/install-sh"; then
1877    ac_aux_dir=$ac_dir
1878    ac_install_sh="$ac_aux_dir/install-sh -c"
1879    break
1880  elif test -f "$ac_dir/install.sh"; then
1881    ac_aux_dir=$ac_dir
1882    ac_install_sh="$ac_aux_dir/install.sh -c"
1883    break
1884  elif test -f "$ac_dir/shtool"; then
1885    ac_aux_dir=$ac_dir
1886    ac_install_sh="$ac_aux_dir/shtool install -c"
1887    break
1888  fi
1889done
1890if test -z "$ac_aux_dir"; then
1891  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in tclconfig \"$srcdir\"/tclconfig" >&5
1892echo "$as_me: error: cannot find install-sh or install.sh in tclconfig \"$srcdir\"/tclconfig" >&2;}
1893   { (exit 1); exit 1; }; }
1894fi
1895
1896# These three variables are undocumented and unsupported,
1897# and are intended to be withdrawn in a future Autoconf release.
1898# They can cause serious problems if a builder's source tree is in a directory
1899# whose full name contains unusual characters.
1900ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
1901ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
1902ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
1903
1904
1905
1906#--------------------------------------------------------------------
1907# Configure script for package 'Memchan', as distributed at March 18, 2005.
1908# TEA compliant.
1909#--------------------------------------------------------------------
1910
1911#--------------------------------------------------------------------
1912# Load the tclConfig.sh file
1913#--------------------------------------------------------------------
1914
1915
1916
1917    #
1918    # Ok, lets find the tcl configuration
1919    # First, look for one uninstalled.
1920    # the alternative search directory is invoked by --with-tcl
1921    #
1922
1923    if test x"${no_tcl}" = x ; then
1924	# we reset no_tcl in case something fails here
1925	no_tcl=true
1926
1927# Check whether --with-tcl was given.
1928if test "${with_tcl+set}" = set; then
1929  withval=$with_tcl; with_tclconfig="${withval}"
1930fi
1931
1932	{ echo "$as_me:$LINENO: checking for Tcl configuration" >&5
1933echo $ECHO_N "checking for Tcl configuration... $ECHO_C" >&6; }
1934	if test "${ac_cv_c_tclconfig+set}" = set; then
1935  echo $ECHO_N "(cached) $ECHO_C" >&6
1936else
1937
1938
1939	    # First check to see if --with-tcl was specified.
1940	    if test x"${with_tclconfig}" != x ; then
1941		case "${with_tclconfig}" in
1942		    */tclConfig.sh )
1943			if test -f "${with_tclconfig}"; then
1944			    { echo "$as_me:$LINENO: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&5
1945echo "$as_me: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&2;}
1946			    with_tclconfig="`echo "${with_tclconfig}" | sed 's!/tclConfig\.sh$!!'`"
1947			fi ;;
1948		esac
1949		if test -f "${with_tclconfig}/tclConfig.sh" ; then
1950		    ac_cv_c_tclconfig="`(cd "${with_tclconfig}"; pwd)`"
1951		else
1952		    { { echo "$as_me:$LINENO: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&5
1953echo "$as_me: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&2;}
1954   { (exit 1); exit 1; }; }
1955		fi
1956	    fi
1957
1958	    # then check for a private Tcl installation
1959	    if test x"${ac_cv_c_tclconfig}" = x ; then
1960		for i in \
1961			../tcl \
1962			`ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
1963			`ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
1964			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
1965			../../tcl \
1966			`ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
1967			`ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
1968			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
1969			../../../tcl \
1970			`ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
1971			`ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
1972			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
1973		    if test "${TEA_PLATFORM}" = "windows" \
1974			    -a -f "$i/win/tclConfig.sh" ; then
1975			ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
1976			break
1977		    fi
1978		    if test -f "$i/unix/tclConfig.sh" ; then
1979			ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
1980			break
1981		    fi
1982		done
1983	    fi
1984
1985	    # on Darwin, check in Framework installation locations
1986	    if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
1987		for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
1988			`ls -d /Library/Frameworks 2>/dev/null` \
1989			`ls -d /Network/Library/Frameworks 2>/dev/null` \
1990			`ls -d /System/Library/Frameworks 2>/dev/null` \
1991			; do
1992		    if test -f "$i/Tcl.framework/tclConfig.sh" ; then
1993			ac_cv_c_tclconfig="`(cd $i/Tcl.framework; pwd)`"
1994			break
1995		    fi
1996		done
1997	    fi
1998
1999	    # TEA specific: on Windows, check in common installation locations
2000	    if test "${TEA_PLATFORM}" = "windows" \
2001		-a x"${ac_cv_c_tclconfig}" = x ; then
2002		for i in `ls -d C:/Tcl/lib 2>/dev/null` \
2003			`ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
2004			; do
2005		    if test -f "$i/tclConfig.sh" ; then
2006			ac_cv_c_tclconfig="`(cd $i; pwd)`"
2007			break
2008		    fi
2009		done
2010	    fi
2011
2012	    # check in a few common install locations
2013	    if test x"${ac_cv_c_tclconfig}" = x ; then
2014		for i in `ls -d ${libdir} 2>/dev/null` \
2015			`ls -d ${exec_prefix}/lib 2>/dev/null` \
2016			`ls -d ${prefix}/lib 2>/dev/null` \
2017			`ls -d /usr/local/lib 2>/dev/null` \
2018			`ls -d /usr/contrib/lib 2>/dev/null` \
2019			`ls -d /usr/lib 2>/dev/null` \
2020			`ls -d /usr/lib64 2>/dev/null` \
2021			; do
2022		    if test -f "$i/tclConfig.sh" ; then
2023			ac_cv_c_tclconfig="`(cd $i; pwd)`"
2024			break
2025		    fi
2026		done
2027	    fi
2028
2029	    # check in a few other private locations
2030	    if test x"${ac_cv_c_tclconfig}" = x ; then
2031		for i in \
2032			${srcdir}/../tcl \
2033			`ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2034			`ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
2035			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
2036		    if test "${TEA_PLATFORM}" = "windows" \
2037			    -a -f "$i/win/tclConfig.sh" ; then
2038			ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
2039			break
2040		    fi
2041		    if test -f "$i/unix/tclConfig.sh" ; then
2042			ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
2043			break
2044		    fi
2045		done
2046	    fi
2047
2048fi
2049
2050
2051	if test x"${ac_cv_c_tclconfig}" = x ; then
2052	    TCL_BIN_DIR="# no Tcl configs found"
2053	    { { echo "$as_me:$LINENO: error: Can't find Tcl configuration definitions" >&5
2054echo "$as_me: error: Can't find Tcl configuration definitions" >&2;}
2055   { (exit 1); exit 1; }; }
2056	else
2057	    no_tcl=
2058	    TCL_BIN_DIR="${ac_cv_c_tclconfig}"
2059	    { echo "$as_me:$LINENO: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
2060echo "${ECHO_T}found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
2061	fi
2062    fi
2063
2064
2065    { echo "$as_me:$LINENO: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
2066echo $ECHO_N "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... $ECHO_C" >&6; }
2067
2068    if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
2069        { echo "$as_me:$LINENO: result: loading" >&5
2070echo "${ECHO_T}loading" >&6; }
2071	. "${TCL_BIN_DIR}/tclConfig.sh"
2072    else
2073        { echo "$as_me:$LINENO: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
2074echo "${ECHO_T}could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
2075    fi
2076
2077    # eval is required to do the TCL_DBGX substitution
2078    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
2079    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
2080
2081    # If the TCL_BIN_DIR is the build directory (not the install directory),
2082    # then set the common variable name to the value of the build variables.
2083    # For example, the variable TCL_LIB_SPEC will be set to the value
2084    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
2085    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
2086    # installed and uninstalled version of Tcl.
2087    if test -f "${TCL_BIN_DIR}/Makefile" ; then
2088        TCL_LIB_SPEC="${TCL_BUILD_LIB_SPEC}"
2089        TCL_STUB_LIB_SPEC="${TCL_BUILD_STUB_LIB_SPEC}"
2090        TCL_STUB_LIB_PATH="${TCL_BUILD_STUB_LIB_PATH}"
2091    elif test "`uname -s`" = "Darwin"; then
2092	# If Tcl was built as a framework, attempt to use the libraries
2093	# from the framework at the given location so that linking works
2094	# against Tcl.framework installed in an arbitrary location.
2095	case ${TCL_DEFS} in
2096	    *TCL_FRAMEWORK*)
2097		if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
2098		    for i in "`cd "${TCL_BIN_DIR}"; pwd`" \
2099			     "`cd "${TCL_BIN_DIR}"/../..; pwd`"; do
2100			if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
2101			    TCL_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TCL_LIB_FILE}"
2102			    break
2103			fi
2104		    done
2105		fi
2106		if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
2107		    TCL_STUB_LIB_SPEC="-L`echo "${TCL_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
2108		    TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
2109		fi
2110		;;
2111	esac
2112    fi
2113
2114    # eval is required to do the TCL_DBGX substitution
2115    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
2116    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
2117    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
2118    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133    case "`uname -s`" in
2134	*CYGWIN_*)
2135	    { echo "$as_me:$LINENO: checking for cygwin variant" >&5
2136echo $ECHO_N "checking for cygwin variant... $ECHO_C" >&6; }
2137	    case ${TCL_EXTRA_CFLAGS} in
2138		*-mwin32*|*-mno-cygwin*)
2139		    TEA_PLATFORM="windows"
2140		    CFLAGS="$CFLAGS -mwin32"
2141		    { echo "$as_me:$LINENO: result: win32" >&5
2142echo "${ECHO_T}win32" >&6; }
2143		    ;;
2144		*)
2145		    TEA_PLATFORM="unix"
2146		    { echo "$as_me:$LINENO: result: unix" >&5
2147echo "${ECHO_T}unix" >&6; }
2148		    ;;
2149	    esac
2150	    EXEEXT=".exe"
2151	    ;;
2152	*)
2153	    ;;
2154    esac
2155
2156    # The BUILD_$pkg is to define the correct extern storage class
2157    # handling when making this package
2158
2159cat >>confdefs.h <<_ACEOF
2160#define BUILD_${PACKAGE_NAME}
2161_ACEOF
2162
2163    # Do this here as we have fully defined TEA_PLATFORM now
2164    if test "${TEA_PLATFORM}" = "windows" ; then
2165	CLEANFILES="$CLEANFILES *.lib *.dll *.pdb *.exp"
2166    fi
2167
2168    # TEA specific:
2169
2170
2171
2172
2173
2174
2175
2176
2177#-----------------------------------------------------------------------
2178# Handle the --prefix=... option by defaulting to what Tcl gave.
2179# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
2180#-----------------------------------------------------------------------
2181
2182
2183    if test "${prefix}" = "NONE"; then
2184	prefix_default=yes
2185	if test x"${TCL_PREFIX}" != x; then
2186	    { echo "$as_me:$LINENO: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&5
2187echo "$as_me: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&6;}
2188	    prefix=${TCL_PREFIX}
2189	else
2190	    { echo "$as_me:$LINENO: --prefix defaulting to /usr/local" >&5
2191echo "$as_me: --prefix defaulting to /usr/local" >&6;}
2192	    prefix=/usr/local
2193	fi
2194    fi
2195    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \
2196	-o x"${exec_prefix_default}" = x"yes" ; then
2197	if test x"${TCL_EXEC_PREFIX}" != x; then
2198	    { echo "$as_me:$LINENO: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&5
2199echo "$as_me: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&6;}
2200	    exec_prefix=${TCL_EXEC_PREFIX}
2201	else
2202	    { echo "$as_me:$LINENO: --exec-prefix defaulting to ${prefix}" >&5
2203echo "$as_me: --exec-prefix defaulting to ${prefix}" >&6;}
2204	    exec_prefix=$prefix
2205	fi
2206    fi
2207
2208
2209#-----------------------------------------------------------------------
2210# Standard compiler checks.
2211# This sets up CC by using the CC env var, or looks for gcc otherwise.
2212# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
2213# the basic setup necessary to compile executables.
2214#-----------------------------------------------------------------------
2215
2216
2217    # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE)
2218    # in this macro, they need to go into TEA_SETUP_COMPILER instead.
2219
2220    # If the user did not set CFLAGS, set it now to keep
2221    # the AC_PROG_CC macro from adding "-g -O2".
2222    if test "${CFLAGS+set}" != "set" ; then
2223	CFLAGS=""
2224    fi
2225
2226    ac_ext=c
2227ac_cpp='$CPP $CPPFLAGS'
2228ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2229ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2230ac_compiler_gnu=$ac_cv_c_compiler_gnu
2231if test -n "$ac_tool_prefix"; then
2232  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2233set dummy ${ac_tool_prefix}gcc; ac_word=$2
2234{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2235echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2236if test "${ac_cv_prog_CC+set}" = set; then
2237  echo $ECHO_N "(cached) $ECHO_C" >&6
2238else
2239  if test -n "$CC"; then
2240  ac_cv_prog_CC="$CC" # Let the user override the test.
2241else
2242as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2243for as_dir in $PATH
2244do
2245  IFS=$as_save_IFS
2246  test -z "$as_dir" && as_dir=.
2247  for ac_exec_ext in '' $ac_executable_extensions; do
2248  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2249    ac_cv_prog_CC="${ac_tool_prefix}gcc"
2250    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2251    break 2
2252  fi
2253done
2254done
2255IFS=$as_save_IFS
2256
2257fi
2258fi
2259CC=$ac_cv_prog_CC
2260if test -n "$CC"; then
2261  { echo "$as_me:$LINENO: result: $CC" >&5
2262echo "${ECHO_T}$CC" >&6; }
2263else
2264  { echo "$as_me:$LINENO: result: no" >&5
2265echo "${ECHO_T}no" >&6; }
2266fi
2267
2268
2269fi
2270if test -z "$ac_cv_prog_CC"; then
2271  ac_ct_CC=$CC
2272  # Extract the first word of "gcc", so it can be a program name with args.
2273set dummy gcc; ac_word=$2
2274{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2275echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2276if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2277  echo $ECHO_N "(cached) $ECHO_C" >&6
2278else
2279  if test -n "$ac_ct_CC"; then
2280  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2281else
2282as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2283for as_dir in $PATH
2284do
2285  IFS=$as_save_IFS
2286  test -z "$as_dir" && as_dir=.
2287  for ac_exec_ext in '' $ac_executable_extensions; do
2288  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2289    ac_cv_prog_ac_ct_CC="gcc"
2290    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2291    break 2
2292  fi
2293done
2294done
2295IFS=$as_save_IFS
2296
2297fi
2298fi
2299ac_ct_CC=$ac_cv_prog_ac_ct_CC
2300if test -n "$ac_ct_CC"; then
2301  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2302echo "${ECHO_T}$ac_ct_CC" >&6; }
2303else
2304  { echo "$as_me:$LINENO: result: no" >&5
2305echo "${ECHO_T}no" >&6; }
2306fi
2307
2308  if test "x$ac_ct_CC" = x; then
2309    CC=""
2310  else
2311    case $cross_compiling:$ac_tool_warned in
2312yes:)
2313{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2314whose name does not start with the host triplet.  If you think this
2315configuration is useful to you, please write to autoconf@gnu.org." >&5
2316echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2317whose name does not start with the host triplet.  If you think this
2318configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2319ac_tool_warned=yes ;;
2320esac
2321    CC=$ac_ct_CC
2322  fi
2323else
2324  CC="$ac_cv_prog_CC"
2325fi
2326
2327if test -z "$CC"; then
2328          if test -n "$ac_tool_prefix"; then
2329    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2330set dummy ${ac_tool_prefix}cc; ac_word=$2
2331{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2332echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2333if test "${ac_cv_prog_CC+set}" = set; then
2334  echo $ECHO_N "(cached) $ECHO_C" >&6
2335else
2336  if test -n "$CC"; then
2337  ac_cv_prog_CC="$CC" # Let the user override the test.
2338else
2339as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2340for as_dir in $PATH
2341do
2342  IFS=$as_save_IFS
2343  test -z "$as_dir" && as_dir=.
2344  for ac_exec_ext in '' $ac_executable_extensions; do
2345  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2346    ac_cv_prog_CC="${ac_tool_prefix}cc"
2347    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2348    break 2
2349  fi
2350done
2351done
2352IFS=$as_save_IFS
2353
2354fi
2355fi
2356CC=$ac_cv_prog_CC
2357if test -n "$CC"; then
2358  { echo "$as_me:$LINENO: result: $CC" >&5
2359echo "${ECHO_T}$CC" >&6; }
2360else
2361  { echo "$as_me:$LINENO: result: no" >&5
2362echo "${ECHO_T}no" >&6; }
2363fi
2364
2365
2366  fi
2367fi
2368if test -z "$CC"; then
2369  # Extract the first word of "cc", so it can be a program name with args.
2370set dummy cc; ac_word=$2
2371{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2372echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2373if test "${ac_cv_prog_CC+set}" = set; then
2374  echo $ECHO_N "(cached) $ECHO_C" >&6
2375else
2376  if test -n "$CC"; then
2377  ac_cv_prog_CC="$CC" # Let the user override the test.
2378else
2379  ac_prog_rejected=no
2380as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2381for as_dir in $PATH
2382do
2383  IFS=$as_save_IFS
2384  test -z "$as_dir" && as_dir=.
2385  for ac_exec_ext in '' $ac_executable_extensions; do
2386  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2387    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2388       ac_prog_rejected=yes
2389       continue
2390     fi
2391    ac_cv_prog_CC="cc"
2392    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2393    break 2
2394  fi
2395done
2396done
2397IFS=$as_save_IFS
2398
2399if test $ac_prog_rejected = yes; then
2400  # We found a bogon in the path, so make sure we never use it.
2401  set dummy $ac_cv_prog_CC
2402  shift
2403  if test $# != 0; then
2404    # We chose a different compiler from the bogus one.
2405    # However, it has the same basename, so the bogon will be chosen
2406    # first if we set CC to just the basename; use the full file name.
2407    shift
2408    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2409  fi
2410fi
2411fi
2412fi
2413CC=$ac_cv_prog_CC
2414if test -n "$CC"; then
2415  { echo "$as_me:$LINENO: result: $CC" >&5
2416echo "${ECHO_T}$CC" >&6; }
2417else
2418  { echo "$as_me:$LINENO: result: no" >&5
2419echo "${ECHO_T}no" >&6; }
2420fi
2421
2422
2423fi
2424if test -z "$CC"; then
2425  if test -n "$ac_tool_prefix"; then
2426  for ac_prog in cl.exe
2427  do
2428    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2429set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2430{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2431echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2432if test "${ac_cv_prog_CC+set}" = set; then
2433  echo $ECHO_N "(cached) $ECHO_C" >&6
2434else
2435  if test -n "$CC"; then
2436  ac_cv_prog_CC="$CC" # Let the user override the test.
2437else
2438as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2439for as_dir in $PATH
2440do
2441  IFS=$as_save_IFS
2442  test -z "$as_dir" && as_dir=.
2443  for ac_exec_ext in '' $ac_executable_extensions; do
2444  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2445    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2446    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2447    break 2
2448  fi
2449done
2450done
2451IFS=$as_save_IFS
2452
2453fi
2454fi
2455CC=$ac_cv_prog_CC
2456if test -n "$CC"; then
2457  { echo "$as_me:$LINENO: result: $CC" >&5
2458echo "${ECHO_T}$CC" >&6; }
2459else
2460  { echo "$as_me:$LINENO: result: no" >&5
2461echo "${ECHO_T}no" >&6; }
2462fi
2463
2464
2465    test -n "$CC" && break
2466  done
2467fi
2468if test -z "$CC"; then
2469  ac_ct_CC=$CC
2470  for ac_prog in cl.exe
2471do
2472  # Extract the first word of "$ac_prog", so it can be a program name with args.
2473set dummy $ac_prog; ac_word=$2
2474{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2475echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2476if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2477  echo $ECHO_N "(cached) $ECHO_C" >&6
2478else
2479  if test -n "$ac_ct_CC"; then
2480  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2481else
2482as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2483for as_dir in $PATH
2484do
2485  IFS=$as_save_IFS
2486  test -z "$as_dir" && as_dir=.
2487  for ac_exec_ext in '' $ac_executable_extensions; do
2488  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2489    ac_cv_prog_ac_ct_CC="$ac_prog"
2490    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2491    break 2
2492  fi
2493done
2494done
2495IFS=$as_save_IFS
2496
2497fi
2498fi
2499ac_ct_CC=$ac_cv_prog_ac_ct_CC
2500if test -n "$ac_ct_CC"; then
2501  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2502echo "${ECHO_T}$ac_ct_CC" >&6; }
2503else
2504  { echo "$as_me:$LINENO: result: no" >&5
2505echo "${ECHO_T}no" >&6; }
2506fi
2507
2508
2509  test -n "$ac_ct_CC" && break
2510done
2511
2512  if test "x$ac_ct_CC" = x; then
2513    CC=""
2514  else
2515    case $cross_compiling:$ac_tool_warned in
2516yes:)
2517{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2518whose name does not start with the host triplet.  If you think this
2519configuration is useful to you, please write to autoconf@gnu.org." >&5
2520echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2521whose name does not start with the host triplet.  If you think this
2522configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2523ac_tool_warned=yes ;;
2524esac
2525    CC=$ac_ct_CC
2526  fi
2527fi
2528
2529fi
2530
2531
2532test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2533See \`config.log' for more details." >&5
2534echo "$as_me: error: no acceptable C compiler found in \$PATH
2535See \`config.log' for more details." >&2;}
2536   { (exit 1); exit 1; }; }
2537
2538# Provide some information about the compiler.
2539echo "$as_me:$LINENO: checking for C compiler version" >&5
2540ac_compiler=`set X $ac_compile; echo $2`
2541{ (ac_try="$ac_compiler --version >&5"
2542case "(($ac_try" in
2543  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2544  *) ac_try_echo=$ac_try;;
2545esac
2546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2547  (eval "$ac_compiler --version >&5") 2>&5
2548  ac_status=$?
2549  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2550  (exit $ac_status); }
2551{ (ac_try="$ac_compiler -v >&5"
2552case "(($ac_try" in
2553  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2554  *) ac_try_echo=$ac_try;;
2555esac
2556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2557  (eval "$ac_compiler -v >&5") 2>&5
2558  ac_status=$?
2559  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2560  (exit $ac_status); }
2561{ (ac_try="$ac_compiler -V >&5"
2562case "(($ac_try" in
2563  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2564  *) ac_try_echo=$ac_try;;
2565esac
2566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2567  (eval "$ac_compiler -V >&5") 2>&5
2568  ac_status=$?
2569  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2570  (exit $ac_status); }
2571
2572cat >conftest.$ac_ext <<_ACEOF
2573/* confdefs.h.  */
2574_ACEOF
2575cat confdefs.h >>conftest.$ac_ext
2576cat >>conftest.$ac_ext <<_ACEOF
2577/* end confdefs.h.  */
2578
2579int
2580main ()
2581{
2582
2583  ;
2584  return 0;
2585}
2586_ACEOF
2587ac_clean_files_save=$ac_clean_files
2588ac_clean_files="$ac_clean_files a.out a.exe b.out"
2589# Try to create an executable without -o first, disregard a.out.
2590# It will help us diagnose broken compilers, and finding out an intuition
2591# of exeext.
2592{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2593echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2594ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2595#
2596# List of possible output files, starting from the most likely.
2597# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2598# only as a last resort.  b.out is created by i960 compilers.
2599ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2600#
2601# The IRIX 6 linker writes into existing files which may not be
2602# executable, retaining their permissions.  Remove them first so a
2603# subsequent execution test works.
2604ac_rmfiles=
2605for ac_file in $ac_files
2606do
2607  case $ac_file in
2608    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2609    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2610  esac
2611done
2612rm -f $ac_rmfiles
2613
2614if { (ac_try="$ac_link_default"
2615case "(($ac_try" in
2616  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2617  *) ac_try_echo=$ac_try;;
2618esac
2619eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2620  (eval "$ac_link_default") 2>&5
2621  ac_status=$?
2622  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2623  (exit $ac_status); }; then
2624  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2625# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2626# in a Makefile.  We should not override ac_cv_exeext if it was cached,
2627# so that the user can short-circuit this test for compilers unknown to
2628# Autoconf.
2629for ac_file in $ac_files ''
2630do
2631  test -f "$ac_file" || continue
2632  case $ac_file in
2633    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
2634	;;
2635    [ab].out )
2636	# We found the default executable, but exeext='' is most
2637	# certainly right.
2638	break;;
2639    *.* )
2640        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2641	then :; else
2642	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2643	fi
2644	# We set ac_cv_exeext here because the later test for it is not
2645	# safe: cross compilers may not add the suffix if given an `-o'
2646	# argument, so we may need to know it at that point already.
2647	# Even if this section looks crufty: it has the advantage of
2648	# actually working.
2649	break;;
2650    * )
2651	break;;
2652  esac
2653done
2654test "$ac_cv_exeext" = no && ac_cv_exeext=
2655
2656else
2657  ac_file=''
2658fi
2659
2660{ echo "$as_me:$LINENO: result: $ac_file" >&5
2661echo "${ECHO_T}$ac_file" >&6; }
2662if test -z "$ac_file"; then
2663  echo "$as_me: failed program was:" >&5
2664sed 's/^/| /' conftest.$ac_ext >&5
2665
2666{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2667See \`config.log' for more details." >&5
2668echo "$as_me: error: C compiler cannot create executables
2669See \`config.log' for more details." >&2;}
2670   { (exit 77); exit 77; }; }
2671fi
2672
2673ac_exeext=$ac_cv_exeext
2674
2675# Check that the compiler produces executables we can run.  If not, either
2676# the compiler is broken, or we cross compile.
2677{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2678echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
2679# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2680# If not cross compiling, check that we can run a simple program.
2681if test "$cross_compiling" != yes; then
2682  if { ac_try='./$ac_file'
2683  { (case "(($ac_try" in
2684  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2685  *) ac_try_echo=$ac_try;;
2686esac
2687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2688  (eval "$ac_try") 2>&5
2689  ac_status=$?
2690  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2691  (exit $ac_status); }; }; then
2692    cross_compiling=no
2693  else
2694    if test "$cross_compiling" = maybe; then
2695	cross_compiling=yes
2696    else
2697	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2698If you meant to cross compile, use \`--host'.
2699See \`config.log' for more details." >&5
2700echo "$as_me: error: cannot run C compiled programs.
2701If you meant to cross compile, use \`--host'.
2702See \`config.log' for more details." >&2;}
2703   { (exit 1); exit 1; }; }
2704    fi
2705  fi
2706fi
2707{ echo "$as_me:$LINENO: result: yes" >&5
2708echo "${ECHO_T}yes" >&6; }
2709
2710rm -f a.out a.exe conftest$ac_cv_exeext b.out
2711ac_clean_files=$ac_clean_files_save
2712# Check that the compiler produces executables we can run.  If not, either
2713# the compiler is broken, or we cross compile.
2714{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2715echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2716{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2717echo "${ECHO_T}$cross_compiling" >&6; }
2718
2719{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2720echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2721if { (ac_try="$ac_link"
2722case "(($ac_try" in
2723  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2724  *) ac_try_echo=$ac_try;;
2725esac
2726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2727  (eval "$ac_link") 2>&5
2728  ac_status=$?
2729  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2730  (exit $ac_status); }; then
2731  # If both `conftest.exe' and `conftest' are `present' (well, observable)
2732# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2733# work properly (i.e., refer to `conftest.exe'), while it won't with
2734# `rm'.
2735for ac_file in conftest.exe conftest conftest.*; do
2736  test -f "$ac_file" || continue
2737  case $ac_file in
2738    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2739    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2740	  break;;
2741    * ) break;;
2742  esac
2743done
2744else
2745  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2746See \`config.log' for more details." >&5
2747echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2748See \`config.log' for more details." >&2;}
2749   { (exit 1); exit 1; }; }
2750fi
2751
2752rm -f conftest$ac_cv_exeext
2753{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2754echo "${ECHO_T}$ac_cv_exeext" >&6; }
2755
2756rm -f conftest.$ac_ext
2757EXEEXT=$ac_cv_exeext
2758ac_exeext=$EXEEXT
2759{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2760echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
2761if test "${ac_cv_objext+set}" = set; then
2762  echo $ECHO_N "(cached) $ECHO_C" >&6
2763else
2764  cat >conftest.$ac_ext <<_ACEOF
2765/* confdefs.h.  */
2766_ACEOF
2767cat confdefs.h >>conftest.$ac_ext
2768cat >>conftest.$ac_ext <<_ACEOF
2769/* end confdefs.h.  */
2770
2771int
2772main ()
2773{
2774
2775  ;
2776  return 0;
2777}
2778_ACEOF
2779rm -f conftest.o conftest.obj
2780if { (ac_try="$ac_compile"
2781case "(($ac_try" in
2782  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2783  *) ac_try_echo=$ac_try;;
2784esac
2785eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2786  (eval "$ac_compile") 2>&5
2787  ac_status=$?
2788  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2789  (exit $ac_status); }; then
2790  for ac_file in conftest.o conftest.obj conftest.*; do
2791  test -f "$ac_file" || continue;
2792  case $ac_file in
2793    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
2794    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2795       break;;
2796  esac
2797done
2798else
2799  echo "$as_me: failed program was:" >&5
2800sed 's/^/| /' conftest.$ac_ext >&5
2801
2802{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2803See \`config.log' for more details." >&5
2804echo "$as_me: error: cannot compute suffix of object files: cannot compile
2805See \`config.log' for more details." >&2;}
2806   { (exit 1); exit 1; }; }
2807fi
2808
2809rm -f conftest.$ac_cv_objext conftest.$ac_ext
2810fi
2811{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2812echo "${ECHO_T}$ac_cv_objext" >&6; }
2813OBJEXT=$ac_cv_objext
2814ac_objext=$OBJEXT
2815{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2816echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
2817if test "${ac_cv_c_compiler_gnu+set}" = set; then
2818  echo $ECHO_N "(cached) $ECHO_C" >&6
2819else
2820  cat >conftest.$ac_ext <<_ACEOF
2821/* confdefs.h.  */
2822_ACEOF
2823cat confdefs.h >>conftest.$ac_ext
2824cat >>conftest.$ac_ext <<_ACEOF
2825/* end confdefs.h.  */
2826
2827int
2828main ()
2829{
2830#ifndef __GNUC__
2831       choke me
2832#endif
2833
2834  ;
2835  return 0;
2836}
2837_ACEOF
2838rm -f conftest.$ac_objext
2839if { (ac_try="$ac_compile"
2840case "(($ac_try" in
2841  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2842  *) ac_try_echo=$ac_try;;
2843esac
2844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2845  (eval "$ac_compile") 2>conftest.er1
2846  ac_status=$?
2847  grep -v '^ *+' conftest.er1 >conftest.err
2848  rm -f conftest.er1
2849  cat conftest.err >&5
2850  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2851  (exit $ac_status); } && {
2852	 test -z "$ac_c_werror_flag" ||
2853	 test ! -s conftest.err
2854       } && test -s conftest.$ac_objext; then
2855  ac_compiler_gnu=yes
2856else
2857  echo "$as_me: failed program was:" >&5
2858sed 's/^/| /' conftest.$ac_ext >&5
2859
2860	ac_compiler_gnu=no
2861fi
2862
2863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2864ac_cv_c_compiler_gnu=$ac_compiler_gnu
2865
2866fi
2867{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2868echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2869GCC=`test $ac_compiler_gnu = yes && echo yes`
2870ac_test_CFLAGS=${CFLAGS+set}
2871ac_save_CFLAGS=$CFLAGS
2872{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2873echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
2874if test "${ac_cv_prog_cc_g+set}" = set; then
2875  echo $ECHO_N "(cached) $ECHO_C" >&6
2876else
2877  ac_save_c_werror_flag=$ac_c_werror_flag
2878   ac_c_werror_flag=yes
2879   ac_cv_prog_cc_g=no
2880   CFLAGS="-g"
2881   cat >conftest.$ac_ext <<_ACEOF
2882/* confdefs.h.  */
2883_ACEOF
2884cat confdefs.h >>conftest.$ac_ext
2885cat >>conftest.$ac_ext <<_ACEOF
2886/* end confdefs.h.  */
2887
2888int
2889main ()
2890{
2891
2892  ;
2893  return 0;
2894}
2895_ACEOF
2896rm -f conftest.$ac_objext
2897if { (ac_try="$ac_compile"
2898case "(($ac_try" in
2899  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2900  *) ac_try_echo=$ac_try;;
2901esac
2902eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2903  (eval "$ac_compile") 2>conftest.er1
2904  ac_status=$?
2905  grep -v '^ *+' conftest.er1 >conftest.err
2906  rm -f conftest.er1
2907  cat conftest.err >&5
2908  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2909  (exit $ac_status); } && {
2910	 test -z "$ac_c_werror_flag" ||
2911	 test ! -s conftest.err
2912       } && test -s conftest.$ac_objext; then
2913  ac_cv_prog_cc_g=yes
2914else
2915  echo "$as_me: failed program was:" >&5
2916sed 's/^/| /' conftest.$ac_ext >&5
2917
2918	CFLAGS=""
2919      cat >conftest.$ac_ext <<_ACEOF
2920/* confdefs.h.  */
2921_ACEOF
2922cat confdefs.h >>conftest.$ac_ext
2923cat >>conftest.$ac_ext <<_ACEOF
2924/* end confdefs.h.  */
2925
2926int
2927main ()
2928{
2929
2930  ;
2931  return 0;
2932}
2933_ACEOF
2934rm -f conftest.$ac_objext
2935if { (ac_try="$ac_compile"
2936case "(($ac_try" in
2937  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2938  *) ac_try_echo=$ac_try;;
2939esac
2940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2941  (eval "$ac_compile") 2>conftest.er1
2942  ac_status=$?
2943  grep -v '^ *+' conftest.er1 >conftest.err
2944  rm -f conftest.er1
2945  cat conftest.err >&5
2946  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2947  (exit $ac_status); } && {
2948	 test -z "$ac_c_werror_flag" ||
2949	 test ! -s conftest.err
2950       } && test -s conftest.$ac_objext; then
2951  :
2952else
2953  echo "$as_me: failed program was:" >&5
2954sed 's/^/| /' conftest.$ac_ext >&5
2955
2956	ac_c_werror_flag=$ac_save_c_werror_flag
2957	 CFLAGS="-g"
2958	 cat >conftest.$ac_ext <<_ACEOF
2959/* confdefs.h.  */
2960_ACEOF
2961cat confdefs.h >>conftest.$ac_ext
2962cat >>conftest.$ac_ext <<_ACEOF
2963/* end confdefs.h.  */
2964
2965int
2966main ()
2967{
2968
2969  ;
2970  return 0;
2971}
2972_ACEOF
2973rm -f conftest.$ac_objext
2974if { (ac_try="$ac_compile"
2975case "(($ac_try" in
2976  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2977  *) ac_try_echo=$ac_try;;
2978esac
2979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2980  (eval "$ac_compile") 2>conftest.er1
2981  ac_status=$?
2982  grep -v '^ *+' conftest.er1 >conftest.err
2983  rm -f conftest.er1
2984  cat conftest.err >&5
2985  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2986  (exit $ac_status); } && {
2987	 test -z "$ac_c_werror_flag" ||
2988	 test ! -s conftest.err
2989       } && test -s conftest.$ac_objext; then
2990  ac_cv_prog_cc_g=yes
2991else
2992  echo "$as_me: failed program was:" >&5
2993sed 's/^/| /' conftest.$ac_ext >&5
2994
2995
2996fi
2997
2998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2999fi
3000
3001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3002fi
3003
3004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3005   ac_c_werror_flag=$ac_save_c_werror_flag
3006fi
3007{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3008echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
3009if test "$ac_test_CFLAGS" = set; then
3010  CFLAGS=$ac_save_CFLAGS
3011elif test $ac_cv_prog_cc_g = yes; then
3012  if test "$GCC" = yes; then
3013    CFLAGS="-g -O2"
3014  else
3015    CFLAGS="-g"
3016  fi
3017else
3018  if test "$GCC" = yes; then
3019    CFLAGS="-O2"
3020  else
3021    CFLAGS=
3022  fi
3023fi
3024{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3025echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3026if test "${ac_cv_prog_cc_c89+set}" = set; then
3027  echo $ECHO_N "(cached) $ECHO_C" >&6
3028else
3029  ac_cv_prog_cc_c89=no
3030ac_save_CC=$CC
3031cat >conftest.$ac_ext <<_ACEOF
3032/* confdefs.h.  */
3033_ACEOF
3034cat confdefs.h >>conftest.$ac_ext
3035cat >>conftest.$ac_ext <<_ACEOF
3036/* end confdefs.h.  */
3037#include <stdarg.h>
3038#include <stdio.h>
3039#include <sys/types.h>
3040#include <sys/stat.h>
3041/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3042struct buf { int x; };
3043FILE * (*rcsopen) (struct buf *, struct stat *, int);
3044static char *e (p, i)
3045     char **p;
3046     int i;
3047{
3048  return p[i];
3049}
3050static char *f (char * (*g) (char **, int), char **p, ...)
3051{
3052  char *s;
3053  va_list v;
3054  va_start (v,p);
3055  s = g (p, va_arg (v,int));
3056  va_end (v);
3057  return s;
3058}
3059
3060/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3061   function prototypes and stuff, but not '\xHH' hex character constants.
3062   These don't provoke an error unfortunately, instead are silently treated
3063   as 'x'.  The following induces an error, until -std is added to get
3064   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3065   array size at least.  It's necessary to write '\x00'==0 to get something
3066   that's true only with -std.  */
3067int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3068
3069/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3070   inside strings and character constants.  */
3071#define FOO(x) 'x'
3072int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3073
3074int test (int i, double x);
3075struct s1 {int (*f) (int a);};
3076struct s2 {int (*f) (double a);};
3077int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3078int argc;
3079char **argv;
3080int
3081main ()
3082{
3083return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3084  ;
3085  return 0;
3086}
3087_ACEOF
3088for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3089	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3090do
3091  CC="$ac_save_CC $ac_arg"
3092  rm -f conftest.$ac_objext
3093if { (ac_try="$ac_compile"
3094case "(($ac_try" in
3095  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3096  *) ac_try_echo=$ac_try;;
3097esac
3098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3099  (eval "$ac_compile") 2>conftest.er1
3100  ac_status=$?
3101  grep -v '^ *+' conftest.er1 >conftest.err
3102  rm -f conftest.er1
3103  cat conftest.err >&5
3104  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3105  (exit $ac_status); } && {
3106	 test -z "$ac_c_werror_flag" ||
3107	 test ! -s conftest.err
3108       } && test -s conftest.$ac_objext; then
3109  ac_cv_prog_cc_c89=$ac_arg
3110else
3111  echo "$as_me: failed program was:" >&5
3112sed 's/^/| /' conftest.$ac_ext >&5
3113
3114
3115fi
3116
3117rm -f core conftest.err conftest.$ac_objext
3118  test "x$ac_cv_prog_cc_c89" != "xno" && break
3119done
3120rm -f conftest.$ac_ext
3121CC=$ac_save_CC
3122
3123fi
3124# AC_CACHE_VAL
3125case "x$ac_cv_prog_cc_c89" in
3126  x)
3127    { echo "$as_me:$LINENO: result: none needed" >&5
3128echo "${ECHO_T}none needed" >&6; } ;;
3129  xno)
3130    { echo "$as_me:$LINENO: result: unsupported" >&5
3131echo "${ECHO_T}unsupported" >&6; } ;;
3132  *)
3133    CC="$CC $ac_cv_prog_cc_c89"
3134    { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3135echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
3136esac
3137
3138
3139ac_ext=c
3140ac_cpp='$CPP $CPPFLAGS'
3141ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3142ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3143ac_compiler_gnu=$ac_cv_c_compiler_gnu
3144
3145    ac_ext=c
3146ac_cpp='$CPP $CPPFLAGS'
3147ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3148ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3149ac_compiler_gnu=$ac_cv_c_compiler_gnu
3150{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3151echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
3152# On Suns, sometimes $CPP names a directory.
3153if test -n "$CPP" && test -d "$CPP"; then
3154  CPP=
3155fi
3156if test -z "$CPP"; then
3157  if test "${ac_cv_prog_CPP+set}" = set; then
3158  echo $ECHO_N "(cached) $ECHO_C" >&6
3159else
3160      # Double quotes because CPP needs to be expanded
3161    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3162    do
3163      ac_preproc_ok=false
3164for ac_c_preproc_warn_flag in '' yes
3165do
3166  # Use a header file that comes with gcc, so configuring glibc
3167  # with a fresh cross-compiler works.
3168  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3169  # <limits.h> exists even on freestanding compilers.
3170  # On the NeXT, cc -E runs the code through the compiler's parser,
3171  # not just through cpp. "Syntax error" is here to catch this case.
3172  cat >conftest.$ac_ext <<_ACEOF
3173/* confdefs.h.  */
3174_ACEOF
3175cat confdefs.h >>conftest.$ac_ext
3176cat >>conftest.$ac_ext <<_ACEOF
3177/* end confdefs.h.  */
3178#ifdef __STDC__
3179# include <limits.h>
3180#else
3181# include <assert.h>
3182#endif
3183		     Syntax error
3184_ACEOF
3185if { (ac_try="$ac_cpp conftest.$ac_ext"
3186case "(($ac_try" in
3187  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3188  *) ac_try_echo=$ac_try;;
3189esac
3190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3191  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3192  ac_status=$?
3193  grep -v '^ *+' conftest.er1 >conftest.err
3194  rm -f conftest.er1
3195  cat conftest.err >&5
3196  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3197  (exit $ac_status); } >/dev/null && {
3198	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3199	 test ! -s conftest.err
3200       }; then
3201  :
3202else
3203  echo "$as_me: failed program was:" >&5
3204sed 's/^/| /' conftest.$ac_ext >&5
3205
3206  # Broken: fails on valid input.
3207continue
3208fi
3209
3210rm -f conftest.err conftest.$ac_ext
3211
3212  # OK, works on sane cases.  Now check whether nonexistent headers
3213  # can be detected and how.
3214  cat >conftest.$ac_ext <<_ACEOF
3215/* confdefs.h.  */
3216_ACEOF
3217cat confdefs.h >>conftest.$ac_ext
3218cat >>conftest.$ac_ext <<_ACEOF
3219/* end confdefs.h.  */
3220#include <ac_nonexistent.h>
3221_ACEOF
3222if { (ac_try="$ac_cpp conftest.$ac_ext"
3223case "(($ac_try" in
3224  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3225  *) ac_try_echo=$ac_try;;
3226esac
3227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3228  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3229  ac_status=$?
3230  grep -v '^ *+' conftest.er1 >conftest.err
3231  rm -f conftest.er1
3232  cat conftest.err >&5
3233  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3234  (exit $ac_status); } >/dev/null && {
3235	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3236	 test ! -s conftest.err
3237       }; then
3238  # Broken: success on invalid input.
3239continue
3240else
3241  echo "$as_me: failed program was:" >&5
3242sed 's/^/| /' conftest.$ac_ext >&5
3243
3244  # Passes both tests.
3245ac_preproc_ok=:
3246break
3247fi
3248
3249rm -f conftest.err conftest.$ac_ext
3250
3251done
3252# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3253rm -f conftest.err conftest.$ac_ext
3254if $ac_preproc_ok; then
3255  break
3256fi
3257
3258    done
3259    ac_cv_prog_CPP=$CPP
3260
3261fi
3262  CPP=$ac_cv_prog_CPP
3263else
3264  ac_cv_prog_CPP=$CPP
3265fi
3266{ echo "$as_me:$LINENO: result: $CPP" >&5
3267echo "${ECHO_T}$CPP" >&6; }
3268ac_preproc_ok=false
3269for ac_c_preproc_warn_flag in '' yes
3270do
3271  # Use a header file that comes with gcc, so configuring glibc
3272  # with a fresh cross-compiler works.
3273  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3274  # <limits.h> exists even on freestanding compilers.
3275  # On the NeXT, cc -E runs the code through the compiler's parser,
3276  # not just through cpp. "Syntax error" is here to catch this case.
3277  cat >conftest.$ac_ext <<_ACEOF
3278/* confdefs.h.  */
3279_ACEOF
3280cat confdefs.h >>conftest.$ac_ext
3281cat >>conftest.$ac_ext <<_ACEOF
3282/* end confdefs.h.  */
3283#ifdef __STDC__
3284# include <limits.h>
3285#else
3286# include <assert.h>
3287#endif
3288		     Syntax error
3289_ACEOF
3290if { (ac_try="$ac_cpp conftest.$ac_ext"
3291case "(($ac_try" in
3292  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3293  *) ac_try_echo=$ac_try;;
3294esac
3295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3296  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3297  ac_status=$?
3298  grep -v '^ *+' conftest.er1 >conftest.err
3299  rm -f conftest.er1
3300  cat conftest.err >&5
3301  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3302  (exit $ac_status); } >/dev/null && {
3303	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3304	 test ! -s conftest.err
3305       }; then
3306  :
3307else
3308  echo "$as_me: failed program was:" >&5
3309sed 's/^/| /' conftest.$ac_ext >&5
3310
3311  # Broken: fails on valid input.
3312continue
3313fi
3314
3315rm -f conftest.err conftest.$ac_ext
3316
3317  # OK, works on sane cases.  Now check whether nonexistent headers
3318  # can be detected and how.
3319  cat >conftest.$ac_ext <<_ACEOF
3320/* confdefs.h.  */
3321_ACEOF
3322cat confdefs.h >>conftest.$ac_ext
3323cat >>conftest.$ac_ext <<_ACEOF
3324/* end confdefs.h.  */
3325#include <ac_nonexistent.h>
3326_ACEOF
3327if { (ac_try="$ac_cpp conftest.$ac_ext"
3328case "(($ac_try" in
3329  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3330  *) ac_try_echo=$ac_try;;
3331esac
3332eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3333  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3334  ac_status=$?
3335  grep -v '^ *+' conftest.er1 >conftest.err
3336  rm -f conftest.er1
3337  cat conftest.err >&5
3338  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3339  (exit $ac_status); } >/dev/null && {
3340	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3341	 test ! -s conftest.err
3342       }; then
3343  # Broken: success on invalid input.
3344continue
3345else
3346  echo "$as_me: failed program was:" >&5
3347sed 's/^/| /' conftest.$ac_ext >&5
3348
3349  # Passes both tests.
3350ac_preproc_ok=:
3351break
3352fi
3353
3354rm -f conftest.err conftest.$ac_ext
3355
3356done
3357# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3358rm -f conftest.err conftest.$ac_ext
3359if $ac_preproc_ok; then
3360  :
3361else
3362  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3363See \`config.log' for more details." >&5
3364echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3365See \`config.log' for more details." >&2;}
3366   { (exit 1); exit 1; }; }
3367fi
3368
3369ac_ext=c
3370ac_cpp='$CPP $CPPFLAGS'
3371ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3372ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3373ac_compiler_gnu=$ac_cv_c_compiler_gnu
3374
3375
3376    # Find a good install program.  We prefer a C program (faster),
3377# so one script is as good as another.  But avoid the broken or
3378# incompatible versions:
3379# SysV /etc/install, /usr/sbin/install
3380# SunOS /usr/etc/install
3381# IRIX /sbin/install
3382# AIX /bin/install
3383# AmigaOS /C/install, which installs bootblocks on floppy discs
3384# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3385# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3386# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3387# OS/2's system install, which has a completely different semantic
3388# ./install, which can be erroneously created by make from ./install.sh.
3389{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3390echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
3391if test -z "$INSTALL"; then
3392if test "${ac_cv_path_install+set}" = set; then
3393  echo $ECHO_N "(cached) $ECHO_C" >&6
3394else
3395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3396for as_dir in $PATH
3397do
3398  IFS=$as_save_IFS
3399  test -z "$as_dir" && as_dir=.
3400  # Account for people who put trailing slashes in PATH elements.
3401case $as_dir/ in
3402  ./ | .// | /cC/* | \
3403  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3404  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
3405  /usr/ucb/* ) ;;
3406  *)
3407    # OSF1 and SCO ODT 3.0 have their own names for install.
3408    # Don't use installbsd from OSF since it installs stuff as root
3409    # by default.
3410    for ac_prog in ginstall scoinst install; do
3411      for ac_exec_ext in '' $ac_executable_extensions; do
3412	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3413	  if test $ac_prog = install &&
3414	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3415	    # AIX install.  It has an incompatible calling convention.
3416	    :
3417	  elif test $ac_prog = install &&
3418	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3419	    # program-specific install script used by HP pwplus--don't use.
3420	    :
3421	  else
3422	    ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3423	    break 3
3424	  fi
3425	fi
3426      done
3427    done
3428    ;;
3429esac
3430done
3431IFS=$as_save_IFS
3432
3433
3434fi
3435  if test "${ac_cv_path_install+set}" = set; then
3436    INSTALL=$ac_cv_path_install
3437  else
3438    # As a last resort, use the slow shell script.  Don't cache a
3439    # value for INSTALL within a source directory, because that will
3440    # break other packages using the cache if that directory is
3441    # removed, or if the value is a relative name.
3442    INSTALL=$ac_install_sh
3443  fi
3444fi
3445{ echo "$as_me:$LINENO: result: $INSTALL" >&5
3446echo "${ECHO_T}$INSTALL" >&6; }
3447
3448# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3449# It thinks the first close brace ends the variable substitution.
3450test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3451
3452test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3453
3454test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3455
3456
3457    #--------------------------------------------------------------------
3458    # Checks to see if the make program sets the $MAKE variable.
3459    #--------------------------------------------------------------------
3460
3461    { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3462echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
3463set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3464if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
3465  echo $ECHO_N "(cached) $ECHO_C" >&6
3466else
3467  cat >conftest.make <<\_ACEOF
3468SHELL = /bin/sh
3469all:
3470	@echo '@@@%%%=$(MAKE)=@@@%%%'
3471_ACEOF
3472# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3473case `${MAKE-make} -f conftest.make 2>/dev/null` in
3474  *@@@%%%=?*=@@@%%%*)
3475    eval ac_cv_prog_make_${ac_make}_set=yes;;
3476  *)
3477    eval ac_cv_prog_make_${ac_make}_set=no;;
3478esac
3479rm -f conftest.make
3480fi
3481if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3482  { echo "$as_me:$LINENO: result: yes" >&5
3483echo "${ECHO_T}yes" >&6; }
3484  SET_MAKE=
3485else
3486  { echo "$as_me:$LINENO: result: no" >&5
3487echo "${ECHO_T}no" >&6; }
3488  SET_MAKE="MAKE=${MAKE-make}"
3489fi
3490
3491
3492    #--------------------------------------------------------------------
3493    # Find ranlib
3494    #--------------------------------------------------------------------
3495
3496    if test -n "$ac_tool_prefix"; then
3497  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3498set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3499{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3500echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3501if test "${ac_cv_prog_RANLIB+set}" = set; then
3502  echo $ECHO_N "(cached) $ECHO_C" >&6
3503else
3504  if test -n "$RANLIB"; then
3505  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3506else
3507as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3508for as_dir in $PATH
3509do
3510  IFS=$as_save_IFS
3511  test -z "$as_dir" && as_dir=.
3512  for ac_exec_ext in '' $ac_executable_extensions; do
3513  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3514    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3515    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3516    break 2
3517  fi
3518done
3519done
3520IFS=$as_save_IFS
3521
3522fi
3523fi
3524RANLIB=$ac_cv_prog_RANLIB
3525if test -n "$RANLIB"; then
3526  { echo "$as_me:$LINENO: result: $RANLIB" >&5
3527echo "${ECHO_T}$RANLIB" >&6; }
3528else
3529  { echo "$as_me:$LINENO: result: no" >&5
3530echo "${ECHO_T}no" >&6; }
3531fi
3532
3533
3534fi
3535if test -z "$ac_cv_prog_RANLIB"; then
3536  ac_ct_RANLIB=$RANLIB
3537  # Extract the first word of "ranlib", so it can be a program name with args.
3538set dummy ranlib; ac_word=$2
3539{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3540echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3541if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3542  echo $ECHO_N "(cached) $ECHO_C" >&6
3543else
3544  if test -n "$ac_ct_RANLIB"; then
3545  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3546else
3547as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3548for as_dir in $PATH
3549do
3550  IFS=$as_save_IFS
3551  test -z "$as_dir" && as_dir=.
3552  for ac_exec_ext in '' $ac_executable_extensions; do
3553  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3554    ac_cv_prog_ac_ct_RANLIB="ranlib"
3555    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3556    break 2
3557  fi
3558done
3559done
3560IFS=$as_save_IFS
3561
3562fi
3563fi
3564ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3565if test -n "$ac_ct_RANLIB"; then
3566  { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3567echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
3568else
3569  { echo "$as_me:$LINENO: result: no" >&5
3570echo "${ECHO_T}no" >&6; }
3571fi
3572
3573  if test "x$ac_ct_RANLIB" = x; then
3574    RANLIB=":"
3575  else
3576    case $cross_compiling:$ac_tool_warned in
3577yes:)
3578{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3579whose name does not start with the host triplet.  If you think this
3580configuration is useful to you, please write to autoconf@gnu.org." >&5
3581echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3582whose name does not start with the host triplet.  If you think this
3583configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3584ac_tool_warned=yes ;;
3585esac
3586    RANLIB=$ac_ct_RANLIB
3587  fi
3588else
3589  RANLIB="$ac_cv_prog_RANLIB"
3590fi
3591
3592
3593    #--------------------------------------------------------------------
3594    # Determines the correct binary file extension (.o, .obj, .exe etc.)
3595    #--------------------------------------------------------------------
3596
3597
3598
3599
3600
3601
3602{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3603echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3604if test "${ac_cv_path_GREP+set}" = set; then
3605  echo $ECHO_N "(cached) $ECHO_C" >&6
3606else
3607  # Extract the first word of "grep ggrep" to use in msg output
3608if test -z "$GREP"; then
3609set dummy grep ggrep; ac_prog_name=$2
3610if test "${ac_cv_path_GREP+set}" = set; then
3611  echo $ECHO_N "(cached) $ECHO_C" >&6
3612else
3613  ac_path_GREP_found=false
3614# Loop through the user's path and test for each of PROGNAME-LIST
3615as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3616for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3617do
3618  IFS=$as_save_IFS
3619  test -z "$as_dir" && as_dir=.
3620  for ac_prog in grep ggrep; do
3621  for ac_exec_ext in '' $ac_executable_extensions; do
3622    ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3623    { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3624    # Check for GNU ac_path_GREP and select it if it is found.
3625  # Check for GNU $ac_path_GREP
3626case `"$ac_path_GREP" --version 2>&1` in
3627*GNU*)
3628  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3629*)
3630  ac_count=0
3631  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3632  while :
3633  do
3634    cat "conftest.in" "conftest.in" >"conftest.tmp"
3635    mv "conftest.tmp" "conftest.in"
3636    cp "conftest.in" "conftest.nl"
3637    echo 'GREP' >> "conftest.nl"
3638    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3639    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3640    ac_count=`expr $ac_count + 1`
3641    if test $ac_count -gt ${ac_path_GREP_max-0}; then
3642      # Best one so far, save it but keep looking for a better one
3643      ac_cv_path_GREP="$ac_path_GREP"
3644      ac_path_GREP_max=$ac_count
3645    fi
3646    # 10*(2^10) chars as input seems more than enough
3647    test $ac_count -gt 10 && break
3648  done
3649  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3650esac
3651
3652
3653    $ac_path_GREP_found && break 3
3654  done
3655done
3656
3657done
3658IFS=$as_save_IFS
3659
3660
3661fi
3662
3663GREP="$ac_cv_path_GREP"
3664if test -z "$GREP"; then
3665  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3666echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3667   { (exit 1); exit 1; }; }
3668fi
3669
3670else
3671  ac_cv_path_GREP=$GREP
3672fi
3673
3674
3675fi
3676{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3677echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3678 GREP="$ac_cv_path_GREP"
3679
3680
3681{ echo "$as_me:$LINENO: checking for egrep" >&5
3682echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3683if test "${ac_cv_path_EGREP+set}" = set; then
3684  echo $ECHO_N "(cached) $ECHO_C" >&6
3685else
3686  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3687   then ac_cv_path_EGREP="$GREP -E"
3688   else
3689     # Extract the first word of "egrep" to use in msg output
3690if test -z "$EGREP"; then
3691set dummy egrep; ac_prog_name=$2
3692if test "${ac_cv_path_EGREP+set}" = set; then
3693  echo $ECHO_N "(cached) $ECHO_C" >&6
3694else
3695  ac_path_EGREP_found=false
3696# Loop through the user's path and test for each of PROGNAME-LIST
3697as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3698for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3699do
3700  IFS=$as_save_IFS
3701  test -z "$as_dir" && as_dir=.
3702  for ac_prog in egrep; do
3703  for ac_exec_ext in '' $ac_executable_extensions; do
3704    ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3705    { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3706    # Check for GNU ac_path_EGREP and select it if it is found.
3707  # Check for GNU $ac_path_EGREP
3708case `"$ac_path_EGREP" --version 2>&1` in
3709*GNU*)
3710  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3711*)
3712  ac_count=0
3713  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3714  while :
3715  do
3716    cat "conftest.in" "conftest.in" >"conftest.tmp"
3717    mv "conftest.tmp" "conftest.in"
3718    cp "conftest.in" "conftest.nl"
3719    echo 'EGREP' >> "conftest.nl"
3720    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3721    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3722    ac_count=`expr $ac_count + 1`
3723    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3724      # Best one so far, save it but keep looking for a better one
3725      ac_cv_path_EGREP="$ac_path_EGREP"
3726      ac_path_EGREP_max=$ac_count
3727    fi
3728    # 10*(2^10) chars as input seems more than enough
3729    test $ac_count -gt 10 && break
3730  done
3731  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3732esac
3733
3734
3735    $ac_path_EGREP_found && break 3
3736  done
3737done
3738
3739done
3740IFS=$as_save_IFS
3741
3742
3743fi
3744
3745EGREP="$ac_cv_path_EGREP"
3746if test -z "$EGREP"; then
3747  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3748echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3749   { (exit 1); exit 1; }; }
3750fi
3751
3752else
3753  ac_cv_path_EGREP=$EGREP
3754fi
3755
3756
3757   fi
3758fi
3759{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3760echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3761 EGREP="$ac_cv_path_EGREP"
3762
3763
3764{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3765echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
3766if test "${ac_cv_header_stdc+set}" = set; then
3767  echo $ECHO_N "(cached) $ECHO_C" >&6
3768else
3769  cat >conftest.$ac_ext <<_ACEOF
3770/* confdefs.h.  */
3771_ACEOF
3772cat confdefs.h >>conftest.$ac_ext
3773cat >>conftest.$ac_ext <<_ACEOF
3774/* end confdefs.h.  */
3775#include <stdlib.h>
3776#include <stdarg.h>
3777#include <string.h>
3778#include <float.h>
3779
3780int
3781main ()
3782{
3783
3784  ;
3785  return 0;
3786}
3787_ACEOF
3788rm -f conftest.$ac_objext
3789if { (ac_try="$ac_compile"
3790case "(($ac_try" in
3791  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3792  *) ac_try_echo=$ac_try;;
3793esac
3794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3795  (eval "$ac_compile") 2>conftest.er1
3796  ac_status=$?
3797  grep -v '^ *+' conftest.er1 >conftest.err
3798  rm -f conftest.er1
3799  cat conftest.err >&5
3800  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3801  (exit $ac_status); } && {
3802	 test -z "$ac_c_werror_flag" ||
3803	 test ! -s conftest.err
3804       } && test -s conftest.$ac_objext; then
3805  ac_cv_header_stdc=yes
3806else
3807  echo "$as_me: failed program was:" >&5
3808sed 's/^/| /' conftest.$ac_ext >&5
3809
3810	ac_cv_header_stdc=no
3811fi
3812
3813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3814
3815if test $ac_cv_header_stdc = yes; then
3816  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3817  cat >conftest.$ac_ext <<_ACEOF
3818/* confdefs.h.  */
3819_ACEOF
3820cat confdefs.h >>conftest.$ac_ext
3821cat >>conftest.$ac_ext <<_ACEOF
3822/* end confdefs.h.  */
3823#include <string.h>
3824
3825_ACEOF
3826if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3827  $EGREP "memchr" >/dev/null 2>&1; then
3828  :
3829else
3830  ac_cv_header_stdc=no
3831fi
3832rm -f conftest*
3833
3834fi
3835
3836if test $ac_cv_header_stdc = yes; then
3837  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3838  cat >conftest.$ac_ext <<_ACEOF
3839/* confdefs.h.  */
3840_ACEOF
3841cat confdefs.h >>conftest.$ac_ext
3842cat >>conftest.$ac_ext <<_ACEOF
3843/* end confdefs.h.  */
3844#include <stdlib.h>
3845
3846_ACEOF
3847if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3848  $EGREP "free" >/dev/null 2>&1; then
3849  :
3850else
3851  ac_cv_header_stdc=no
3852fi
3853rm -f conftest*
3854
3855fi
3856
3857if test $ac_cv_header_stdc = yes; then
3858  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3859  if test "$cross_compiling" = yes; then
3860  :
3861else
3862  cat >conftest.$ac_ext <<_ACEOF
3863/* confdefs.h.  */
3864_ACEOF
3865cat confdefs.h >>conftest.$ac_ext
3866cat >>conftest.$ac_ext <<_ACEOF
3867/* end confdefs.h.  */
3868#include <ctype.h>
3869#include <stdlib.h>
3870#if ((' ' & 0x0FF) == 0x020)
3871# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3872# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3873#else
3874# define ISLOWER(c) \
3875		   (('a' <= (c) && (c) <= 'i') \
3876		     || ('j' <= (c) && (c) <= 'r') \
3877		     || ('s' <= (c) && (c) <= 'z'))
3878# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3879#endif
3880
3881#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3882int
3883main ()
3884{
3885  int i;
3886  for (i = 0; i < 256; i++)
3887    if (XOR (islower (i), ISLOWER (i))
3888	|| toupper (i) != TOUPPER (i))
3889      return 2;
3890  return 0;
3891}
3892_ACEOF
3893rm -f conftest$ac_exeext
3894if { (ac_try="$ac_link"
3895case "(($ac_try" in
3896  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3897  *) ac_try_echo=$ac_try;;
3898esac
3899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3900  (eval "$ac_link") 2>&5
3901  ac_status=$?
3902  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3903  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3904  { (case "(($ac_try" in
3905  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3906  *) ac_try_echo=$ac_try;;
3907esac
3908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3909  (eval "$ac_try") 2>&5
3910  ac_status=$?
3911  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3912  (exit $ac_status); }; }; then
3913  :
3914else
3915  echo "$as_me: program exited with status $ac_status" >&5
3916echo "$as_me: failed program was:" >&5
3917sed 's/^/| /' conftest.$ac_ext >&5
3918
3919( exit $ac_status )
3920ac_cv_header_stdc=no
3921fi
3922rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3923fi
3924
3925
3926fi
3927fi
3928{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3929echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
3930if test $ac_cv_header_stdc = yes; then
3931
3932cat >>confdefs.h <<\_ACEOF
3933#define STDC_HEADERS 1
3934_ACEOF
3935
3936fi
3937
3938# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3949		  inttypes.h stdint.h unistd.h
3950do
3951as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3952{ echo "$as_me:$LINENO: checking for $ac_header" >&5
3953echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
3954if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
3955  echo $ECHO_N "(cached) $ECHO_C" >&6
3956else
3957  cat >conftest.$ac_ext <<_ACEOF
3958/* confdefs.h.  */
3959_ACEOF
3960cat confdefs.h >>conftest.$ac_ext
3961cat >>conftest.$ac_ext <<_ACEOF
3962/* end confdefs.h.  */
3963$ac_includes_default
3964
3965#include <$ac_header>
3966_ACEOF
3967rm -f conftest.$ac_objext
3968if { (ac_try="$ac_compile"
3969case "(($ac_try" in
3970  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3971  *) ac_try_echo=$ac_try;;
3972esac
3973eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3974  (eval "$ac_compile") 2>conftest.er1
3975  ac_status=$?
3976  grep -v '^ *+' conftest.er1 >conftest.err
3977  rm -f conftest.er1
3978  cat conftest.err >&5
3979  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3980  (exit $ac_status); } && {
3981	 test -z "$ac_c_werror_flag" ||
3982	 test ! -s conftest.err
3983       } && test -s conftest.$ac_objext; then
3984  eval "$as_ac_Header=yes"
3985else
3986  echo "$as_me: failed program was:" >&5
3987sed 's/^/| /' conftest.$ac_ext >&5
3988
3989	eval "$as_ac_Header=no"
3990fi
3991
3992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3993fi
3994ac_res=`eval echo '${'$as_ac_Header'}'`
3995	       { echo "$as_me:$LINENO: result: $ac_res" >&5
3996echo "${ECHO_T}$ac_res" >&6; }
3997if test `eval echo '${'$as_ac_Header'}'` = yes; then
3998  cat >>confdefs.h <<_ACEOF
3999#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4000_ACEOF
4001
4002fi
4003
4004done
4005
4006
4007
4008    # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here.
4009
4010
4011    #------------------------------------------------------------------------
4012    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
4013    # It makes compiling go faster.  (This is only a performance feature.)
4014    #------------------------------------------------------------------------
4015
4016    if test -z "$no_pipe" -a -n "$GCC"; then
4017	{ echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5
4018echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6; }
4019if test "${tcl_cv_cc_pipe+set}" = set; then
4020  echo $ECHO_N "(cached) $ECHO_C" >&6
4021else
4022
4023	    hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
4024	    cat >conftest.$ac_ext <<_ACEOF
4025/* confdefs.h.  */
4026_ACEOF
4027cat confdefs.h >>conftest.$ac_ext
4028cat >>conftest.$ac_ext <<_ACEOF
4029/* end confdefs.h.  */
4030
4031int
4032main ()
4033{
4034
4035  ;
4036  return 0;
4037}
4038_ACEOF
4039rm -f conftest.$ac_objext
4040if { (ac_try="$ac_compile"
4041case "(($ac_try" in
4042  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4043  *) ac_try_echo=$ac_try;;
4044esac
4045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4046  (eval "$ac_compile") 2>conftest.er1
4047  ac_status=$?
4048  grep -v '^ *+' conftest.er1 >conftest.err
4049  rm -f conftest.er1
4050  cat conftest.err >&5
4051  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4052  (exit $ac_status); } && {
4053	 test -z "$ac_c_werror_flag" ||
4054	 test ! -s conftest.err
4055       } && test -s conftest.$ac_objext; then
4056  tcl_cv_cc_pipe=yes
4057else
4058  echo "$as_me: failed program was:" >&5
4059sed 's/^/| /' conftest.$ac_ext >&5
4060
4061	tcl_cv_cc_pipe=no
4062fi
4063
4064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4065	    CFLAGS=$hold_cflags
4066fi
4067{ echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5
4068echo "${ECHO_T}$tcl_cv_cc_pipe" >&6; }
4069	if test $tcl_cv_cc_pipe = yes; then
4070	    CFLAGS="$CFLAGS -pipe"
4071	fi
4072    fi
4073
4074    #--------------------------------------------------------------------
4075    # Common compiler flag setup
4076    #--------------------------------------------------------------------
4077
4078    { echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
4079echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
4080if test "${ac_cv_c_bigendian+set}" = set; then
4081  echo $ECHO_N "(cached) $ECHO_C" >&6
4082else
4083  # See if sys/param.h defines the BYTE_ORDER macro.
4084cat >conftest.$ac_ext <<_ACEOF
4085/* confdefs.h.  */
4086_ACEOF
4087cat confdefs.h >>conftest.$ac_ext
4088cat >>conftest.$ac_ext <<_ACEOF
4089/* end confdefs.h.  */
4090#include <sys/types.h>
4091#include <sys/param.h>
4092
4093int
4094main ()
4095{
4096#if  ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
4097	&& BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
4098 bogus endian macros
4099#endif
4100
4101  ;
4102  return 0;
4103}
4104_ACEOF
4105rm -f conftest.$ac_objext
4106if { (ac_try="$ac_compile"
4107case "(($ac_try" in
4108  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4109  *) ac_try_echo=$ac_try;;
4110esac
4111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4112  (eval "$ac_compile") 2>conftest.er1
4113  ac_status=$?
4114  grep -v '^ *+' conftest.er1 >conftest.err
4115  rm -f conftest.er1
4116  cat conftest.err >&5
4117  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4118  (exit $ac_status); } && {
4119	 test -z "$ac_c_werror_flag" ||
4120	 test ! -s conftest.err
4121       } && test -s conftest.$ac_objext; then
4122  # It does; now see whether it defined to BIG_ENDIAN or not.
4123cat >conftest.$ac_ext <<_ACEOF
4124/* confdefs.h.  */
4125_ACEOF
4126cat confdefs.h >>conftest.$ac_ext
4127cat >>conftest.$ac_ext <<_ACEOF
4128/* end confdefs.h.  */
4129#include <sys/types.h>
4130#include <sys/param.h>
4131
4132int
4133main ()
4134{
4135#if BYTE_ORDER != BIG_ENDIAN
4136 not big endian
4137#endif
4138
4139  ;
4140  return 0;
4141}
4142_ACEOF
4143rm -f conftest.$ac_objext
4144if { (ac_try="$ac_compile"
4145case "(($ac_try" in
4146  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4147  *) ac_try_echo=$ac_try;;
4148esac
4149eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4150  (eval "$ac_compile") 2>conftest.er1
4151  ac_status=$?
4152  grep -v '^ *+' conftest.er1 >conftest.err
4153  rm -f conftest.er1
4154  cat conftest.err >&5
4155  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4156  (exit $ac_status); } && {
4157	 test -z "$ac_c_werror_flag" ||
4158	 test ! -s conftest.err
4159       } && test -s conftest.$ac_objext; then
4160  ac_cv_c_bigendian=yes
4161else
4162  echo "$as_me: failed program was:" >&5
4163sed 's/^/| /' conftest.$ac_ext >&5
4164
4165	ac_cv_c_bigendian=no
4166fi
4167
4168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4169else
4170  echo "$as_me: failed program was:" >&5
4171sed 's/^/| /' conftest.$ac_ext >&5
4172
4173	# It does not; compile a test program.
4174if test "$cross_compiling" = yes; then
4175  # try to guess the endianness by grepping values into an object file
4176  ac_cv_c_bigendian=unknown
4177  cat >conftest.$ac_ext <<_ACEOF
4178/* confdefs.h.  */
4179_ACEOF
4180cat confdefs.h >>conftest.$ac_ext
4181cat >>conftest.$ac_ext <<_ACEOF
4182/* end confdefs.h.  */
4183short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
4184short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
4185void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
4186short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
4187short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
4188void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
4189int
4190main ()
4191{
4192 _ascii (); _ebcdic ();
4193  ;
4194  return 0;
4195}
4196_ACEOF
4197rm -f conftest.$ac_objext
4198if { (ac_try="$ac_compile"
4199case "(($ac_try" in
4200  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4201  *) ac_try_echo=$ac_try;;
4202esac
4203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4204  (eval "$ac_compile") 2>conftest.er1
4205  ac_status=$?
4206  grep -v '^ *+' conftest.er1 >conftest.err
4207  rm -f conftest.er1
4208  cat conftest.err >&5
4209  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4210  (exit $ac_status); } && {
4211	 test -z "$ac_c_werror_flag" ||
4212	 test ! -s conftest.err
4213       } && test -s conftest.$ac_objext; then
4214  if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
4215  ac_cv_c_bigendian=yes
4216fi
4217if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
4218  if test "$ac_cv_c_bigendian" = unknown; then
4219    ac_cv_c_bigendian=no
4220  else
4221    # finding both strings is unlikely to happen, but who knows?
4222    ac_cv_c_bigendian=unknown
4223  fi
4224fi
4225else
4226  echo "$as_me: failed program was:" >&5
4227sed 's/^/| /' conftest.$ac_ext >&5
4228
4229
4230fi
4231
4232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4233else
4234  cat >conftest.$ac_ext <<_ACEOF
4235/* confdefs.h.  */
4236_ACEOF
4237cat confdefs.h >>conftest.$ac_ext
4238cat >>conftest.$ac_ext <<_ACEOF
4239/* end confdefs.h.  */
4240$ac_includes_default
4241int
4242main ()
4243{
4244
4245  /* Are we little or big endian?  From Harbison&Steele.  */
4246  union
4247  {
4248    long int l;
4249    char c[sizeof (long int)];
4250  } u;
4251  u.l = 1;
4252  return u.c[sizeof (long int) - 1] == 1;
4253
4254  ;
4255  return 0;
4256}
4257_ACEOF
4258rm -f conftest$ac_exeext
4259if { (ac_try="$ac_link"
4260case "(($ac_try" in
4261  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4262  *) ac_try_echo=$ac_try;;
4263esac
4264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4265  (eval "$ac_link") 2>&5
4266  ac_status=$?
4267  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4268  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4269  { (case "(($ac_try" in
4270  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4271  *) ac_try_echo=$ac_try;;
4272esac
4273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4274  (eval "$ac_try") 2>&5
4275  ac_status=$?
4276  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4277  (exit $ac_status); }; }; then
4278  ac_cv_c_bigendian=no
4279else
4280  echo "$as_me: program exited with status $ac_status" >&5
4281echo "$as_me: failed program was:" >&5
4282sed 's/^/| /' conftest.$ac_ext >&5
4283
4284( exit $ac_status )
4285ac_cv_c_bigendian=yes
4286fi
4287rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4288fi
4289
4290
4291fi
4292
4293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4294fi
4295{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
4296echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
4297case $ac_cv_c_bigendian in
4298  yes)
4299
4300cat >>confdefs.h <<\_ACEOF
4301#define WORDS_BIGENDIAN 1
4302_ACEOF
4303 ;;
4304  no)
4305     ;;
4306  *)
4307    { { echo "$as_me:$LINENO: error: unknown endianness
4308presetting ac_cv_c_bigendian=no (or yes) will help" >&5
4309echo "$as_me: error: unknown endianness
4310presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
4311   { (exit 1); exit 1; }; } ;;
4312esac
4313
4314    if test "${TEA_PLATFORM}" = "unix" ; then
4315
4316    #--------------------------------------------------------------------
4317    # On a few very rare systems, all of the libm.a stuff is
4318    # already in libc.a.  Set compiler flags accordingly.
4319    # Also, Linux requires the "ieee" library for math to work
4320    # right (and it must appear before "-lm").
4321    #--------------------------------------------------------------------
4322
4323    { echo "$as_me:$LINENO: checking for sin" >&5
4324echo $ECHO_N "checking for sin... $ECHO_C" >&6; }
4325if test "${ac_cv_func_sin+set}" = set; then
4326  echo $ECHO_N "(cached) $ECHO_C" >&6
4327else
4328  cat >conftest.$ac_ext <<_ACEOF
4329/* confdefs.h.  */
4330_ACEOF
4331cat confdefs.h >>conftest.$ac_ext
4332cat >>conftest.$ac_ext <<_ACEOF
4333/* end confdefs.h.  */
4334/* Define sin to an innocuous variant, in case <limits.h> declares sin.
4335   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4336#define sin innocuous_sin
4337
4338/* System header to define __stub macros and hopefully few prototypes,
4339    which can conflict with char sin (); below.
4340    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4341    <limits.h> exists even on freestanding compilers.  */
4342
4343#ifdef __STDC__
4344# include <limits.h>
4345#else
4346# include <assert.h>
4347#endif
4348
4349#undef sin
4350
4351/* Override any GCC internal prototype to avoid an error.
4352   Use char because int might match the return type of a GCC
4353   builtin and then its argument prototype would still apply.  */
4354#ifdef __cplusplus
4355extern "C"
4356#endif
4357char sin ();
4358/* The GNU C library defines this for functions which it implements
4359    to always fail with ENOSYS.  Some functions are actually named
4360    something starting with __ and the normal name is an alias.  */
4361#if defined __stub_sin || defined __stub___sin
4362choke me
4363#endif
4364
4365int
4366main ()
4367{
4368return sin ();
4369  ;
4370  return 0;
4371}
4372_ACEOF
4373rm -f conftest.$ac_objext conftest$ac_exeext
4374if { (ac_try="$ac_link"
4375case "(($ac_try" in
4376  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4377  *) ac_try_echo=$ac_try;;
4378esac
4379eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4380  (eval "$ac_link") 2>conftest.er1
4381  ac_status=$?
4382  grep -v '^ *+' conftest.er1 >conftest.err
4383  rm -f conftest.er1
4384  cat conftest.err >&5
4385  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4386  (exit $ac_status); } && {
4387	 test -z "$ac_c_werror_flag" ||
4388	 test ! -s conftest.err
4389       } && test -s conftest$ac_exeext &&
4390       $as_test_x conftest$ac_exeext; then
4391  ac_cv_func_sin=yes
4392else
4393  echo "$as_me: failed program was:" >&5
4394sed 's/^/| /' conftest.$ac_ext >&5
4395
4396	ac_cv_func_sin=no
4397fi
4398
4399rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4400      conftest$ac_exeext conftest.$ac_ext
4401fi
4402{ echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5
4403echo "${ECHO_T}$ac_cv_func_sin" >&6; }
4404if test $ac_cv_func_sin = yes; then
4405  MATH_LIBS=""
4406else
4407  MATH_LIBS="-lm"
4408fi
4409
4410    { echo "$as_me:$LINENO: checking for main in -lieee" >&5
4411echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6; }
4412if test "${ac_cv_lib_ieee_main+set}" = set; then
4413  echo $ECHO_N "(cached) $ECHO_C" >&6
4414else
4415  ac_check_lib_save_LIBS=$LIBS
4416LIBS="-lieee  $LIBS"
4417cat >conftest.$ac_ext <<_ACEOF
4418/* confdefs.h.  */
4419_ACEOF
4420cat confdefs.h >>conftest.$ac_ext
4421cat >>conftest.$ac_ext <<_ACEOF
4422/* end confdefs.h.  */
4423
4424
4425int
4426main ()
4427{
4428return main ();
4429  ;
4430  return 0;
4431}
4432_ACEOF
4433rm -f conftest.$ac_objext conftest$ac_exeext
4434if { (ac_try="$ac_link"
4435case "(($ac_try" in
4436  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4437  *) ac_try_echo=$ac_try;;
4438esac
4439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4440  (eval "$ac_link") 2>conftest.er1
4441  ac_status=$?
4442  grep -v '^ *+' conftest.er1 >conftest.err
4443  rm -f conftest.er1
4444  cat conftest.err >&5
4445  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4446  (exit $ac_status); } && {
4447	 test -z "$ac_c_werror_flag" ||
4448	 test ! -s conftest.err
4449       } && test -s conftest$ac_exeext &&
4450       $as_test_x conftest$ac_exeext; then
4451  ac_cv_lib_ieee_main=yes
4452else
4453  echo "$as_me: failed program was:" >&5
4454sed 's/^/| /' conftest.$ac_ext >&5
4455
4456	ac_cv_lib_ieee_main=no
4457fi
4458
4459rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4460      conftest$ac_exeext conftest.$ac_ext
4461LIBS=$ac_check_lib_save_LIBS
4462fi
4463{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5
4464echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6; }
4465if test $ac_cv_lib_ieee_main = yes; then
4466  MATH_LIBS="-lieee $MATH_LIBS"
4467fi
4468
4469
4470    #--------------------------------------------------------------------
4471    # Interactive UNIX requires -linet instead of -lsocket, plus it
4472    # needs net/errno.h to define the socket-related error codes.
4473    #--------------------------------------------------------------------
4474
4475    { echo "$as_me:$LINENO: checking for main in -linet" >&5
4476echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6; }
4477if test "${ac_cv_lib_inet_main+set}" = set; then
4478  echo $ECHO_N "(cached) $ECHO_C" >&6
4479else
4480  ac_check_lib_save_LIBS=$LIBS
4481LIBS="-linet  $LIBS"
4482cat >conftest.$ac_ext <<_ACEOF
4483/* confdefs.h.  */
4484_ACEOF
4485cat confdefs.h >>conftest.$ac_ext
4486cat >>conftest.$ac_ext <<_ACEOF
4487/* end confdefs.h.  */
4488
4489
4490int
4491main ()
4492{
4493return main ();
4494  ;
4495  return 0;
4496}
4497_ACEOF
4498rm -f conftest.$ac_objext conftest$ac_exeext
4499if { (ac_try="$ac_link"
4500case "(($ac_try" in
4501  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4502  *) ac_try_echo=$ac_try;;
4503esac
4504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4505  (eval "$ac_link") 2>conftest.er1
4506  ac_status=$?
4507  grep -v '^ *+' conftest.er1 >conftest.err
4508  rm -f conftest.er1
4509  cat conftest.err >&5
4510  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4511  (exit $ac_status); } && {
4512	 test -z "$ac_c_werror_flag" ||
4513	 test ! -s conftest.err
4514       } && test -s conftest$ac_exeext &&
4515       $as_test_x conftest$ac_exeext; then
4516  ac_cv_lib_inet_main=yes
4517else
4518  echo "$as_me: failed program was:" >&5
4519sed 's/^/| /' conftest.$ac_ext >&5
4520
4521	ac_cv_lib_inet_main=no
4522fi
4523
4524rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4525      conftest$ac_exeext conftest.$ac_ext
4526LIBS=$ac_check_lib_save_LIBS
4527fi
4528{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5
4529echo "${ECHO_T}$ac_cv_lib_inet_main" >&6; }
4530if test $ac_cv_lib_inet_main = yes; then
4531  LIBS="$LIBS -linet"
4532fi
4533
4534    if test "${ac_cv_header_net_errno_h+set}" = set; then
4535  { echo "$as_me:$LINENO: checking for net/errno.h" >&5
4536echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; }
4537if test "${ac_cv_header_net_errno_h+set}" = set; then
4538  echo $ECHO_N "(cached) $ECHO_C" >&6
4539fi
4540{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
4541echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; }
4542else
4543  # Is the header compilable?
4544{ echo "$as_me:$LINENO: checking net/errno.h usability" >&5
4545echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6; }
4546cat >conftest.$ac_ext <<_ACEOF
4547/* confdefs.h.  */
4548_ACEOF
4549cat confdefs.h >>conftest.$ac_ext
4550cat >>conftest.$ac_ext <<_ACEOF
4551/* end confdefs.h.  */
4552$ac_includes_default
4553#include <net/errno.h>
4554_ACEOF
4555rm -f conftest.$ac_objext
4556if { (ac_try="$ac_compile"
4557case "(($ac_try" in
4558  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4559  *) ac_try_echo=$ac_try;;
4560esac
4561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4562  (eval "$ac_compile") 2>conftest.er1
4563  ac_status=$?
4564  grep -v '^ *+' conftest.er1 >conftest.err
4565  rm -f conftest.er1
4566  cat conftest.err >&5
4567  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4568  (exit $ac_status); } && {
4569	 test -z "$ac_c_werror_flag" ||
4570	 test ! -s conftest.err
4571       } && test -s conftest.$ac_objext; then
4572  ac_header_compiler=yes
4573else
4574  echo "$as_me: failed program was:" >&5
4575sed 's/^/| /' conftest.$ac_ext >&5
4576
4577	ac_header_compiler=no
4578fi
4579
4580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4581{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4582echo "${ECHO_T}$ac_header_compiler" >&6; }
4583
4584# Is the header present?
4585{ echo "$as_me:$LINENO: checking net/errno.h presence" >&5
4586echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6; }
4587cat >conftest.$ac_ext <<_ACEOF
4588/* confdefs.h.  */
4589_ACEOF
4590cat confdefs.h >>conftest.$ac_ext
4591cat >>conftest.$ac_ext <<_ACEOF
4592/* end confdefs.h.  */
4593#include <net/errno.h>
4594_ACEOF
4595if { (ac_try="$ac_cpp conftest.$ac_ext"
4596case "(($ac_try" in
4597  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4598  *) ac_try_echo=$ac_try;;
4599esac
4600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4601  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4602  ac_status=$?
4603  grep -v '^ *+' conftest.er1 >conftest.err
4604  rm -f conftest.er1
4605  cat conftest.err >&5
4606  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4607  (exit $ac_status); } >/dev/null && {
4608	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4609	 test ! -s conftest.err
4610       }; then
4611  ac_header_preproc=yes
4612else
4613  echo "$as_me: failed program was:" >&5
4614sed 's/^/| /' conftest.$ac_ext >&5
4615
4616  ac_header_preproc=no
4617fi
4618
4619rm -f conftest.err conftest.$ac_ext
4620{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4621echo "${ECHO_T}$ac_header_preproc" >&6; }
4622
4623# So?  What about this header?
4624case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4625  yes:no: )
4626    { echo "$as_me:$LINENO: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
4627echo "$as_me: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4628    { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the compiler's result" >&5
4629echo "$as_me: WARNING: net/errno.h: proceeding with the compiler's result" >&2;}
4630    ac_header_preproc=yes
4631    ;;
4632  no:yes:* )
4633    { echo "$as_me:$LINENO: WARNING: net/errno.h: present but cannot be compiled" >&5
4634echo "$as_me: WARNING: net/errno.h: present but cannot be compiled" >&2;}
4635    { echo "$as_me:$LINENO: WARNING: net/errno.h:     check for missing prerequisite headers?" >&5
4636echo "$as_me: WARNING: net/errno.h:     check for missing prerequisite headers?" >&2;}
4637    { echo "$as_me:$LINENO: WARNING: net/errno.h: see the Autoconf documentation" >&5
4638echo "$as_me: WARNING: net/errno.h: see the Autoconf documentation" >&2;}
4639    { echo "$as_me:$LINENO: WARNING: net/errno.h:     section \"Present But Cannot Be Compiled\"" >&5
4640echo "$as_me: WARNING: net/errno.h:     section \"Present But Cannot Be Compiled\"" >&2;}
4641    { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the preprocessor's result" >&5
4642echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;}
4643    { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5
4644echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;}
4645
4646    ;;
4647esac
4648{ echo "$as_me:$LINENO: checking for net/errno.h" >&5
4649echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; }
4650if test "${ac_cv_header_net_errno_h+set}" = set; then
4651  echo $ECHO_N "(cached) $ECHO_C" >&6
4652else
4653  ac_cv_header_net_errno_h=$ac_header_preproc
4654fi
4655{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
4656echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; }
4657
4658fi
4659if test $ac_cv_header_net_errno_h = yes; then
4660
4661
4662cat >>confdefs.h <<\_ACEOF
4663#define HAVE_NET_ERRNO_H 1
4664_ACEOF
4665
4666fi
4667
4668
4669
4670    #--------------------------------------------------------------------
4671    #	Check for the existence of the -lsocket and -lnsl libraries.
4672    #	The order here is important, so that they end up in the right
4673    #	order in the command line generated by make.  Here are some
4674    #	special considerations:
4675    #	1. Use "connect" and "accept" to check for -lsocket, and
4676    #	   "gethostbyname" to check for -lnsl.
4677    #	2. Use each function name only once:  can't redo a check because
4678    #	   autoconf caches the results of the last check and won't redo it.
4679    #	3. Use -lnsl and -lsocket only if they supply procedures that
4680    #	   aren't already present in the normal libraries.  This is because
4681    #	   IRIX 5.2 has libraries, but they aren't needed and they're
4682    #	   bogus:  they goof up name resolution if used.
4683    #	4. On some SVR4 systems, can't use -lsocket without -lnsl too.
4684    #	   To get around this problem, check for both libraries together
4685    #	   if -lsocket doesn't work by itself.
4686    #--------------------------------------------------------------------
4687
4688    tcl_checkBoth=0
4689    { echo "$as_me:$LINENO: checking for connect" >&5
4690echo $ECHO_N "checking for connect... $ECHO_C" >&6; }
4691if test "${ac_cv_func_connect+set}" = set; then
4692  echo $ECHO_N "(cached) $ECHO_C" >&6
4693else
4694  cat >conftest.$ac_ext <<_ACEOF
4695/* confdefs.h.  */
4696_ACEOF
4697cat confdefs.h >>conftest.$ac_ext
4698cat >>conftest.$ac_ext <<_ACEOF
4699/* end confdefs.h.  */
4700/* Define connect to an innocuous variant, in case <limits.h> declares connect.
4701   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4702#define connect innocuous_connect
4703
4704/* System header to define __stub macros and hopefully few prototypes,
4705    which can conflict with char connect (); below.
4706    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4707    <limits.h> exists even on freestanding compilers.  */
4708
4709#ifdef __STDC__
4710# include <limits.h>
4711#else
4712# include <assert.h>
4713#endif
4714
4715#undef connect
4716
4717/* Override any GCC internal prototype to avoid an error.
4718   Use char because int might match the return type of a GCC
4719   builtin and then its argument prototype would still apply.  */
4720#ifdef __cplusplus
4721extern "C"
4722#endif
4723char connect ();
4724/* The GNU C library defines this for functions which it implements
4725    to always fail with ENOSYS.  Some functions are actually named
4726    something starting with __ and the normal name is an alias.  */
4727#if defined __stub_connect || defined __stub___connect
4728choke me
4729#endif
4730
4731int
4732main ()
4733{
4734return connect ();
4735  ;
4736  return 0;
4737}
4738_ACEOF
4739rm -f conftest.$ac_objext conftest$ac_exeext
4740if { (ac_try="$ac_link"
4741case "(($ac_try" in
4742  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4743  *) ac_try_echo=$ac_try;;
4744esac
4745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4746  (eval "$ac_link") 2>conftest.er1
4747  ac_status=$?
4748  grep -v '^ *+' conftest.er1 >conftest.err
4749  rm -f conftest.er1
4750  cat conftest.err >&5
4751  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4752  (exit $ac_status); } && {
4753	 test -z "$ac_c_werror_flag" ||
4754	 test ! -s conftest.err
4755       } && test -s conftest$ac_exeext &&
4756       $as_test_x conftest$ac_exeext; then
4757  ac_cv_func_connect=yes
4758else
4759  echo "$as_me: failed program was:" >&5
4760sed 's/^/| /' conftest.$ac_ext >&5
4761
4762	ac_cv_func_connect=no
4763fi
4764
4765rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4766      conftest$ac_exeext conftest.$ac_ext
4767fi
4768{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
4769echo "${ECHO_T}$ac_cv_func_connect" >&6; }
4770if test $ac_cv_func_connect = yes; then
4771  tcl_checkSocket=0
4772else
4773  tcl_checkSocket=1
4774fi
4775
4776    if test "$tcl_checkSocket" = 1; then
4777	{ echo "$as_me:$LINENO: checking for setsockopt" >&5
4778echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6; }
4779if test "${ac_cv_func_setsockopt+set}" = set; then
4780  echo $ECHO_N "(cached) $ECHO_C" >&6
4781else
4782  cat >conftest.$ac_ext <<_ACEOF
4783/* confdefs.h.  */
4784_ACEOF
4785cat confdefs.h >>conftest.$ac_ext
4786cat >>conftest.$ac_ext <<_ACEOF
4787/* end confdefs.h.  */
4788/* Define setsockopt to an innocuous variant, in case <limits.h> declares setsockopt.
4789   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4790#define setsockopt innocuous_setsockopt
4791
4792/* System header to define __stub macros and hopefully few prototypes,
4793    which can conflict with char setsockopt (); below.
4794    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4795    <limits.h> exists even on freestanding compilers.  */
4796
4797#ifdef __STDC__
4798# include <limits.h>
4799#else
4800# include <assert.h>
4801#endif
4802
4803#undef setsockopt
4804
4805/* Override any GCC internal prototype to avoid an error.
4806   Use char because int might match the return type of a GCC
4807   builtin and then its argument prototype would still apply.  */
4808#ifdef __cplusplus
4809extern "C"
4810#endif
4811char setsockopt ();
4812/* The GNU C library defines this for functions which it implements
4813    to always fail with ENOSYS.  Some functions are actually named
4814    something starting with __ and the normal name is an alias.  */
4815#if defined __stub_setsockopt || defined __stub___setsockopt
4816choke me
4817#endif
4818
4819int
4820main ()
4821{
4822return setsockopt ();
4823  ;
4824  return 0;
4825}
4826_ACEOF
4827rm -f conftest.$ac_objext conftest$ac_exeext
4828if { (ac_try="$ac_link"
4829case "(($ac_try" in
4830  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4831  *) ac_try_echo=$ac_try;;
4832esac
4833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4834  (eval "$ac_link") 2>conftest.er1
4835  ac_status=$?
4836  grep -v '^ *+' conftest.er1 >conftest.err
4837  rm -f conftest.er1
4838  cat conftest.err >&5
4839  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4840  (exit $ac_status); } && {
4841	 test -z "$ac_c_werror_flag" ||
4842	 test ! -s conftest.err
4843       } && test -s conftest$ac_exeext &&
4844       $as_test_x conftest$ac_exeext; then
4845  ac_cv_func_setsockopt=yes
4846else
4847  echo "$as_me: failed program was:" >&5
4848sed 's/^/| /' conftest.$ac_ext >&5
4849
4850	ac_cv_func_setsockopt=no
4851fi
4852
4853rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4854      conftest$ac_exeext conftest.$ac_ext
4855fi
4856{ echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5
4857echo "${ECHO_T}$ac_cv_func_setsockopt" >&6; }
4858if test $ac_cv_func_setsockopt = yes; then
4859  :
4860else
4861  { echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5
4862echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6; }
4863if test "${ac_cv_lib_socket_setsockopt+set}" = set; then
4864  echo $ECHO_N "(cached) $ECHO_C" >&6
4865else
4866  ac_check_lib_save_LIBS=$LIBS
4867LIBS="-lsocket  $LIBS"
4868cat >conftest.$ac_ext <<_ACEOF
4869/* confdefs.h.  */
4870_ACEOF
4871cat confdefs.h >>conftest.$ac_ext
4872cat >>conftest.$ac_ext <<_ACEOF
4873/* end confdefs.h.  */
4874
4875/* Override any GCC internal prototype to avoid an error.
4876   Use char because int might match the return type of a GCC
4877   builtin and then its argument prototype would still apply.  */
4878#ifdef __cplusplus
4879extern "C"
4880#endif
4881char setsockopt ();
4882int
4883main ()
4884{
4885return setsockopt ();
4886  ;
4887  return 0;
4888}
4889_ACEOF
4890rm -f conftest.$ac_objext conftest$ac_exeext
4891if { (ac_try="$ac_link"
4892case "(($ac_try" in
4893  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4894  *) ac_try_echo=$ac_try;;
4895esac
4896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4897  (eval "$ac_link") 2>conftest.er1
4898  ac_status=$?
4899  grep -v '^ *+' conftest.er1 >conftest.err
4900  rm -f conftest.er1
4901  cat conftest.err >&5
4902  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4903  (exit $ac_status); } && {
4904	 test -z "$ac_c_werror_flag" ||
4905	 test ! -s conftest.err
4906       } && test -s conftest$ac_exeext &&
4907       $as_test_x conftest$ac_exeext; then
4908  ac_cv_lib_socket_setsockopt=yes
4909else
4910  echo "$as_me: failed program was:" >&5
4911sed 's/^/| /' conftest.$ac_ext >&5
4912
4913	ac_cv_lib_socket_setsockopt=no
4914fi
4915
4916rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4917      conftest$ac_exeext conftest.$ac_ext
4918LIBS=$ac_check_lib_save_LIBS
4919fi
4920{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5
4921echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6; }
4922if test $ac_cv_lib_socket_setsockopt = yes; then
4923  LIBS="$LIBS -lsocket"
4924else
4925  tcl_checkBoth=1
4926fi
4927
4928fi
4929
4930    fi
4931    if test "$tcl_checkBoth" = 1; then
4932	tk_oldLibs=$LIBS
4933	LIBS="$LIBS -lsocket -lnsl"
4934	{ echo "$as_me:$LINENO: checking for accept" >&5
4935echo $ECHO_N "checking for accept... $ECHO_C" >&6; }
4936if test "${ac_cv_func_accept+set}" = set; then
4937  echo $ECHO_N "(cached) $ECHO_C" >&6
4938else
4939  cat >conftest.$ac_ext <<_ACEOF
4940/* confdefs.h.  */
4941_ACEOF
4942cat confdefs.h >>conftest.$ac_ext
4943cat >>conftest.$ac_ext <<_ACEOF
4944/* end confdefs.h.  */
4945/* Define accept to an innocuous variant, in case <limits.h> declares accept.
4946   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4947#define accept innocuous_accept
4948
4949/* System header to define __stub macros and hopefully few prototypes,
4950    which can conflict with char accept (); below.
4951    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4952    <limits.h> exists even on freestanding compilers.  */
4953
4954#ifdef __STDC__
4955# include <limits.h>
4956#else
4957# include <assert.h>
4958#endif
4959
4960#undef accept
4961
4962/* Override any GCC internal prototype to avoid an error.
4963   Use char because int might match the return type of a GCC
4964   builtin and then its argument prototype would still apply.  */
4965#ifdef __cplusplus
4966extern "C"
4967#endif
4968char accept ();
4969/* The GNU C library defines this for functions which it implements
4970    to always fail with ENOSYS.  Some functions are actually named
4971    something starting with __ and the normal name is an alias.  */
4972#if defined __stub_accept || defined __stub___accept
4973choke me
4974#endif
4975
4976int
4977main ()
4978{
4979return accept ();
4980  ;
4981  return 0;
4982}
4983_ACEOF
4984rm -f conftest.$ac_objext conftest$ac_exeext
4985if { (ac_try="$ac_link"
4986case "(($ac_try" in
4987  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4988  *) ac_try_echo=$ac_try;;
4989esac
4990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4991  (eval "$ac_link") 2>conftest.er1
4992  ac_status=$?
4993  grep -v '^ *+' conftest.er1 >conftest.err
4994  rm -f conftest.er1
4995  cat conftest.err >&5
4996  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4997  (exit $ac_status); } && {
4998	 test -z "$ac_c_werror_flag" ||
4999	 test ! -s conftest.err
5000       } && test -s conftest$ac_exeext &&
5001       $as_test_x conftest$ac_exeext; then
5002  ac_cv_func_accept=yes
5003else
5004  echo "$as_me: failed program was:" >&5
5005sed 's/^/| /' conftest.$ac_ext >&5
5006
5007	ac_cv_func_accept=no
5008fi
5009
5010rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5011      conftest$ac_exeext conftest.$ac_ext
5012fi
5013{ echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5
5014echo "${ECHO_T}$ac_cv_func_accept" >&6; }
5015if test $ac_cv_func_accept = yes; then
5016  tcl_checkNsl=0
5017else
5018  LIBS=$tk_oldLibs
5019fi
5020
5021    fi
5022    { echo "$as_me:$LINENO: checking for gethostbyname" >&5
5023echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; }
5024if test "${ac_cv_func_gethostbyname+set}" = set; then
5025  echo $ECHO_N "(cached) $ECHO_C" >&6
5026else
5027  cat >conftest.$ac_ext <<_ACEOF
5028/* confdefs.h.  */
5029_ACEOF
5030cat confdefs.h >>conftest.$ac_ext
5031cat >>conftest.$ac_ext <<_ACEOF
5032/* end confdefs.h.  */
5033/* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
5034   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5035#define gethostbyname innocuous_gethostbyname
5036
5037/* System header to define __stub macros and hopefully few prototypes,
5038    which can conflict with char gethostbyname (); below.
5039    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5040    <limits.h> exists even on freestanding compilers.  */
5041
5042#ifdef __STDC__
5043# include <limits.h>
5044#else
5045# include <assert.h>
5046#endif
5047
5048#undef gethostbyname
5049
5050/* Override any GCC internal prototype to avoid an error.
5051   Use char because int might match the return type of a GCC
5052   builtin and then its argument prototype would still apply.  */
5053#ifdef __cplusplus
5054extern "C"
5055#endif
5056char gethostbyname ();
5057/* The GNU C library defines this for functions which it implements
5058    to always fail with ENOSYS.  Some functions are actually named
5059    something starting with __ and the normal name is an alias.  */
5060#if defined __stub_gethostbyname || defined __stub___gethostbyname
5061choke me
5062#endif
5063
5064int
5065main ()
5066{
5067return gethostbyname ();
5068  ;
5069  return 0;
5070}
5071_ACEOF
5072rm -f conftest.$ac_objext conftest$ac_exeext
5073if { (ac_try="$ac_link"
5074case "(($ac_try" in
5075  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5076  *) ac_try_echo=$ac_try;;
5077esac
5078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5079  (eval "$ac_link") 2>conftest.er1
5080  ac_status=$?
5081  grep -v '^ *+' conftest.er1 >conftest.err
5082  rm -f conftest.er1
5083  cat conftest.err >&5
5084  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5085  (exit $ac_status); } && {
5086	 test -z "$ac_c_werror_flag" ||
5087	 test ! -s conftest.err
5088       } && test -s conftest$ac_exeext &&
5089       $as_test_x conftest$ac_exeext; then
5090  ac_cv_func_gethostbyname=yes
5091else
5092  echo "$as_me: failed program was:" >&5
5093sed 's/^/| /' conftest.$ac_ext >&5
5094
5095	ac_cv_func_gethostbyname=no
5096fi
5097
5098rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5099      conftest$ac_exeext conftest.$ac_ext
5100fi
5101{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
5102echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; }
5103if test $ac_cv_func_gethostbyname = yes; then
5104  :
5105else
5106  { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
5107echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; }
5108if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
5109  echo $ECHO_N "(cached) $ECHO_C" >&6
5110else
5111  ac_check_lib_save_LIBS=$LIBS
5112LIBS="-lnsl  $LIBS"
5113cat >conftest.$ac_ext <<_ACEOF
5114/* confdefs.h.  */
5115_ACEOF
5116cat confdefs.h >>conftest.$ac_ext
5117cat >>conftest.$ac_ext <<_ACEOF
5118/* end confdefs.h.  */
5119
5120/* Override any GCC internal prototype to avoid an error.
5121   Use char because int might match the return type of a GCC
5122   builtin and then its argument prototype would still apply.  */
5123#ifdef __cplusplus
5124extern "C"
5125#endif
5126char gethostbyname ();
5127int
5128main ()
5129{
5130return gethostbyname ();
5131  ;
5132  return 0;
5133}
5134_ACEOF
5135rm -f conftest.$ac_objext conftest$ac_exeext
5136if { (ac_try="$ac_link"
5137case "(($ac_try" in
5138  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5139  *) ac_try_echo=$ac_try;;
5140esac
5141eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5142  (eval "$ac_link") 2>conftest.er1
5143  ac_status=$?
5144  grep -v '^ *+' conftest.er1 >conftest.err
5145  rm -f conftest.er1
5146  cat conftest.err >&5
5147  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5148  (exit $ac_status); } && {
5149	 test -z "$ac_c_werror_flag" ||
5150	 test ! -s conftest.err
5151       } && test -s conftest$ac_exeext &&
5152       $as_test_x conftest$ac_exeext; then
5153  ac_cv_lib_nsl_gethostbyname=yes
5154else
5155  echo "$as_me: failed program was:" >&5
5156sed 's/^/| /' conftest.$ac_ext >&5
5157
5158	ac_cv_lib_nsl_gethostbyname=no
5159fi
5160
5161rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5162      conftest$ac_exeext conftest.$ac_ext
5163LIBS=$ac_check_lib_save_LIBS
5164fi
5165{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
5166echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; }
5167if test $ac_cv_lib_nsl_gethostbyname = yes; then
5168  LIBS="$LIBS -lnsl"
5169fi
5170
5171fi
5172
5173
5174    # TEA specific: Don't perform the eval of the libraries here because
5175    # DL_LIBS won't be set until we call TEA_CONFIG_CFLAGS
5176
5177    TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}'
5178
5179
5180
5181
5182    { echo "$as_me:$LINENO: checking dirent.h" >&5
5183echo $ECHO_N "checking dirent.h... $ECHO_C" >&6; }
5184if test "${tcl_cv_dirent_h+set}" = set; then
5185  echo $ECHO_N "(cached) $ECHO_C" >&6
5186else
5187
5188    cat >conftest.$ac_ext <<_ACEOF
5189/* confdefs.h.  */
5190_ACEOF
5191cat confdefs.h >>conftest.$ac_ext
5192cat >>conftest.$ac_ext <<_ACEOF
5193/* end confdefs.h.  */
5194#include <sys/types.h>
5195#include <dirent.h>
5196int
5197main ()
5198{
5199
5200#ifndef _POSIX_SOURCE
5201#   ifdef __Lynx__
5202	/*
5203	 * Generate compilation error to make the test fail:  Lynx headers
5204	 * are only valid if really in the POSIX environment.
5205	 */
5206
5207	missing_procedure();
5208#   endif
5209#endif
5210DIR *d;
5211struct dirent *entryPtr;
5212char *p;
5213d = opendir("foobar");
5214entryPtr = readdir(d);
5215p = entryPtr->d_name;
5216closedir(d);
5217
5218  ;
5219  return 0;
5220}
5221_ACEOF
5222rm -f conftest.$ac_objext conftest$ac_exeext
5223if { (ac_try="$ac_link"
5224case "(($ac_try" in
5225  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5226  *) ac_try_echo=$ac_try;;
5227esac
5228eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5229  (eval "$ac_link") 2>conftest.er1
5230  ac_status=$?
5231  grep -v '^ *+' conftest.er1 >conftest.err
5232  rm -f conftest.er1
5233  cat conftest.err >&5
5234  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5235  (exit $ac_status); } && {
5236	 test -z "$ac_c_werror_flag" ||
5237	 test ! -s conftest.err
5238       } && test -s conftest$ac_exeext &&
5239       $as_test_x conftest$ac_exeext; then
5240  tcl_cv_dirent_h=yes
5241else
5242  echo "$as_me: failed program was:" >&5
5243sed 's/^/| /' conftest.$ac_ext >&5
5244
5245	tcl_cv_dirent_h=no
5246fi
5247
5248rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5249      conftest$ac_exeext conftest.$ac_ext
5250fi
5251{ echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5
5252echo "${ECHO_T}$tcl_cv_dirent_h" >&6; }
5253
5254    if test $tcl_cv_dirent_h = no; then
5255
5256cat >>confdefs.h <<\_ACEOF
5257#define NO_DIRENT_H 1
5258_ACEOF
5259
5260    fi
5261
5262    # TEA specific:
5263    if test "${ac_cv_header_errno_h+set}" = set; then
5264  { echo "$as_me:$LINENO: checking for errno.h" >&5
5265echo $ECHO_N "checking for errno.h... $ECHO_C" >&6; }
5266if test "${ac_cv_header_errno_h+set}" = set; then
5267  echo $ECHO_N "(cached) $ECHO_C" >&6
5268fi
5269{ echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
5270echo "${ECHO_T}$ac_cv_header_errno_h" >&6; }
5271else
5272  # Is the header compilable?
5273{ echo "$as_me:$LINENO: checking errno.h usability" >&5
5274echo $ECHO_N "checking errno.h usability... $ECHO_C" >&6; }
5275cat >conftest.$ac_ext <<_ACEOF
5276/* confdefs.h.  */
5277_ACEOF
5278cat confdefs.h >>conftest.$ac_ext
5279cat >>conftest.$ac_ext <<_ACEOF
5280/* end confdefs.h.  */
5281$ac_includes_default
5282#include <errno.h>
5283_ACEOF
5284rm -f conftest.$ac_objext
5285if { (ac_try="$ac_compile"
5286case "(($ac_try" in
5287  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5288  *) ac_try_echo=$ac_try;;
5289esac
5290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5291  (eval "$ac_compile") 2>conftest.er1
5292  ac_status=$?
5293  grep -v '^ *+' conftest.er1 >conftest.err
5294  rm -f conftest.er1
5295  cat conftest.err >&5
5296  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5297  (exit $ac_status); } && {
5298	 test -z "$ac_c_werror_flag" ||
5299	 test ! -s conftest.err
5300       } && test -s conftest.$ac_objext; then
5301  ac_header_compiler=yes
5302else
5303  echo "$as_me: failed program was:" >&5
5304sed 's/^/| /' conftest.$ac_ext >&5
5305
5306	ac_header_compiler=no
5307fi
5308
5309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5310{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5311echo "${ECHO_T}$ac_header_compiler" >&6; }
5312
5313# Is the header present?
5314{ echo "$as_me:$LINENO: checking errno.h presence" >&5
5315echo $ECHO_N "checking errno.h presence... $ECHO_C" >&6; }
5316cat >conftest.$ac_ext <<_ACEOF
5317/* confdefs.h.  */
5318_ACEOF
5319cat confdefs.h >>conftest.$ac_ext
5320cat >>conftest.$ac_ext <<_ACEOF
5321/* end confdefs.h.  */
5322#include <errno.h>
5323_ACEOF
5324if { (ac_try="$ac_cpp conftest.$ac_ext"
5325case "(($ac_try" in
5326  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5327  *) ac_try_echo=$ac_try;;
5328esac
5329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5330  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5331  ac_status=$?
5332  grep -v '^ *+' conftest.er1 >conftest.err
5333  rm -f conftest.er1
5334  cat conftest.err >&5
5335  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5336  (exit $ac_status); } >/dev/null && {
5337	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5338	 test ! -s conftest.err
5339       }; then
5340  ac_header_preproc=yes
5341else
5342  echo "$as_me: failed program was:" >&5
5343sed 's/^/| /' conftest.$ac_ext >&5
5344
5345  ac_header_preproc=no
5346fi
5347
5348rm -f conftest.err conftest.$ac_ext
5349{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5350echo "${ECHO_T}$ac_header_preproc" >&6; }
5351
5352# So?  What about this header?
5353case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5354  yes:no: )
5355    { echo "$as_me:$LINENO: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
5356echo "$as_me: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5357    { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the compiler's result" >&5
5358echo "$as_me: WARNING: errno.h: proceeding with the compiler's result" >&2;}
5359    ac_header_preproc=yes
5360    ;;
5361  no:yes:* )
5362    { echo "$as_me:$LINENO: WARNING: errno.h: present but cannot be compiled" >&5
5363echo "$as_me: WARNING: errno.h: present but cannot be compiled" >&2;}
5364    { echo "$as_me:$LINENO: WARNING: errno.h:     check for missing prerequisite headers?" >&5
5365echo "$as_me: WARNING: errno.h:     check for missing prerequisite headers?" >&2;}
5366    { echo "$as_me:$LINENO: WARNING: errno.h: see the Autoconf documentation" >&5
5367echo "$as_me: WARNING: errno.h: see the Autoconf documentation" >&2;}
5368    { echo "$as_me:$LINENO: WARNING: errno.h:     section \"Present But Cannot Be Compiled\"" >&5
5369echo "$as_me: WARNING: errno.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5370    { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the preprocessor's result" >&5
5371echo "$as_me: WARNING: errno.h: proceeding with the preprocessor's result" >&2;}
5372    { echo "$as_me:$LINENO: WARNING: errno.h: in the future, the compiler will take precedence" >&5
5373echo "$as_me: WARNING: errno.h: in the future, the compiler will take precedence" >&2;}
5374
5375    ;;
5376esac
5377{ echo "$as_me:$LINENO: checking for errno.h" >&5
5378echo $ECHO_N "checking for errno.h... $ECHO_C" >&6; }
5379if test "${ac_cv_header_errno_h+set}" = set; then
5380  echo $ECHO_N "(cached) $ECHO_C" >&6
5381else
5382  ac_cv_header_errno_h=$ac_header_preproc
5383fi
5384{ echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
5385echo "${ECHO_T}$ac_cv_header_errno_h" >&6; }
5386
5387fi
5388if test $ac_cv_header_errno_h = yes; then
5389  :
5390else
5391
5392cat >>confdefs.h <<\_ACEOF
5393#define NO_ERRNO_H 1
5394_ACEOF
5395
5396fi
5397
5398
5399    if test "${ac_cv_header_float_h+set}" = set; then
5400  { echo "$as_me:$LINENO: checking for float.h" >&5
5401echo $ECHO_N "checking for float.h... $ECHO_C" >&6; }
5402if test "${ac_cv_header_float_h+set}" = set; then
5403  echo $ECHO_N "(cached) $ECHO_C" >&6
5404fi
5405{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
5406echo "${ECHO_T}$ac_cv_header_float_h" >&6; }
5407else
5408  # Is the header compilable?
5409{ echo "$as_me:$LINENO: checking float.h usability" >&5
5410echo $ECHO_N "checking float.h usability... $ECHO_C" >&6; }
5411cat >conftest.$ac_ext <<_ACEOF
5412/* confdefs.h.  */
5413_ACEOF
5414cat confdefs.h >>conftest.$ac_ext
5415cat >>conftest.$ac_ext <<_ACEOF
5416/* end confdefs.h.  */
5417$ac_includes_default
5418#include <float.h>
5419_ACEOF
5420rm -f conftest.$ac_objext
5421if { (ac_try="$ac_compile"
5422case "(($ac_try" in
5423  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5424  *) ac_try_echo=$ac_try;;
5425esac
5426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5427  (eval "$ac_compile") 2>conftest.er1
5428  ac_status=$?
5429  grep -v '^ *+' conftest.er1 >conftest.err
5430  rm -f conftest.er1
5431  cat conftest.err >&5
5432  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5433  (exit $ac_status); } && {
5434	 test -z "$ac_c_werror_flag" ||
5435	 test ! -s conftest.err
5436       } && test -s conftest.$ac_objext; then
5437  ac_header_compiler=yes
5438else
5439  echo "$as_me: failed program was:" >&5
5440sed 's/^/| /' conftest.$ac_ext >&5
5441
5442	ac_header_compiler=no
5443fi
5444
5445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5446{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5447echo "${ECHO_T}$ac_header_compiler" >&6; }
5448
5449# Is the header present?
5450{ echo "$as_me:$LINENO: checking float.h presence" >&5
5451echo $ECHO_N "checking float.h presence... $ECHO_C" >&6; }
5452cat >conftest.$ac_ext <<_ACEOF
5453/* confdefs.h.  */
5454_ACEOF
5455cat confdefs.h >>conftest.$ac_ext
5456cat >>conftest.$ac_ext <<_ACEOF
5457/* end confdefs.h.  */
5458#include <float.h>
5459_ACEOF
5460if { (ac_try="$ac_cpp conftest.$ac_ext"
5461case "(($ac_try" in
5462  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5463  *) ac_try_echo=$ac_try;;
5464esac
5465eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5466  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5467  ac_status=$?
5468  grep -v '^ *+' conftest.er1 >conftest.err
5469  rm -f conftest.er1
5470  cat conftest.err >&5
5471  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5472  (exit $ac_status); } >/dev/null && {
5473	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5474	 test ! -s conftest.err
5475       }; then
5476  ac_header_preproc=yes
5477else
5478  echo "$as_me: failed program was:" >&5
5479sed 's/^/| /' conftest.$ac_ext >&5
5480
5481  ac_header_preproc=no
5482fi
5483
5484rm -f conftest.err conftest.$ac_ext
5485{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5486echo "${ECHO_T}$ac_header_preproc" >&6; }
5487
5488# So?  What about this header?
5489case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5490  yes:no: )
5491    { echo "$as_me:$LINENO: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&5
5492echo "$as_me: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5493    { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the compiler's result" >&5
5494echo "$as_me: WARNING: float.h: proceeding with the compiler's result" >&2;}
5495    ac_header_preproc=yes
5496    ;;
5497  no:yes:* )
5498    { echo "$as_me:$LINENO: WARNING: float.h: present but cannot be compiled" >&5
5499echo "$as_me: WARNING: float.h: present but cannot be compiled" >&2;}
5500    { echo "$as_me:$LINENO: WARNING: float.h:     check for missing prerequisite headers?" >&5
5501echo "$as_me: WARNING: float.h:     check for missing prerequisite headers?" >&2;}
5502    { echo "$as_me:$LINENO: WARNING: float.h: see the Autoconf documentation" >&5
5503echo "$as_me: WARNING: float.h: see the Autoconf documentation" >&2;}
5504    { echo "$as_me:$LINENO: WARNING: float.h:     section \"Present But Cannot Be Compiled\"" >&5
5505echo "$as_me: WARNING: float.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5506    { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the preprocessor's result" >&5
5507echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;}
5508    { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5
5509echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;}
5510
5511    ;;
5512esac
5513{ echo "$as_me:$LINENO: checking for float.h" >&5
5514echo $ECHO_N "checking for float.h... $ECHO_C" >&6; }
5515if test "${ac_cv_header_float_h+set}" = set; then
5516  echo $ECHO_N "(cached) $ECHO_C" >&6
5517else
5518  ac_cv_header_float_h=$ac_header_preproc
5519fi
5520{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
5521echo "${ECHO_T}$ac_cv_header_float_h" >&6; }
5522
5523fi
5524if test $ac_cv_header_float_h = yes; then
5525  :
5526else
5527
5528cat >>confdefs.h <<\_ACEOF
5529#define NO_FLOAT_H 1
5530_ACEOF
5531
5532fi
5533
5534
5535    if test "${ac_cv_header_values_h+set}" = set; then
5536  { echo "$as_me:$LINENO: checking for values.h" >&5
5537echo $ECHO_N "checking for values.h... $ECHO_C" >&6; }
5538if test "${ac_cv_header_values_h+set}" = set; then
5539  echo $ECHO_N "(cached) $ECHO_C" >&6
5540fi
5541{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
5542echo "${ECHO_T}$ac_cv_header_values_h" >&6; }
5543else
5544  # Is the header compilable?
5545{ echo "$as_me:$LINENO: checking values.h usability" >&5
5546echo $ECHO_N "checking values.h usability... $ECHO_C" >&6; }
5547cat >conftest.$ac_ext <<_ACEOF
5548/* confdefs.h.  */
5549_ACEOF
5550cat confdefs.h >>conftest.$ac_ext
5551cat >>conftest.$ac_ext <<_ACEOF
5552/* end confdefs.h.  */
5553$ac_includes_default
5554#include <values.h>
5555_ACEOF
5556rm -f conftest.$ac_objext
5557if { (ac_try="$ac_compile"
5558case "(($ac_try" in
5559  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5560  *) ac_try_echo=$ac_try;;
5561esac
5562eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5563  (eval "$ac_compile") 2>conftest.er1
5564  ac_status=$?
5565  grep -v '^ *+' conftest.er1 >conftest.err
5566  rm -f conftest.er1
5567  cat conftest.err >&5
5568  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5569  (exit $ac_status); } && {
5570	 test -z "$ac_c_werror_flag" ||
5571	 test ! -s conftest.err
5572       } && test -s conftest.$ac_objext; then
5573  ac_header_compiler=yes
5574else
5575  echo "$as_me: failed program was:" >&5
5576sed 's/^/| /' conftest.$ac_ext >&5
5577
5578	ac_header_compiler=no
5579fi
5580
5581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5582{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5583echo "${ECHO_T}$ac_header_compiler" >&6; }
5584
5585# Is the header present?
5586{ echo "$as_me:$LINENO: checking values.h presence" >&5
5587echo $ECHO_N "checking values.h presence... $ECHO_C" >&6; }
5588cat >conftest.$ac_ext <<_ACEOF
5589/* confdefs.h.  */
5590_ACEOF
5591cat confdefs.h >>conftest.$ac_ext
5592cat >>conftest.$ac_ext <<_ACEOF
5593/* end confdefs.h.  */
5594#include <values.h>
5595_ACEOF
5596if { (ac_try="$ac_cpp conftest.$ac_ext"
5597case "(($ac_try" in
5598  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5599  *) ac_try_echo=$ac_try;;
5600esac
5601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5602  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5603  ac_status=$?
5604  grep -v '^ *+' conftest.er1 >conftest.err
5605  rm -f conftest.er1
5606  cat conftest.err >&5
5607  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5608  (exit $ac_status); } >/dev/null && {
5609	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5610	 test ! -s conftest.err
5611       }; then
5612  ac_header_preproc=yes
5613else
5614  echo "$as_me: failed program was:" >&5
5615sed 's/^/| /' conftest.$ac_ext >&5
5616
5617  ac_header_preproc=no
5618fi
5619
5620rm -f conftest.err conftest.$ac_ext
5621{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5622echo "${ECHO_T}$ac_header_preproc" >&6; }
5623
5624# So?  What about this header?
5625case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5626  yes:no: )
5627    { echo "$as_me:$LINENO: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&5
5628echo "$as_me: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5629    { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the compiler's result" >&5
5630echo "$as_me: WARNING: values.h: proceeding with the compiler's result" >&2;}
5631    ac_header_preproc=yes
5632    ;;
5633  no:yes:* )
5634    { echo "$as_me:$LINENO: WARNING: values.h: present but cannot be compiled" >&5
5635echo "$as_me: WARNING: values.h: present but cannot be compiled" >&2;}
5636    { echo "$as_me:$LINENO: WARNING: values.h:     check for missing prerequisite headers?" >&5
5637echo "$as_me: WARNING: values.h:     check for missing prerequisite headers?" >&2;}
5638    { echo "$as_me:$LINENO: WARNING: values.h: see the Autoconf documentation" >&5
5639echo "$as_me: WARNING: values.h: see the Autoconf documentation" >&2;}
5640    { echo "$as_me:$LINENO: WARNING: values.h:     section \"Present But Cannot Be Compiled\"" >&5
5641echo "$as_me: WARNING: values.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5642    { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the preprocessor's result" >&5
5643echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;}
5644    { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5
5645echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;}
5646
5647    ;;
5648esac
5649{ echo "$as_me:$LINENO: checking for values.h" >&5
5650echo $ECHO_N "checking for values.h... $ECHO_C" >&6; }
5651if test "${ac_cv_header_values_h+set}" = set; then
5652  echo $ECHO_N "(cached) $ECHO_C" >&6
5653else
5654  ac_cv_header_values_h=$ac_header_preproc
5655fi
5656{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
5657echo "${ECHO_T}$ac_cv_header_values_h" >&6; }
5658
5659fi
5660if test $ac_cv_header_values_h = yes; then
5661  :
5662else
5663
5664cat >>confdefs.h <<\_ACEOF
5665#define NO_VALUES_H 1
5666_ACEOF
5667
5668fi
5669
5670
5671    if test "${ac_cv_header_limits_h+set}" = set; then
5672  { echo "$as_me:$LINENO: checking for limits.h" >&5
5673echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; }
5674if test "${ac_cv_header_limits_h+set}" = set; then
5675  echo $ECHO_N "(cached) $ECHO_C" >&6
5676fi
5677{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
5678echo "${ECHO_T}$ac_cv_header_limits_h" >&6; }
5679else
5680  # Is the header compilable?
5681{ echo "$as_me:$LINENO: checking limits.h usability" >&5
5682echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6; }
5683cat >conftest.$ac_ext <<_ACEOF
5684/* confdefs.h.  */
5685_ACEOF
5686cat confdefs.h >>conftest.$ac_ext
5687cat >>conftest.$ac_ext <<_ACEOF
5688/* end confdefs.h.  */
5689$ac_includes_default
5690#include <limits.h>
5691_ACEOF
5692rm -f conftest.$ac_objext
5693if { (ac_try="$ac_compile"
5694case "(($ac_try" in
5695  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5696  *) ac_try_echo=$ac_try;;
5697esac
5698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5699  (eval "$ac_compile") 2>conftest.er1
5700  ac_status=$?
5701  grep -v '^ *+' conftest.er1 >conftest.err
5702  rm -f conftest.er1
5703  cat conftest.err >&5
5704  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5705  (exit $ac_status); } && {
5706	 test -z "$ac_c_werror_flag" ||
5707	 test ! -s conftest.err
5708       } && test -s conftest.$ac_objext; then
5709  ac_header_compiler=yes
5710else
5711  echo "$as_me: failed program was:" >&5
5712sed 's/^/| /' conftest.$ac_ext >&5
5713
5714	ac_header_compiler=no
5715fi
5716
5717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5718{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5719echo "${ECHO_T}$ac_header_compiler" >&6; }
5720
5721# Is the header present?
5722{ echo "$as_me:$LINENO: checking limits.h presence" >&5
5723echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6; }
5724cat >conftest.$ac_ext <<_ACEOF
5725/* confdefs.h.  */
5726_ACEOF
5727cat confdefs.h >>conftest.$ac_ext
5728cat >>conftest.$ac_ext <<_ACEOF
5729/* end confdefs.h.  */
5730#include <limits.h>
5731_ACEOF
5732if { (ac_try="$ac_cpp conftest.$ac_ext"
5733case "(($ac_try" in
5734  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5735  *) ac_try_echo=$ac_try;;
5736esac
5737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5738  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5739  ac_status=$?
5740  grep -v '^ *+' conftest.er1 >conftest.err
5741  rm -f conftest.er1
5742  cat conftest.err >&5
5743  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5744  (exit $ac_status); } >/dev/null && {
5745	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5746	 test ! -s conftest.err
5747       }; then
5748  ac_header_preproc=yes
5749else
5750  echo "$as_me: failed program was:" >&5
5751sed 's/^/| /' conftest.$ac_ext >&5
5752
5753  ac_header_preproc=no
5754fi
5755
5756rm -f conftest.err conftest.$ac_ext
5757{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5758echo "${ECHO_T}$ac_header_preproc" >&6; }
5759
5760# So?  What about this header?
5761case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5762  yes:no: )
5763    { echo "$as_me:$LINENO: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&5
5764echo "$as_me: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5765    { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the compiler's result" >&5
5766echo "$as_me: WARNING: limits.h: proceeding with the compiler's result" >&2;}
5767    ac_header_preproc=yes
5768    ;;
5769  no:yes:* )
5770    { echo "$as_me:$LINENO: WARNING: limits.h: present but cannot be compiled" >&5
5771echo "$as_me: WARNING: limits.h: present but cannot be compiled" >&2;}
5772    { echo "$as_me:$LINENO: WARNING: limits.h:     check for missing prerequisite headers?" >&5
5773echo "$as_me: WARNING: limits.h:     check for missing prerequisite headers?" >&2;}
5774    { echo "$as_me:$LINENO: WARNING: limits.h: see the Autoconf documentation" >&5
5775echo "$as_me: WARNING: limits.h: see the Autoconf documentation" >&2;}
5776    { echo "$as_me:$LINENO: WARNING: limits.h:     section \"Present But Cannot Be Compiled\"" >&5
5777echo "$as_me: WARNING: limits.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5778    { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the preprocessor's result" >&5
5779echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;}
5780    { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5
5781echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;}
5782
5783    ;;
5784esac
5785{ echo "$as_me:$LINENO: checking for limits.h" >&5
5786echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; }
5787if test "${ac_cv_header_limits_h+set}" = set; then
5788  echo $ECHO_N "(cached) $ECHO_C" >&6
5789else
5790  ac_cv_header_limits_h=$ac_header_preproc
5791fi
5792{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
5793echo "${ECHO_T}$ac_cv_header_limits_h" >&6; }
5794
5795fi
5796if test $ac_cv_header_limits_h = yes; then
5797
5798cat >>confdefs.h <<\_ACEOF
5799#define HAVE_LIMITS_H 1
5800_ACEOF
5801
5802else
5803
5804cat >>confdefs.h <<\_ACEOF
5805#define NO_LIMITS_H 1
5806_ACEOF
5807
5808fi
5809
5810
5811    if test "${ac_cv_header_stdlib_h+set}" = set; then
5812  { echo "$as_me:$LINENO: checking for stdlib.h" >&5
5813echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; }
5814if test "${ac_cv_header_stdlib_h+set}" = set; then
5815  echo $ECHO_N "(cached) $ECHO_C" >&6
5816fi
5817{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
5818echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; }
5819else
5820  # Is the header compilable?
5821{ echo "$as_me:$LINENO: checking stdlib.h usability" >&5
5822echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6; }
5823cat >conftest.$ac_ext <<_ACEOF
5824/* confdefs.h.  */
5825_ACEOF
5826cat confdefs.h >>conftest.$ac_ext
5827cat >>conftest.$ac_ext <<_ACEOF
5828/* end confdefs.h.  */
5829$ac_includes_default
5830#include <stdlib.h>
5831_ACEOF
5832rm -f conftest.$ac_objext
5833if { (ac_try="$ac_compile"
5834case "(($ac_try" in
5835  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5836  *) ac_try_echo=$ac_try;;
5837esac
5838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5839  (eval "$ac_compile") 2>conftest.er1
5840  ac_status=$?
5841  grep -v '^ *+' conftest.er1 >conftest.err
5842  rm -f conftest.er1
5843  cat conftest.err >&5
5844  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5845  (exit $ac_status); } && {
5846	 test -z "$ac_c_werror_flag" ||
5847	 test ! -s conftest.err
5848       } && test -s conftest.$ac_objext; then
5849  ac_header_compiler=yes
5850else
5851  echo "$as_me: failed program was:" >&5
5852sed 's/^/| /' conftest.$ac_ext >&5
5853
5854	ac_header_compiler=no
5855fi
5856
5857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5858{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5859echo "${ECHO_T}$ac_header_compiler" >&6; }
5860
5861# Is the header present?
5862{ echo "$as_me:$LINENO: checking stdlib.h presence" >&5
5863echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6; }
5864cat >conftest.$ac_ext <<_ACEOF
5865/* confdefs.h.  */
5866_ACEOF
5867cat confdefs.h >>conftest.$ac_ext
5868cat >>conftest.$ac_ext <<_ACEOF
5869/* end confdefs.h.  */
5870#include <stdlib.h>
5871_ACEOF
5872if { (ac_try="$ac_cpp conftest.$ac_ext"
5873case "(($ac_try" in
5874  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5875  *) ac_try_echo=$ac_try;;
5876esac
5877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5878  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5879  ac_status=$?
5880  grep -v '^ *+' conftest.er1 >conftest.err
5881  rm -f conftest.er1
5882  cat conftest.err >&5
5883  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5884  (exit $ac_status); } >/dev/null && {
5885	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5886	 test ! -s conftest.err
5887       }; then
5888  ac_header_preproc=yes
5889else
5890  echo "$as_me: failed program was:" >&5
5891sed 's/^/| /' conftest.$ac_ext >&5
5892
5893  ac_header_preproc=no
5894fi
5895
5896rm -f conftest.err conftest.$ac_ext
5897{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5898echo "${ECHO_T}$ac_header_preproc" >&6; }
5899
5900# So?  What about this header?
5901case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5902  yes:no: )
5903    { echo "$as_me:$LINENO: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
5904echo "$as_me: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5905    { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the compiler's result" >&5
5906echo "$as_me: WARNING: stdlib.h: proceeding with the compiler's result" >&2;}
5907    ac_header_preproc=yes
5908    ;;
5909  no:yes:* )
5910    { echo "$as_me:$LINENO: WARNING: stdlib.h: present but cannot be compiled" >&5
5911echo "$as_me: WARNING: stdlib.h: present but cannot be compiled" >&2;}
5912    { echo "$as_me:$LINENO: WARNING: stdlib.h:     check for missing prerequisite headers?" >&5
5913echo "$as_me: WARNING: stdlib.h:     check for missing prerequisite headers?" >&2;}
5914    { echo "$as_me:$LINENO: WARNING: stdlib.h: see the Autoconf documentation" >&5
5915echo "$as_me: WARNING: stdlib.h: see the Autoconf documentation" >&2;}
5916    { echo "$as_me:$LINENO: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&5
5917echo "$as_me: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5918    { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the preprocessor's result" >&5
5919echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;}
5920    { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5
5921echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;}
5922
5923    ;;
5924esac
5925{ echo "$as_me:$LINENO: checking for stdlib.h" >&5
5926echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; }
5927if test "${ac_cv_header_stdlib_h+set}" = set; then
5928  echo $ECHO_N "(cached) $ECHO_C" >&6
5929else
5930  ac_cv_header_stdlib_h=$ac_header_preproc
5931fi
5932{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
5933echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; }
5934
5935fi
5936if test $ac_cv_header_stdlib_h = yes; then
5937  tcl_ok=1
5938else
5939  tcl_ok=0
5940fi
5941
5942
5943    cat >conftest.$ac_ext <<_ACEOF
5944/* confdefs.h.  */
5945_ACEOF
5946cat confdefs.h >>conftest.$ac_ext
5947cat >>conftest.$ac_ext <<_ACEOF
5948/* end confdefs.h.  */
5949#include <stdlib.h>
5950
5951_ACEOF
5952if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5953  $EGREP "strtol" >/dev/null 2>&1; then
5954  :
5955else
5956  tcl_ok=0
5957fi
5958rm -f conftest*
5959
5960    cat >conftest.$ac_ext <<_ACEOF
5961/* confdefs.h.  */
5962_ACEOF
5963cat confdefs.h >>conftest.$ac_ext
5964cat >>conftest.$ac_ext <<_ACEOF
5965/* end confdefs.h.  */
5966#include <stdlib.h>
5967
5968_ACEOF
5969if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5970  $EGREP "strtoul" >/dev/null 2>&1; then
5971  :
5972else
5973  tcl_ok=0
5974fi
5975rm -f conftest*
5976
5977    cat >conftest.$ac_ext <<_ACEOF
5978/* confdefs.h.  */
5979_ACEOF
5980cat confdefs.h >>conftest.$ac_ext
5981cat >>conftest.$ac_ext <<_ACEOF
5982/* end confdefs.h.  */
5983#include <stdlib.h>
5984
5985_ACEOF
5986if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5987  $EGREP "strtod" >/dev/null 2>&1; then
5988  :
5989else
5990  tcl_ok=0
5991fi
5992rm -f conftest*
5993
5994    if test $tcl_ok = 0; then
5995
5996cat >>confdefs.h <<\_ACEOF
5997#define NO_STDLIB_H 1
5998_ACEOF
5999
6000    fi
6001    if test "${ac_cv_header_string_h+set}" = set; then
6002  { echo "$as_me:$LINENO: checking for string.h" >&5
6003echo $ECHO_N "checking for string.h... $ECHO_C" >&6; }
6004if test "${ac_cv_header_string_h+set}" = set; then
6005  echo $ECHO_N "(cached) $ECHO_C" >&6
6006fi
6007{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
6008echo "${ECHO_T}$ac_cv_header_string_h" >&6; }
6009else
6010  # Is the header compilable?
6011{ echo "$as_me:$LINENO: checking string.h usability" >&5
6012echo $ECHO_N "checking string.h usability... $ECHO_C" >&6; }
6013cat >conftest.$ac_ext <<_ACEOF
6014/* confdefs.h.  */
6015_ACEOF
6016cat confdefs.h >>conftest.$ac_ext
6017cat >>conftest.$ac_ext <<_ACEOF
6018/* end confdefs.h.  */
6019$ac_includes_default
6020#include <string.h>
6021_ACEOF
6022rm -f conftest.$ac_objext
6023if { (ac_try="$ac_compile"
6024case "(($ac_try" in
6025  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6026  *) ac_try_echo=$ac_try;;
6027esac
6028eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6029  (eval "$ac_compile") 2>conftest.er1
6030  ac_status=$?
6031  grep -v '^ *+' conftest.er1 >conftest.err
6032  rm -f conftest.er1
6033  cat conftest.err >&5
6034  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6035  (exit $ac_status); } && {
6036	 test -z "$ac_c_werror_flag" ||
6037	 test ! -s conftest.err
6038       } && test -s conftest.$ac_objext; then
6039  ac_header_compiler=yes
6040else
6041  echo "$as_me: failed program was:" >&5
6042sed 's/^/| /' conftest.$ac_ext >&5
6043
6044	ac_header_compiler=no
6045fi
6046
6047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6048{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6049echo "${ECHO_T}$ac_header_compiler" >&6; }
6050
6051# Is the header present?
6052{ echo "$as_me:$LINENO: checking string.h presence" >&5
6053echo $ECHO_N "checking string.h presence... $ECHO_C" >&6; }
6054cat >conftest.$ac_ext <<_ACEOF
6055/* confdefs.h.  */
6056_ACEOF
6057cat confdefs.h >>conftest.$ac_ext
6058cat >>conftest.$ac_ext <<_ACEOF
6059/* end confdefs.h.  */
6060#include <string.h>
6061_ACEOF
6062if { (ac_try="$ac_cpp conftest.$ac_ext"
6063case "(($ac_try" in
6064  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6065  *) ac_try_echo=$ac_try;;
6066esac
6067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6068  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6069  ac_status=$?
6070  grep -v '^ *+' conftest.er1 >conftest.err
6071  rm -f conftest.er1
6072  cat conftest.err >&5
6073  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6074  (exit $ac_status); } >/dev/null && {
6075	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6076	 test ! -s conftest.err
6077       }; then
6078  ac_header_preproc=yes
6079else
6080  echo "$as_me: failed program was:" >&5
6081sed 's/^/| /' conftest.$ac_ext >&5
6082
6083  ac_header_preproc=no
6084fi
6085
6086rm -f conftest.err conftest.$ac_ext
6087{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6088echo "${ECHO_T}$ac_header_preproc" >&6; }
6089
6090# So?  What about this header?
6091case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6092  yes:no: )
6093    { echo "$as_me:$LINENO: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&5
6094echo "$as_me: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6095    { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the compiler's result" >&5
6096echo "$as_me: WARNING: string.h: proceeding with the compiler's result" >&2;}
6097    ac_header_preproc=yes
6098    ;;
6099  no:yes:* )
6100    { echo "$as_me:$LINENO: WARNING: string.h: present but cannot be compiled" >&5
6101echo "$as_me: WARNING: string.h: present but cannot be compiled" >&2;}
6102    { echo "$as_me:$LINENO: WARNING: string.h:     check for missing prerequisite headers?" >&5
6103echo "$as_me: WARNING: string.h:     check for missing prerequisite headers?" >&2;}
6104    { echo "$as_me:$LINENO: WARNING: string.h: see the Autoconf documentation" >&5
6105echo "$as_me: WARNING: string.h: see the Autoconf documentation" >&2;}
6106    { echo "$as_me:$LINENO: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&5
6107echo "$as_me: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6108    { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the preprocessor's result" >&5
6109echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;}
6110    { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5
6111echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;}
6112
6113    ;;
6114esac
6115{ echo "$as_me:$LINENO: checking for string.h" >&5
6116echo $ECHO_N "checking for string.h... $ECHO_C" >&6; }
6117if test "${ac_cv_header_string_h+set}" = set; then
6118  echo $ECHO_N "(cached) $ECHO_C" >&6
6119else
6120  ac_cv_header_string_h=$ac_header_preproc
6121fi
6122{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
6123echo "${ECHO_T}$ac_cv_header_string_h" >&6; }
6124
6125fi
6126if test $ac_cv_header_string_h = yes; then
6127  tcl_ok=1
6128else
6129  tcl_ok=0
6130fi
6131
6132
6133    cat >conftest.$ac_ext <<_ACEOF
6134/* confdefs.h.  */
6135_ACEOF
6136cat confdefs.h >>conftest.$ac_ext
6137cat >>conftest.$ac_ext <<_ACEOF
6138/* end confdefs.h.  */
6139#include <string.h>
6140
6141_ACEOF
6142if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6143  $EGREP "strstr" >/dev/null 2>&1; then
6144  :
6145else
6146  tcl_ok=0
6147fi
6148rm -f conftest*
6149
6150    cat >conftest.$ac_ext <<_ACEOF
6151/* confdefs.h.  */
6152_ACEOF
6153cat confdefs.h >>conftest.$ac_ext
6154cat >>conftest.$ac_ext <<_ACEOF
6155/* end confdefs.h.  */
6156#include <string.h>
6157
6158_ACEOF
6159if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6160  $EGREP "strerror" >/dev/null 2>&1; then
6161  :
6162else
6163  tcl_ok=0
6164fi
6165rm -f conftest*
6166
6167
6168    # See also memmove check below for a place where NO_STRING_H can be
6169    # set and why.
6170
6171    if test $tcl_ok = 0; then
6172
6173cat >>confdefs.h <<\_ACEOF
6174#define NO_STRING_H 1
6175_ACEOF
6176
6177    fi
6178
6179    if test "${ac_cv_header_sys_wait_h+set}" = set; then
6180  { echo "$as_me:$LINENO: checking for sys/wait.h" >&5
6181echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; }
6182if test "${ac_cv_header_sys_wait_h+set}" = set; then
6183  echo $ECHO_N "(cached) $ECHO_C" >&6
6184fi
6185{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
6186echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
6187else
6188  # Is the header compilable?
6189{ echo "$as_me:$LINENO: checking sys/wait.h usability" >&5
6190echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6; }
6191cat >conftest.$ac_ext <<_ACEOF
6192/* confdefs.h.  */
6193_ACEOF
6194cat confdefs.h >>conftest.$ac_ext
6195cat >>conftest.$ac_ext <<_ACEOF
6196/* end confdefs.h.  */
6197$ac_includes_default
6198#include <sys/wait.h>
6199_ACEOF
6200rm -f conftest.$ac_objext
6201if { (ac_try="$ac_compile"
6202case "(($ac_try" in
6203  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6204  *) ac_try_echo=$ac_try;;
6205esac
6206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6207  (eval "$ac_compile") 2>conftest.er1
6208  ac_status=$?
6209  grep -v '^ *+' conftest.er1 >conftest.err
6210  rm -f conftest.er1
6211  cat conftest.err >&5
6212  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6213  (exit $ac_status); } && {
6214	 test -z "$ac_c_werror_flag" ||
6215	 test ! -s conftest.err
6216       } && test -s conftest.$ac_objext; then
6217  ac_header_compiler=yes
6218else
6219  echo "$as_me: failed program was:" >&5
6220sed 's/^/| /' conftest.$ac_ext >&5
6221
6222	ac_header_compiler=no
6223fi
6224
6225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6226{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6227echo "${ECHO_T}$ac_header_compiler" >&6; }
6228
6229# Is the header present?
6230{ echo "$as_me:$LINENO: checking sys/wait.h presence" >&5
6231echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6; }
6232cat >conftest.$ac_ext <<_ACEOF
6233/* confdefs.h.  */
6234_ACEOF
6235cat confdefs.h >>conftest.$ac_ext
6236cat >>conftest.$ac_ext <<_ACEOF
6237/* end confdefs.h.  */
6238#include <sys/wait.h>
6239_ACEOF
6240if { (ac_try="$ac_cpp conftest.$ac_ext"
6241case "(($ac_try" in
6242  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6243  *) ac_try_echo=$ac_try;;
6244esac
6245eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6246  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6247  ac_status=$?
6248  grep -v '^ *+' conftest.er1 >conftest.err
6249  rm -f conftest.er1
6250  cat conftest.err >&5
6251  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6252  (exit $ac_status); } >/dev/null && {
6253	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6254	 test ! -s conftest.err
6255       }; then
6256  ac_header_preproc=yes
6257else
6258  echo "$as_me: failed program was:" >&5
6259sed 's/^/| /' conftest.$ac_ext >&5
6260
6261  ac_header_preproc=no
6262fi
6263
6264rm -f conftest.err conftest.$ac_ext
6265{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6266echo "${ECHO_T}$ac_header_preproc" >&6; }
6267
6268# So?  What about this header?
6269case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6270  yes:no: )
6271    { echo "$as_me:$LINENO: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&5
6272echo "$as_me: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6273    { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the compiler's result" >&5
6274echo "$as_me: WARNING: sys/wait.h: proceeding with the compiler's result" >&2;}
6275    ac_header_preproc=yes
6276    ;;
6277  no:yes:* )
6278    { echo "$as_me:$LINENO: WARNING: sys/wait.h: present but cannot be compiled" >&5
6279echo "$as_me: WARNING: sys/wait.h: present but cannot be compiled" >&2;}
6280    { echo "$as_me:$LINENO: WARNING: sys/wait.h:     check for missing prerequisite headers?" >&5
6281echo "$as_me: WARNING: sys/wait.h:     check for missing prerequisite headers?" >&2;}
6282    { echo "$as_me:$LINENO: WARNING: sys/wait.h: see the Autoconf documentation" >&5
6283echo "$as_me: WARNING: sys/wait.h: see the Autoconf documentation" >&2;}
6284    { echo "$as_me:$LINENO: WARNING: sys/wait.h:     section \"Present But Cannot Be Compiled\"" >&5
6285echo "$as_me: WARNING: sys/wait.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6286    { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&5
6287echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;}
6288    { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5
6289echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;}
6290
6291    ;;
6292esac
6293{ echo "$as_me:$LINENO: checking for sys/wait.h" >&5
6294echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; }
6295if test "${ac_cv_header_sys_wait_h+set}" = set; then
6296  echo $ECHO_N "(cached) $ECHO_C" >&6
6297else
6298  ac_cv_header_sys_wait_h=$ac_header_preproc
6299fi
6300{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
6301echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
6302
6303fi
6304if test $ac_cv_header_sys_wait_h = yes; then
6305  :
6306else
6307
6308cat >>confdefs.h <<\_ACEOF
6309#define NO_SYS_WAIT_H 1
6310_ACEOF
6311
6312fi
6313
6314
6315    if test "${ac_cv_header_dlfcn_h+set}" = set; then
6316  { echo "$as_me:$LINENO: checking for dlfcn.h" >&5
6317echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; }
6318if test "${ac_cv_header_dlfcn_h+set}" = set; then
6319  echo $ECHO_N "(cached) $ECHO_C" >&6
6320fi
6321{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
6322echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; }
6323else
6324  # Is the header compilable?
6325{ echo "$as_me:$LINENO: checking dlfcn.h usability" >&5
6326echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6; }
6327cat >conftest.$ac_ext <<_ACEOF
6328/* confdefs.h.  */
6329_ACEOF
6330cat confdefs.h >>conftest.$ac_ext
6331cat >>conftest.$ac_ext <<_ACEOF
6332/* end confdefs.h.  */
6333$ac_includes_default
6334#include <dlfcn.h>
6335_ACEOF
6336rm -f conftest.$ac_objext
6337if { (ac_try="$ac_compile"
6338case "(($ac_try" in
6339  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6340  *) ac_try_echo=$ac_try;;
6341esac
6342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6343  (eval "$ac_compile") 2>conftest.er1
6344  ac_status=$?
6345  grep -v '^ *+' conftest.er1 >conftest.err
6346  rm -f conftest.er1
6347  cat conftest.err >&5
6348  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6349  (exit $ac_status); } && {
6350	 test -z "$ac_c_werror_flag" ||
6351	 test ! -s conftest.err
6352       } && test -s conftest.$ac_objext; then
6353  ac_header_compiler=yes
6354else
6355  echo "$as_me: failed program was:" >&5
6356sed 's/^/| /' conftest.$ac_ext >&5
6357
6358	ac_header_compiler=no
6359fi
6360
6361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6362{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6363echo "${ECHO_T}$ac_header_compiler" >&6; }
6364
6365# Is the header present?
6366{ echo "$as_me:$LINENO: checking dlfcn.h presence" >&5
6367echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6; }
6368cat >conftest.$ac_ext <<_ACEOF
6369/* confdefs.h.  */
6370_ACEOF
6371cat confdefs.h >>conftest.$ac_ext
6372cat >>conftest.$ac_ext <<_ACEOF
6373/* end confdefs.h.  */
6374#include <dlfcn.h>
6375_ACEOF
6376if { (ac_try="$ac_cpp conftest.$ac_ext"
6377case "(($ac_try" in
6378  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6379  *) ac_try_echo=$ac_try;;
6380esac
6381eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6382  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6383  ac_status=$?
6384  grep -v '^ *+' conftest.er1 >conftest.err
6385  rm -f conftest.er1
6386  cat conftest.err >&5
6387  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6388  (exit $ac_status); } >/dev/null && {
6389	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6390	 test ! -s conftest.err
6391       }; then
6392  ac_header_preproc=yes
6393else
6394  echo "$as_me: failed program was:" >&5
6395sed 's/^/| /' conftest.$ac_ext >&5
6396
6397  ac_header_preproc=no
6398fi
6399
6400rm -f conftest.err conftest.$ac_ext
6401{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6402echo "${ECHO_T}$ac_header_preproc" >&6; }
6403
6404# So?  What about this header?
6405case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6406  yes:no: )
6407    { echo "$as_me:$LINENO: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&5
6408echo "$as_me: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6409    { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the compiler's result" >&5
6410echo "$as_me: WARNING: dlfcn.h: proceeding with the compiler's result" >&2;}
6411    ac_header_preproc=yes
6412    ;;
6413  no:yes:* )
6414    { echo "$as_me:$LINENO: WARNING: dlfcn.h: present but cannot be compiled" >&5
6415echo "$as_me: WARNING: dlfcn.h: present but cannot be compiled" >&2;}
6416    { echo "$as_me:$LINENO: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&5
6417echo "$as_me: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&2;}
6418    { echo "$as_me:$LINENO: WARNING: dlfcn.h: see the Autoconf documentation" >&5
6419echo "$as_me: WARNING: dlfcn.h: see the Autoconf documentation" >&2;}
6420    { echo "$as_me:$LINENO: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&5
6421echo "$as_me: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6422    { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5
6423echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;}
6424    { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5
6425echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;}
6426
6427    ;;
6428esac
6429{ echo "$as_me:$LINENO: checking for dlfcn.h" >&5
6430echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; }
6431if test "${ac_cv_header_dlfcn_h+set}" = set; then
6432  echo $ECHO_N "(cached) $ECHO_C" >&6
6433else
6434  ac_cv_header_dlfcn_h=$ac_header_preproc
6435fi
6436{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
6437echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; }
6438
6439fi
6440if test $ac_cv_header_dlfcn_h = yes; then
6441  :
6442else
6443
6444cat >>confdefs.h <<\_ACEOF
6445#define NO_DLFCN_H 1
6446_ACEOF
6447
6448fi
6449
6450
6451
6452    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
6453
6454for ac_header in sys/param.h
6455do
6456as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6457if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6458  { echo "$as_me:$LINENO: checking for $ac_header" >&5
6459echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6460if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6461  echo $ECHO_N "(cached) $ECHO_C" >&6
6462fi
6463ac_res=`eval echo '${'$as_ac_Header'}'`
6464	       { echo "$as_me:$LINENO: result: $ac_res" >&5
6465echo "${ECHO_T}$ac_res" >&6; }
6466else
6467  # Is the header compilable?
6468{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6469echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
6470cat >conftest.$ac_ext <<_ACEOF
6471/* confdefs.h.  */
6472_ACEOF
6473cat confdefs.h >>conftest.$ac_ext
6474cat >>conftest.$ac_ext <<_ACEOF
6475/* end confdefs.h.  */
6476$ac_includes_default
6477#include <$ac_header>
6478_ACEOF
6479rm -f conftest.$ac_objext
6480if { (ac_try="$ac_compile"
6481case "(($ac_try" in
6482  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6483  *) ac_try_echo=$ac_try;;
6484esac
6485eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6486  (eval "$ac_compile") 2>conftest.er1
6487  ac_status=$?
6488  grep -v '^ *+' conftest.er1 >conftest.err
6489  rm -f conftest.er1
6490  cat conftest.err >&5
6491  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6492  (exit $ac_status); } && {
6493	 test -z "$ac_c_werror_flag" ||
6494	 test ! -s conftest.err
6495       } && test -s conftest.$ac_objext; then
6496  ac_header_compiler=yes
6497else
6498  echo "$as_me: failed program was:" >&5
6499sed 's/^/| /' conftest.$ac_ext >&5
6500
6501	ac_header_compiler=no
6502fi
6503
6504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6505{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6506echo "${ECHO_T}$ac_header_compiler" >&6; }
6507
6508# Is the header present?
6509{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6510echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
6511cat >conftest.$ac_ext <<_ACEOF
6512/* confdefs.h.  */
6513_ACEOF
6514cat confdefs.h >>conftest.$ac_ext
6515cat >>conftest.$ac_ext <<_ACEOF
6516/* end confdefs.h.  */
6517#include <$ac_header>
6518_ACEOF
6519if { (ac_try="$ac_cpp conftest.$ac_ext"
6520case "(($ac_try" in
6521  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6522  *) ac_try_echo=$ac_try;;
6523esac
6524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6525  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6526  ac_status=$?
6527  grep -v '^ *+' conftest.er1 >conftest.err
6528  rm -f conftest.er1
6529  cat conftest.err >&5
6530  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6531  (exit $ac_status); } >/dev/null && {
6532	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6533	 test ! -s conftest.err
6534       }; then
6535  ac_header_preproc=yes
6536else
6537  echo "$as_me: failed program was:" >&5
6538sed 's/^/| /' conftest.$ac_ext >&5
6539
6540  ac_header_preproc=no
6541fi
6542
6543rm -f conftest.err conftest.$ac_ext
6544{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6545echo "${ECHO_T}$ac_header_preproc" >&6; }
6546
6547# So?  What about this header?
6548case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6549  yes:no: )
6550    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6551echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6552    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6553echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6554    ac_header_preproc=yes
6555    ;;
6556  no:yes:* )
6557    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6558echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6559    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
6560echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
6561    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6562echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6563    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
6564echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
6565    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6566echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6567    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6568echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6569
6570    ;;
6571esac
6572{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6573echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6574if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6575  echo $ECHO_N "(cached) $ECHO_C" >&6
6576else
6577  eval "$as_ac_Header=\$ac_header_preproc"
6578fi
6579ac_res=`eval echo '${'$as_ac_Header'}'`
6580	       { echo "$as_me:$LINENO: result: $ac_res" >&5
6581echo "${ECHO_T}$ac_res" >&6; }
6582
6583fi
6584if test `eval echo '${'$as_ac_Header'}'` = yes; then
6585  cat >>confdefs.h <<_ACEOF
6586#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6587_ACEOF
6588
6589fi
6590
6591done
6592
6593
6594	# Let the user call this, because if it triggers, they will
6595	# need a compat/strtod.c that is correct.  Users can also
6596	# use Tcl_GetDouble(FromObj) instead.
6597	#TEA_BUGGY_STRTOD
6598    fi
6599
6600
6601{ echo "$as_me:$LINENO: checking for intptr_t" >&5
6602echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6; }
6603if test "${ac_cv_type_intptr_t+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$ac_includes_default
6613typedef intptr_t ac__type_new_;
6614int
6615main ()
6616{
6617if ((ac__type_new_ *) 0)
6618  return 0;
6619if (sizeof (ac__type_new_))
6620  return 0;
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_type_intptr_t=yes
6643else
6644  echo "$as_me: failed program was:" >&5
6645sed 's/^/| /' conftest.$ac_ext >&5
6646
6647	ac_cv_type_intptr_t=no
6648fi
6649
6650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6651fi
6652{ echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5
6653echo "${ECHO_T}$ac_cv_type_intptr_t" >&6; }
6654if test $ac_cv_type_intptr_t = yes; then
6655
6656
6657cat >>confdefs.h <<\_ACEOF
6658#define HAVE_INTPTR_T 1
6659_ACEOF
6660
6661else
6662
6663    { echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5
6664echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6; }
6665if test "${tcl_cv_intptr_t+set}" = set; then
6666  echo $ECHO_N "(cached) $ECHO_C" >&6
6667else
6668
6669    for tcl_cv_intptr_t in "int" "long" "long long" none; do
6670	if test "$tcl_cv_intptr_t" != none; then
6671	    cat >conftest.$ac_ext <<_ACEOF
6672/* confdefs.h.  */
6673_ACEOF
6674cat confdefs.h >>conftest.$ac_ext
6675cat >>conftest.$ac_ext <<_ACEOF
6676/* end confdefs.h.  */
6677$ac_includes_default
6678int
6679main ()
6680{
6681static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($tcl_cv_intptr_t))];
6682test_array [0] = 0
6683
6684  ;
6685  return 0;
6686}
6687_ACEOF
6688rm -f conftest.$ac_objext
6689if { (ac_try="$ac_compile"
6690case "(($ac_try" in
6691  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6692  *) ac_try_echo=$ac_try;;
6693esac
6694eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6695  (eval "$ac_compile") 2>conftest.er1
6696  ac_status=$?
6697  grep -v '^ *+' conftest.er1 >conftest.err
6698  rm -f conftest.er1
6699  cat conftest.err >&5
6700  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6701  (exit $ac_status); } && {
6702	 test -z "$ac_c_werror_flag" ||
6703	 test ! -s conftest.err
6704       } && test -s conftest.$ac_objext; then
6705  tcl_ok=yes
6706else
6707  echo "$as_me: failed program was:" >&5
6708sed 's/^/| /' conftest.$ac_ext >&5
6709
6710	tcl_ok=no
6711fi
6712
6713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6714	    test "$tcl_ok" = yes && break; fi
6715    done
6716fi
6717{ echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5
6718echo "${ECHO_T}$tcl_cv_intptr_t" >&6; }
6719    if test "$tcl_cv_intptr_t" != none; then
6720
6721cat >>confdefs.h <<_ACEOF
6722#define intptr_t $tcl_cv_intptr_t
6723_ACEOF
6724
6725    fi
6726
6727fi
6728
6729{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
6730echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
6731if test "${ac_cv_type_uintptr_t+set}" = set; then
6732  echo $ECHO_N "(cached) $ECHO_C" >&6
6733else
6734  cat >conftest.$ac_ext <<_ACEOF
6735/* confdefs.h.  */
6736_ACEOF
6737cat confdefs.h >>conftest.$ac_ext
6738cat >>conftest.$ac_ext <<_ACEOF
6739/* end confdefs.h.  */
6740$ac_includes_default
6741typedef uintptr_t ac__type_new_;
6742int
6743main ()
6744{
6745if ((ac__type_new_ *) 0)
6746  return 0;
6747if (sizeof (ac__type_new_))
6748  return 0;
6749  ;
6750  return 0;
6751}
6752_ACEOF
6753rm -f conftest.$ac_objext
6754if { (ac_try="$ac_compile"
6755case "(($ac_try" in
6756  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6757  *) ac_try_echo=$ac_try;;
6758esac
6759eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6760  (eval "$ac_compile") 2>conftest.er1
6761  ac_status=$?
6762  grep -v '^ *+' conftest.er1 >conftest.err
6763  rm -f conftest.er1
6764  cat conftest.err >&5
6765  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6766  (exit $ac_status); } && {
6767	 test -z "$ac_c_werror_flag" ||
6768	 test ! -s conftest.err
6769       } && test -s conftest.$ac_objext; then
6770  ac_cv_type_uintptr_t=yes
6771else
6772  echo "$as_me: failed program was:" >&5
6773sed 's/^/| /' conftest.$ac_ext >&5
6774
6775	ac_cv_type_uintptr_t=no
6776fi
6777
6778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6779fi
6780{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
6781echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
6782if test $ac_cv_type_uintptr_t = yes; then
6783
6784
6785cat >>confdefs.h <<\_ACEOF
6786#define HAVE_UINTPTR_T 1
6787_ACEOF
6788
6789else
6790
6791    { echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5
6792echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6; }
6793if test "${tcl_cv_uintptr_t+set}" = set; then
6794  echo $ECHO_N "(cached) $ECHO_C" >&6
6795else
6796
6797    for tcl_cv_uintptr_t in "unsigned int" "unsigned long" "unsigned long long" \
6798	    none; do
6799	if test "$tcl_cv_uintptr_t" != none; then
6800	    cat >conftest.$ac_ext <<_ACEOF
6801/* confdefs.h.  */
6802_ACEOF
6803cat confdefs.h >>conftest.$ac_ext
6804cat >>conftest.$ac_ext <<_ACEOF
6805/* end confdefs.h.  */
6806$ac_includes_default
6807int
6808main ()
6809{
6810static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($tcl_cv_uintptr_t))];
6811test_array [0] = 0
6812
6813  ;
6814  return 0;
6815}
6816_ACEOF
6817rm -f conftest.$ac_objext
6818if { (ac_try="$ac_compile"
6819case "(($ac_try" in
6820  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6821  *) ac_try_echo=$ac_try;;
6822esac
6823eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6824  (eval "$ac_compile") 2>conftest.er1
6825  ac_status=$?
6826  grep -v '^ *+' conftest.er1 >conftest.err
6827  rm -f conftest.er1
6828  cat conftest.err >&5
6829  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6830  (exit $ac_status); } && {
6831	 test -z "$ac_c_werror_flag" ||
6832	 test ! -s conftest.err
6833       } && test -s conftest.$ac_objext; then
6834  tcl_ok=yes
6835else
6836  echo "$as_me: failed program was:" >&5
6837sed 's/^/| /' conftest.$ac_ext >&5
6838
6839	tcl_ok=no
6840fi
6841
6842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6843	    test "$tcl_ok" = yes && break; fi
6844    done
6845fi
6846{ echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5
6847echo "${ECHO_T}$tcl_cv_uintptr_t" >&6; }
6848    if test "$tcl_cv_uintptr_t" != none; then
6849
6850cat >>confdefs.h <<_ACEOF
6851#define uintptr_t $tcl_cv_uintptr_t
6852_ACEOF
6853
6854    fi
6855
6856fi
6857
6858
6859#-----------------------------------------------------------------------
6860# Specify the C source files to compile in TEA_ADD_SOURCES,
6861# public headers that need to be installed in TEA_ADD_HEADERS,
6862# stub library C source files to compile in TEA_ADD_STUB_SOURCES,
6863# and runtime Tcl library files in TEA_ADD_TCL_SOURCES.
6864# This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS
6865# and PKG_TCL_SOURCES.
6866#-----------------------------------------------------------------------
6867
6868
6869    vars="memchan.c init.c counter.c"
6870    for i in $vars; do
6871	case $i in
6872	    \$*)
6873		# allow $-var names
6874		PKG_SOURCES="$PKG_SOURCES $i"
6875		PKG_OBJECTS="$PKG_OBJECTS $i"
6876		;;
6877	    *)
6878		# check for existence - allows for generic/win/unix VPATH
6879		# To add more dirs here (like 'src'), you have to update VPATH
6880		# in Makefile.in as well
6881		if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
6882		    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
6883		    -a ! -f "${srcdir}/macosx/$i" \
6884		    ; then
6885		    { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
6886echo "$as_me: error: could not find source file '$i'" >&2;}
6887   { (exit 1); exit 1; }; }
6888		fi
6889		PKG_SOURCES="$PKG_SOURCES $i"
6890		# this assumes it is in a VPATH dir
6891		i=`basename $i`
6892		# handle user calling this before or after TEA_SETUP_COMPILER
6893		if test x"${OBJEXT}" != x ; then
6894		    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
6895		else
6896		    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
6897		fi
6898		PKG_OBJECTS="$PKG_OBJECTS $j"
6899		;;
6900	esac
6901    done
6902
6903
6904
6905
6906    vars="fifo.c fifo2.c null.c zero.c random.c"
6907    for i in $vars; do
6908	case $i in
6909	    \$*)
6910		# allow $-var names
6911		PKG_SOURCES="$PKG_SOURCES $i"
6912		PKG_OBJECTS="$PKG_OBJECTS $i"
6913		;;
6914	    *)
6915		# check for existence - allows for generic/win/unix VPATH
6916		# To add more dirs here (like 'src'), you have to update VPATH
6917		# in Makefile.in as well
6918		if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
6919		    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
6920		    -a ! -f "${srcdir}/macosx/$i" \
6921		    ; then
6922		    { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
6923echo "$as_me: error: could not find source file '$i'" >&2;}
6924   { (exit 1); exit 1; }; }
6925		fi
6926		PKG_SOURCES="$PKG_SOURCES $i"
6927		# this assumes it is in a VPATH dir
6928		i=`basename $i`
6929		# handle user calling this before or after TEA_SETUP_COMPILER
6930		if test x"${OBJEXT}" != x ; then
6931		    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
6932		else
6933		    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
6934		fi
6935		PKG_OBJECTS="$PKG_OBJECTS $j"
6936		;;
6937	esac
6938    done
6939
6940
6941
6942
6943    vars="isaac/randport.c"
6944    for i in $vars; do
6945	case $i in
6946	    \$*)
6947		# allow $-var names
6948		PKG_SOURCES="$PKG_SOURCES $i"
6949		PKG_OBJECTS="$PKG_OBJECTS $i"
6950		;;
6951	    *)
6952		# check for existence - allows for generic/win/unix VPATH
6953		# To add more dirs here (like 'src'), you have to update VPATH
6954		# in Makefile.in as well
6955		if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
6956		    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
6957		    -a ! -f "${srcdir}/macosx/$i" \
6958		    ; then
6959		    { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
6960echo "$as_me: error: could not find source file '$i'" >&2;}
6961   { (exit 1); exit 1; }; }
6962		fi
6963		PKG_SOURCES="$PKG_SOURCES $i"
6964		# this assumes it is in a VPATH dir
6965		i=`basename $i`
6966		# handle user calling this before or after TEA_SETUP_COMPILER
6967		if test x"${OBJEXT}" != x ; then
6968		    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
6969		else
6970		    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
6971		fi
6972		PKG_OBJECTS="$PKG_OBJECTS $j"
6973		;;
6974	esac
6975    done
6976
6977
6978
6979
6980    vars="buf.c bufFix.c bufExt.c bufRange.c bufQueue.c"
6981    for i in $vars; do
6982	case $i in
6983	    \$*)
6984		# allow $-var names
6985		PKG_SOURCES="$PKG_SOURCES $i"
6986		PKG_OBJECTS="$PKG_OBJECTS $i"
6987		;;
6988	    *)
6989		# check for existence - allows for generic/win/unix VPATH
6990		# To add more dirs here (like 'src'), you have to update VPATH
6991		# in Makefile.in as well
6992		if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
6993		    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
6994		    -a ! -f "${srcdir}/macosx/$i" \
6995		    ; then
6996		    { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
6997echo "$as_me: error: could not find source file '$i'" >&2;}
6998   { (exit 1); exit 1; }; }
6999		fi
7000		PKG_SOURCES="$PKG_SOURCES $i"
7001		# this assumes it is in a VPATH dir
7002		i=`basename $i`
7003		# handle user calling this before or after TEA_SETUP_COMPILER
7004		if test x"${OBJEXT}" != x ; then
7005		    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
7006		else
7007		    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
7008		fi
7009		PKG_OBJECTS="$PKG_OBJECTS $j"
7010		;;
7011	esac
7012    done
7013
7014
7015
7016
7017    vars="bufStubInit.c memchanStubInit.c "
7018    for i in $vars; do
7019	case $i in
7020	    \$*)
7021		# allow $-var names
7022		PKG_SOURCES="$PKG_SOURCES $i"
7023		PKG_OBJECTS="$PKG_OBJECTS $i"
7024		;;
7025	    *)
7026		# check for existence - allows for generic/win/unix VPATH
7027		# To add more dirs here (like 'src'), you have to update VPATH
7028		# in Makefile.in as well
7029		if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
7030		    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
7031		    -a ! -f "${srcdir}/macosx/$i" \
7032		    ; then
7033		    { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
7034echo "$as_me: error: could not find source file '$i'" >&2;}
7035   { (exit 1); exit 1; }; }
7036		fi
7037		PKG_SOURCES="$PKG_SOURCES $i"
7038		# this assumes it is in a VPATH dir
7039		i=`basename $i`
7040		# handle user calling this before or after TEA_SETUP_COMPILER
7041		if test x"${OBJEXT}" != x ; then
7042		    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
7043		else
7044		    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
7045		fi
7046		PKG_OBJECTS="$PKG_OBJECTS $j"
7047		;;
7048	esac
7049    done
7050
7051
7052
7053
7054    vars="generic/memchan.h generic/memchanDecls.h"
7055    for i in $vars; do
7056	# check for existence, be strict because it is installed
7057	if test ! -f "${srcdir}/$i" ; then
7058	    { { echo "$as_me:$LINENO: error: could not find header file '${srcdir}/$i'" >&5
7059echo "$as_me: error: could not find header file '${srcdir}/$i'" >&2;}
7060   { (exit 1); exit 1; }; }
7061	fi
7062	PKG_HEADERS="$PKG_HEADERS $i"
7063    done
7064
7065
7066
7067    vars="generic/buf.h generic/bufDecls.h generic/bufIntDecls.h"
7068    for i in $vars; do
7069	# check for existence, be strict because it is installed
7070	if test ! -f "${srcdir}/$i" ; then
7071	    { { echo "$as_me:$LINENO: error: could not find header file '${srcdir}/$i'" >&5
7072echo "$as_me: error: could not find header file '${srcdir}/$i'" >&2;}
7073   { (exit 1); exit 1; }; }
7074	fi
7075	PKG_HEADERS="$PKG_HEADERS $i"
7076    done
7077
7078
7079
7080    vars="-I\"`\${CYGPATH} \${srcdir}/isaac`\""
7081    for i in $vars; do
7082	PKG_INCLUDES="$PKG_INCLUDES $i"
7083    done
7084
7085
7086
7087    vars=""
7088    for i in $vars; do
7089	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
7090	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
7091	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
7092	fi
7093	PKG_LIBS="$PKG_LIBS $i"
7094    done
7095
7096
7097
7098    PKG_CFLAGS="$PKG_CFLAGS "
7099
7100
7101
7102    vars="bufStubLib.c memchanStubLib.c"
7103    for i in $vars; do
7104	# check for existence - allows for generic/win/unix VPATH
7105	if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
7106	    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
7107	    -a ! -f "${srcdir}/macosx/$i" \
7108	    ; then
7109	    { { echo "$as_me:$LINENO: error: could not find stub source file '$i'" >&5
7110echo "$as_me: error: could not find stub source file '$i'" >&2;}
7111   { (exit 1); exit 1; }; }
7112	fi
7113	PKG_STUB_SOURCES="$PKG_STUB_SOURCES $i"
7114	# this assumes it is in a VPATH dir
7115	i=`basename $i`
7116	# handle user calling this before or after TEA_SETUP_COMPILER
7117	if test x"${OBJEXT}" != x ; then
7118	    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
7119	else
7120	    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
7121	fi
7122	PKG_STUB_OBJECTS="$PKG_STUB_OBJECTS $j"
7123    done
7124
7125
7126
7127
7128    vars="bufStubLib.c memchanStubLib.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
7164
7165    vars=""
7166    for i in $vars; do
7167	# check for existence, be strict because it is installed
7168	if test ! -f "${srcdir}/$i" ; then
7169	    { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
7170echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
7171   { (exit 1); exit 1; }; }
7172	fi
7173	PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
7174    done
7175
7176
7177
7178#--------------------------------------------------------------------
7179# A few miscellaneous platform-specific items:
7180#
7181# We have to define a special symbol for Windows (BUILD_Memchan in this
7182# case) so that we create the export library with the dll.
7183#
7184# Windows creates a few extra files that need to be cleaned up.
7185# We can add more files to clean if our extension creates any extra
7186# files in the future.
7187#
7188# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
7189# These will be appended to the current set of compiler flags for
7190# your system.
7191#--------------------------------------------------------------------
7192
7193if test "${TEA_PLATFORM}" = "windows" ; then
7194    cat >>confdefs.h <<\_ACEOF
7195#define BUILD_Memchan 1
7196_ACEOF
7197
7198    CLEANFILES="pkgIndex.tcl *.lib *.dll *.exp *.ilk *.pdb vc*.pch"
7199else
7200    CLEANFILES="pkgIndex.tcl"
7201fi
7202
7203
7204#--------------------------------------------------------------------
7205# __CHANGE__
7206# Choose which headers you need.  Extension authors should try very
7207# hard to only rely on the Tcl public header files.  Internal headers
7208# contain private data structures and are subject to change without
7209# notice.
7210# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
7211#--------------------------------------------------------------------
7212
7213
7214    { echo "$as_me:$LINENO: checking for Tcl public headers" >&5
7215echo $ECHO_N "checking for Tcl public headers... $ECHO_C" >&6; }
7216
7217
7218# Check whether --with-tclinclude was given.
7219if test "${with_tclinclude+set}" = set; then
7220  withval=$with_tclinclude; with_tclinclude=${withval}
7221fi
7222
7223
7224    if test "${ac_cv_c_tclh+set}" = set; then
7225  echo $ECHO_N "(cached) $ECHO_C" >&6
7226else
7227
7228	# Use the value from --with-tclinclude, if it was given
7229
7230	if test x"${with_tclinclude}" != x ; then
7231	    if test -f "${with_tclinclude}/tcl.h" ; then
7232		ac_cv_c_tclh=${with_tclinclude}
7233	    else
7234		{ { echo "$as_me:$LINENO: error: ${with_tclinclude} directory does not contain tcl.h" >&5
7235echo "$as_me: error: ${with_tclinclude} directory does not contain tcl.h" >&2;}
7236   { (exit 1); exit 1; }; }
7237	    fi
7238	else
7239	    list=""
7240	    if test "`uname -s`" = "Darwin"; then
7241		# If Tcl was built as a framework, attempt to use
7242		# the framework's Headers directory
7243		case ${TCL_DEFS} in
7244		    *TCL_FRAMEWORK*)
7245			list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
7246			;;
7247		esac
7248	    fi
7249
7250	    # Look in the source dir only if Tcl is not installed,
7251	    # and in that situation, look there before installed locations.
7252	    if test -f "${TCL_BIN_DIR}/Makefile" ; then
7253		list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
7254	    fi
7255
7256	    # Check order: pkg --prefix location, Tcl's --prefix location,
7257	    # relative to directory of tclConfig.sh.
7258
7259	    eval "temp_includedir=${includedir}"
7260	    list="$list \
7261		`ls -d ${temp_includedir}        2>/dev/null` \
7262		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
7263		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
7264	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
7265		list="$list /usr/local/include /usr/include"
7266		if test x"${TCL_INCLUDE_SPEC}" != x ; then
7267		    d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
7268		    list="$list `ls -d ${d} 2>/dev/null`"
7269		fi
7270	    fi
7271	    for i in $list ; do
7272		if test -f "$i/tcl.h" ; then
7273		    ac_cv_c_tclh=$i
7274		    break
7275		fi
7276	    done
7277	fi
7278
7279fi
7280
7281
7282    # Print a message based on how we determined the include path
7283
7284    if test x"${ac_cv_c_tclh}" = x ; then
7285	{ { echo "$as_me:$LINENO: error: tcl.h not found.  Please specify its location with --with-tclinclude" >&5
7286echo "$as_me: error: tcl.h not found.  Please specify its location with --with-tclinclude" >&2;}
7287   { (exit 1); exit 1; }; }
7288    else
7289	{ echo "$as_me:$LINENO: result: ${ac_cv_c_tclh}" >&5
7290echo "${ECHO_T}${ac_cv_c_tclh}" >&6; }
7291    fi
7292
7293    # Convert to a native path and substitute into the output files.
7294
7295    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
7296
7297    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
7298
7299
7300
7301#TEA_PRIVATE_TCL_HEADERS
7302
7303#--------------------------------------------------------------------
7304# Check whether --enable-threads or --disable-threads was given.
7305# So far only Tcl responds to this one.
7306#--------------------------------------------------------------------
7307
7308
7309    # Check whether --enable-threads was given.
7310if test "${enable_threads+set}" = set; then
7311  enableval=$enable_threads; tcl_ok=$enableval
7312else
7313  tcl_ok=yes
7314fi
7315
7316
7317    if test "${enable_threads+set}" = set; then
7318	enableval="$enable_threads"
7319	tcl_ok=$enableval
7320    else
7321	tcl_ok=yes
7322    fi
7323
7324    if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
7325	TCL_THREADS=1
7326
7327	if test "${TEA_PLATFORM}" != "windows" ; then
7328	    # We are always OK on Windows, so check what this platform wants:
7329
7330	    # USE_THREAD_ALLOC tells us to try the special thread-based
7331	    # allocator that significantly reduces lock contention
7332
7333cat >>confdefs.h <<\_ACEOF
7334#define USE_THREAD_ALLOC 1
7335_ACEOF
7336
7337
7338cat >>confdefs.h <<\_ACEOF
7339#define _REENTRANT 1
7340_ACEOF
7341
7342	    if test "`uname -s`" = "SunOS" ; then
7343
7344cat >>confdefs.h <<\_ACEOF
7345#define _POSIX_PTHREAD_SEMANTICS 1
7346_ACEOF
7347
7348	    fi
7349
7350cat >>confdefs.h <<\_ACEOF
7351#define _THREAD_SAFE 1
7352_ACEOF
7353
7354	    { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5
7355echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6; }
7356if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then
7357  echo $ECHO_N "(cached) $ECHO_C" >&6
7358else
7359  ac_check_lib_save_LIBS=$LIBS
7360LIBS="-lpthread  $LIBS"
7361cat >conftest.$ac_ext <<_ACEOF
7362/* confdefs.h.  */
7363_ACEOF
7364cat confdefs.h >>conftest.$ac_ext
7365cat >>conftest.$ac_ext <<_ACEOF
7366/* end confdefs.h.  */
7367
7368/* Override any GCC internal prototype to avoid an error.
7369   Use char because int might match the return type of a GCC
7370   builtin and then its argument prototype would still apply.  */
7371#ifdef __cplusplus
7372extern "C"
7373#endif
7374char pthread_mutex_init ();
7375int
7376main ()
7377{
7378return pthread_mutex_init ();
7379  ;
7380  return 0;
7381}
7382_ACEOF
7383rm -f conftest.$ac_objext conftest$ac_exeext
7384if { (ac_try="$ac_link"
7385case "(($ac_try" in
7386  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7387  *) ac_try_echo=$ac_try;;
7388esac
7389eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7390  (eval "$ac_link") 2>conftest.er1
7391  ac_status=$?
7392  grep -v '^ *+' conftest.er1 >conftest.err
7393  rm -f conftest.er1
7394  cat conftest.err >&5
7395  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7396  (exit $ac_status); } && {
7397	 test -z "$ac_c_werror_flag" ||
7398	 test ! -s conftest.err
7399       } && test -s conftest$ac_exeext &&
7400       $as_test_x conftest$ac_exeext; then
7401  ac_cv_lib_pthread_pthread_mutex_init=yes
7402else
7403  echo "$as_me: failed program was:" >&5
7404sed 's/^/| /' conftest.$ac_ext >&5
7405
7406	ac_cv_lib_pthread_pthread_mutex_init=no
7407fi
7408
7409rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7410      conftest$ac_exeext conftest.$ac_ext
7411LIBS=$ac_check_lib_save_LIBS
7412fi
7413{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5
7414echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6; }
7415if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then
7416  tcl_ok=yes
7417else
7418  tcl_ok=no
7419fi
7420
7421	    if test "$tcl_ok" = "no"; then
7422		# Check a little harder for __pthread_mutex_init in the same
7423		# library, as some systems hide it there until pthread.h is
7424		# defined.  We could alternatively do an AC_TRY_COMPILE with
7425		# pthread.h, but that will work with libpthread really doesn't
7426		# exist, like AIX 4.2.  [Bug: 4359]
7427		{ echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5
7428echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6; }
7429if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then
7430  echo $ECHO_N "(cached) $ECHO_C" >&6
7431else
7432  ac_check_lib_save_LIBS=$LIBS
7433LIBS="-lpthread  $LIBS"
7434cat >conftest.$ac_ext <<_ACEOF
7435/* confdefs.h.  */
7436_ACEOF
7437cat confdefs.h >>conftest.$ac_ext
7438cat >>conftest.$ac_ext <<_ACEOF
7439/* end confdefs.h.  */
7440
7441/* Override any GCC internal prototype to avoid an error.
7442   Use char because int might match the return type of a GCC
7443   builtin and then its argument prototype would still apply.  */
7444#ifdef __cplusplus
7445extern "C"
7446#endif
7447char __pthread_mutex_init ();
7448int
7449main ()
7450{
7451return __pthread_mutex_init ();
7452  ;
7453  return 0;
7454}
7455_ACEOF
7456rm -f conftest.$ac_objext conftest$ac_exeext
7457if { (ac_try="$ac_link"
7458case "(($ac_try" in
7459  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7460  *) ac_try_echo=$ac_try;;
7461esac
7462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7463  (eval "$ac_link") 2>conftest.er1
7464  ac_status=$?
7465  grep -v '^ *+' conftest.er1 >conftest.err
7466  rm -f conftest.er1
7467  cat conftest.err >&5
7468  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7469  (exit $ac_status); } && {
7470	 test -z "$ac_c_werror_flag" ||
7471	 test ! -s conftest.err
7472       } && test -s conftest$ac_exeext &&
7473       $as_test_x conftest$ac_exeext; then
7474  ac_cv_lib_pthread___pthread_mutex_init=yes
7475else
7476  echo "$as_me: failed program was:" >&5
7477sed 's/^/| /' conftest.$ac_ext >&5
7478
7479	ac_cv_lib_pthread___pthread_mutex_init=no
7480fi
7481
7482rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7483      conftest$ac_exeext conftest.$ac_ext
7484LIBS=$ac_check_lib_save_LIBS
7485fi
7486{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5
7487echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6; }
7488if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then
7489  tcl_ok=yes
7490else
7491  tcl_ok=no
7492fi
7493
7494	    fi
7495
7496	    if test "$tcl_ok" = "yes"; then
7497		# The space is needed
7498		THREADS_LIBS=" -lpthread"
7499	    else
7500		{ echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5
7501echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6; }
7502if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then
7503  echo $ECHO_N "(cached) $ECHO_C" >&6
7504else
7505  ac_check_lib_save_LIBS=$LIBS
7506LIBS="-lpthreads  $LIBS"
7507cat >conftest.$ac_ext <<_ACEOF
7508/* confdefs.h.  */
7509_ACEOF
7510cat confdefs.h >>conftest.$ac_ext
7511cat >>conftest.$ac_ext <<_ACEOF
7512/* end confdefs.h.  */
7513
7514/* Override any GCC internal prototype to avoid an error.
7515   Use char because int might match the return type of a GCC
7516   builtin and then its argument prototype would still apply.  */
7517#ifdef __cplusplus
7518extern "C"
7519#endif
7520char pthread_mutex_init ();
7521int
7522main ()
7523{
7524return pthread_mutex_init ();
7525  ;
7526  return 0;
7527}
7528_ACEOF
7529rm -f conftest.$ac_objext conftest$ac_exeext
7530if { (ac_try="$ac_link"
7531case "(($ac_try" in
7532  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7533  *) ac_try_echo=$ac_try;;
7534esac
7535eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7536  (eval "$ac_link") 2>conftest.er1
7537  ac_status=$?
7538  grep -v '^ *+' conftest.er1 >conftest.err
7539  rm -f conftest.er1
7540  cat conftest.err >&5
7541  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7542  (exit $ac_status); } && {
7543	 test -z "$ac_c_werror_flag" ||
7544	 test ! -s conftest.err
7545       } && test -s conftest$ac_exeext &&
7546       $as_test_x conftest$ac_exeext; then
7547  ac_cv_lib_pthreads_pthread_mutex_init=yes
7548else
7549  echo "$as_me: failed program was:" >&5
7550sed 's/^/| /' conftest.$ac_ext >&5
7551
7552	ac_cv_lib_pthreads_pthread_mutex_init=no
7553fi
7554
7555rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7556      conftest$ac_exeext conftest.$ac_ext
7557LIBS=$ac_check_lib_save_LIBS
7558fi
7559{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5
7560echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6; }
7561if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then
7562  tcl_ok=yes
7563else
7564  tcl_ok=no
7565fi
7566
7567		if test "$tcl_ok" = "yes"; then
7568		    # The space is needed
7569		    THREADS_LIBS=" -lpthreads"
7570		else
7571		    { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5
7572echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6; }
7573if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then
7574  echo $ECHO_N "(cached) $ECHO_C" >&6
7575else
7576  ac_check_lib_save_LIBS=$LIBS
7577LIBS="-lc  $LIBS"
7578cat >conftest.$ac_ext <<_ACEOF
7579/* confdefs.h.  */
7580_ACEOF
7581cat confdefs.h >>conftest.$ac_ext
7582cat >>conftest.$ac_ext <<_ACEOF
7583/* end confdefs.h.  */
7584
7585/* Override any GCC internal prototype to avoid an error.
7586   Use char because int might match the return type of a GCC
7587   builtin and then its argument prototype would still apply.  */
7588#ifdef __cplusplus
7589extern "C"
7590#endif
7591char pthread_mutex_init ();
7592int
7593main ()
7594{
7595return pthread_mutex_init ();
7596  ;
7597  return 0;
7598}
7599_ACEOF
7600rm -f conftest.$ac_objext conftest$ac_exeext
7601if { (ac_try="$ac_link"
7602case "(($ac_try" in
7603  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7604  *) ac_try_echo=$ac_try;;
7605esac
7606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7607  (eval "$ac_link") 2>conftest.er1
7608  ac_status=$?
7609  grep -v '^ *+' conftest.er1 >conftest.err
7610  rm -f conftest.er1
7611  cat conftest.err >&5
7612  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7613  (exit $ac_status); } && {
7614	 test -z "$ac_c_werror_flag" ||
7615	 test ! -s conftest.err
7616       } && test -s conftest$ac_exeext &&
7617       $as_test_x conftest$ac_exeext; then
7618  ac_cv_lib_c_pthread_mutex_init=yes
7619else
7620  echo "$as_me: failed program was:" >&5
7621sed 's/^/| /' conftest.$ac_ext >&5
7622
7623	ac_cv_lib_c_pthread_mutex_init=no
7624fi
7625
7626rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7627      conftest$ac_exeext conftest.$ac_ext
7628LIBS=$ac_check_lib_save_LIBS
7629fi
7630{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5
7631echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6; }
7632if test $ac_cv_lib_c_pthread_mutex_init = yes; then
7633  tcl_ok=yes
7634else
7635  tcl_ok=no
7636fi
7637
7638		    if test "$tcl_ok" = "no"; then
7639			{ echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5
7640echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6; }
7641if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then
7642  echo $ECHO_N "(cached) $ECHO_C" >&6
7643else
7644  ac_check_lib_save_LIBS=$LIBS
7645LIBS="-lc_r  $LIBS"
7646cat >conftest.$ac_ext <<_ACEOF
7647/* confdefs.h.  */
7648_ACEOF
7649cat confdefs.h >>conftest.$ac_ext
7650cat >>conftest.$ac_ext <<_ACEOF
7651/* end confdefs.h.  */
7652
7653/* Override any GCC internal prototype to avoid an error.
7654   Use char because int might match the return type of a GCC
7655   builtin and then its argument prototype would still apply.  */
7656#ifdef __cplusplus
7657extern "C"
7658#endif
7659char pthread_mutex_init ();
7660int
7661main ()
7662{
7663return pthread_mutex_init ();
7664  ;
7665  return 0;
7666}
7667_ACEOF
7668rm -f conftest.$ac_objext conftest$ac_exeext
7669if { (ac_try="$ac_link"
7670case "(($ac_try" in
7671  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7672  *) ac_try_echo=$ac_try;;
7673esac
7674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7675  (eval "$ac_link") 2>conftest.er1
7676  ac_status=$?
7677  grep -v '^ *+' conftest.er1 >conftest.err
7678  rm -f conftest.er1
7679  cat conftest.err >&5
7680  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7681  (exit $ac_status); } && {
7682	 test -z "$ac_c_werror_flag" ||
7683	 test ! -s conftest.err
7684       } && test -s conftest$ac_exeext &&
7685       $as_test_x conftest$ac_exeext; then
7686  ac_cv_lib_c_r_pthread_mutex_init=yes
7687else
7688  echo "$as_me: failed program was:" >&5
7689sed 's/^/| /' conftest.$ac_ext >&5
7690
7691	ac_cv_lib_c_r_pthread_mutex_init=no
7692fi
7693
7694rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7695      conftest$ac_exeext conftest.$ac_ext
7696LIBS=$ac_check_lib_save_LIBS
7697fi
7698{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5
7699echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6; }
7700if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then
7701  tcl_ok=yes
7702else
7703  tcl_ok=no
7704fi
7705
7706			if test "$tcl_ok" = "yes"; then
7707			    # The space is needed
7708			    THREADS_LIBS=" -pthread"
7709			else
7710			    TCL_THREADS=0
7711			    { echo "$as_me:$LINENO: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&5
7712echo "$as_me: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&2;}
7713			fi
7714		    fi
7715		fi
7716	    fi
7717	fi
7718    else
7719	TCL_THREADS=0
7720    fi
7721    # Do checking message here to not mess up interleaved configure output
7722    { echo "$as_me:$LINENO: checking for building with threads" >&5
7723echo $ECHO_N "checking for building with threads... $ECHO_C" >&6; }
7724    if test "${TCL_THREADS}" = 1; then
7725
7726cat >>confdefs.h <<\_ACEOF
7727#define TCL_THREADS 1
7728_ACEOF
7729
7730	{ echo "$as_me:$LINENO: result: yes (default)" >&5
7731echo "${ECHO_T}yes (default)" >&6; }
7732    else
7733	{ echo "$as_me:$LINENO: result: no" >&5
7734echo "${ECHO_T}no" >&6; }
7735    fi
7736    # TCL_THREADS sanity checking.  See if our request for building with
7737    # threads is the same as the way Tcl was built.  If not, warn the user.
7738    case ${TCL_DEFS} in
7739	*THREADS=1*)
7740	    if test "${TCL_THREADS}" = "0"; then
7741		{ echo "$as_me:$LINENO: WARNING:
7742    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
7743    that IS thread-enabled.  It is recommended to use --enable-threads." >&5
7744echo "$as_me: WARNING:
7745    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
7746    that IS thread-enabled.  It is recommended to use --enable-threads." >&2;}
7747	    fi
7748	    ;;
7749	*)
7750	    if test "${TCL_THREADS}" = "1"; then
7751		{ echo "$as_me:$LINENO: WARNING:
7752    --enable-threads requested, but building against a Tcl that is NOT
7753    thread-enabled.  This is an OK configuration that will also run in
7754    a thread-enabled core." >&5
7755echo "$as_me: WARNING:
7756    --enable-threads requested, but building against a Tcl that is NOT
7757    thread-enabled.  This is an OK configuration that will also run in
7758    a thread-enabled core." >&2;}
7759	    fi
7760	    ;;
7761    esac
7762
7763
7764
7765#--------------------------------------------------------------------
7766# The statement below defines a collection of symbols related to
7767# building as a shared library instead of a static library.
7768#--------------------------------------------------------------------
7769
7770
7771    { echo "$as_me:$LINENO: checking how to build libraries" >&5
7772echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6; }
7773    # Check whether --enable-shared was given.
7774if test "${enable_shared+set}" = set; then
7775  enableval=$enable_shared; tcl_ok=$enableval
7776else
7777  tcl_ok=yes
7778fi
7779
7780
7781    if test "${enable_shared+set}" = set; then
7782	enableval="$enable_shared"
7783	tcl_ok=$enableval
7784    else
7785	tcl_ok=yes
7786    fi
7787
7788    if test "$tcl_ok" = "yes" ; then
7789	{ echo "$as_me:$LINENO: result: shared" >&5
7790echo "${ECHO_T}shared" >&6; }
7791	SHARED_BUILD=1
7792    else
7793	{ echo "$as_me:$LINENO: result: static" >&5
7794echo "${ECHO_T}static" >&6; }
7795	SHARED_BUILD=0
7796
7797cat >>confdefs.h <<\_ACEOF
7798#define STATIC_BUILD 1
7799_ACEOF
7800
7801    fi
7802
7803
7804
7805#--------------------------------------------------------------------
7806# This macro figures out what flags to use with the compiler/linker
7807# when building shared/static debug/optimized objects.  This information
7808# can be taken from the tclConfig.sh file, but this figures it all out.
7809#--------------------------------------------------------------------
7810
7811
7812
7813
7814    # Step 0.a: Enable 64 bit support?
7815
7816    { echo "$as_me:$LINENO: checking if 64bit support is requested" >&5
7817echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6; }
7818    # Check whether --enable-64bit was given.
7819if test "${enable_64bit+set}" = set; then
7820  enableval=$enable_64bit; do64bit=$enableval
7821else
7822  do64bit=no
7823fi
7824
7825    { echo "$as_me:$LINENO: result: $do64bit" >&5
7826echo "${ECHO_T}$do64bit" >&6; }
7827
7828    # Step 0.b: Enable Solaris 64 bit VIS support?
7829
7830    { echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5
7831echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6; }
7832    # Check whether --enable-64bit-vis was given.
7833if test "${enable_64bit_vis+set}" = set; then
7834  enableval=$enable_64bit_vis; do64bitVIS=$enableval
7835else
7836  do64bitVIS=no
7837fi
7838
7839    { echo "$as_me:$LINENO: result: $do64bitVIS" >&5
7840echo "${ECHO_T}$do64bitVIS" >&6; }
7841    # Force 64bit on with VIS
7842    if test "$do64bitVIS" = "yes"; then
7843  do64bit=yes
7844fi
7845
7846
7847    # Step 0.c: Check if visibility support is available. Do this here so
7848    # that platform specific alternatives can be used below if this fails.
7849
7850    { echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5
7851echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6; }
7852if test "${tcl_cv_cc_visibility_hidden+set}" = set; then
7853  echo $ECHO_N "(cached) $ECHO_C" >&6
7854else
7855
7856	hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
7857	cat >conftest.$ac_ext <<_ACEOF
7858/* confdefs.h.  */
7859_ACEOF
7860cat confdefs.h >>conftest.$ac_ext
7861cat >>conftest.$ac_ext <<_ACEOF
7862/* end confdefs.h.  */
7863
7864	    extern __attribute__((__visibility__("hidden"))) void f(void);
7865	    void f(void) {}
7866int
7867main ()
7868{
7869f();
7870  ;
7871  return 0;
7872}
7873_ACEOF
7874rm -f conftest.$ac_objext conftest$ac_exeext
7875if { (ac_try="$ac_link"
7876case "(($ac_try" in
7877  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7878  *) ac_try_echo=$ac_try;;
7879esac
7880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7881  (eval "$ac_link") 2>conftest.er1
7882  ac_status=$?
7883  grep -v '^ *+' conftest.er1 >conftest.err
7884  rm -f conftest.er1
7885  cat conftest.err >&5
7886  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7887  (exit $ac_status); } && {
7888	 test -z "$ac_c_werror_flag" ||
7889	 test ! -s conftest.err
7890       } && test -s conftest$ac_exeext &&
7891       $as_test_x conftest$ac_exeext; then
7892  tcl_cv_cc_visibility_hidden=yes
7893else
7894  echo "$as_me: failed program was:" >&5
7895sed 's/^/| /' conftest.$ac_ext >&5
7896
7897	tcl_cv_cc_visibility_hidden=no
7898fi
7899
7900rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7901      conftest$ac_exeext conftest.$ac_ext
7902	CFLAGS=$hold_cflags
7903fi
7904{ echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5
7905echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6; }
7906    if test $tcl_cv_cc_visibility_hidden = yes; then
7907
7908
7909cat >>confdefs.h <<\_ACEOF
7910#define MODULE_SCOPE extern __attribute__((__visibility__("hidden")))
7911_ACEOF
7912
7913
7914fi
7915
7916
7917    # Step 0.d: Disable -rpath support?
7918
7919    { echo "$as_me:$LINENO: checking if rpath support is requested" >&5
7920echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6; }
7921    # Check whether --enable-rpath was given.
7922if test "${enable_rpath+set}" = set; then
7923  enableval=$enable_rpath; doRpath=$enableval
7924else
7925  doRpath=yes
7926fi
7927
7928    { echo "$as_me:$LINENO: result: $doRpath" >&5
7929echo "${ECHO_T}$doRpath" >&6; }
7930
7931    # TEA specific: Cross-compiling options for Windows/CE builds?
7932
7933    if test "${TEA_PLATFORM}" = windows; then
7934
7935	{ echo "$as_me:$LINENO: checking if Windows/CE build is requested" >&5
7936echo $ECHO_N "checking if Windows/CE build is requested... $ECHO_C" >&6; }
7937	# Check whether --enable-wince was given.
7938if test "${enable_wince+set}" = set; then
7939  enableval=$enable_wince; doWince=$enableval
7940else
7941  doWince=no
7942fi
7943
7944	{ echo "$as_me:$LINENO: result: $doWince" >&5
7945echo "${ECHO_T}$doWince" >&6; }
7946
7947fi
7948
7949
7950    # Set the variable "system" to hold the name and version number
7951    # for the system.
7952
7953
7954    { echo "$as_me:$LINENO: checking system version" >&5
7955echo $ECHO_N "checking system version... $ECHO_C" >&6; }
7956if test "${tcl_cv_sys_version+set}" = set; then
7957  echo $ECHO_N "(cached) $ECHO_C" >&6
7958else
7959
7960	# TEA specific:
7961	if test "${TEA_PLATFORM}" = "windows" ; then
7962	    tcl_cv_sys_version=windows
7963	else
7964	    tcl_cv_sys_version=`uname -s`-`uname -r`
7965	    if test "$?" -ne 0 ; then
7966		{ echo "$as_me:$LINENO: WARNING: can't find uname command" >&5
7967echo "$as_me: WARNING: can't find uname command" >&2;}
7968		tcl_cv_sys_version=unknown
7969	    else
7970		if test "`uname -s`" = "AIX" ; then
7971		    tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
7972		fi
7973	    fi
7974	fi
7975
7976fi
7977{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5
7978echo "${ECHO_T}$tcl_cv_sys_version" >&6; }
7979    system=$tcl_cv_sys_version
7980
7981
7982    # Require ranlib early so we can override it in special cases below.
7983
7984
7985
7986    # Set configuration options based on system name and version.
7987    # This is similar to Tcl's unix/tcl.m4 except that we've added a
7988    # "windows" case and removed some core-only vars.
7989
7990    do64bit_ok=no
7991    # default to '{$LIBS}' and set to "" on per-platform necessary basis
7992    SHLIB_LD_LIBS='${LIBS}'
7993    # When ld needs options to work in 64-bit mode, put them in
7994    # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
7995    # is disabled by the user. [Bug 1016796]
7996    LDFLAGS_ARCH=""
7997    UNSHARED_LIB_SUFFIX=""
7998    # TEA specific: use PACKAGE_VERSION instead of VERSION
7999    TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
8000    ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
8001    TCL_LIB_VERSIONS_OK=ok
8002    CFLAGS_DEBUG=-g
8003    CFLAGS_OPTIMIZE=-O
8004    if test "$GCC" = yes; then
8005
8006	# TEA specific:
8007	CFLAGS_OPTIMIZE=-O2
8008	CFLAGS_WARNING="-Wall"
8009
8010else
8011  CFLAGS_WARNING=""
8012fi
8013
8014    # Extract the first word of "ar", so it can be a program name with args.
8015set dummy ar; ac_word=$2
8016{ echo "$as_me:$LINENO: checking for $ac_word" >&5
8017echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
8018if test "${ac_cv_prog_AR+set}" = set; then
8019  echo $ECHO_N "(cached) $ECHO_C" >&6
8020else
8021  if test -n "$AR"; then
8022  ac_cv_prog_AR="$AR" # Let the user override the test.
8023else
8024as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8025for as_dir in $PATH
8026do
8027  IFS=$as_save_IFS
8028  test -z "$as_dir" && as_dir=.
8029  for ac_exec_ext in '' $ac_executable_extensions; do
8030  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8031    ac_cv_prog_AR="ar"
8032    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8033    break 2
8034  fi
8035done
8036done
8037IFS=$as_save_IFS
8038
8039fi
8040fi
8041AR=$ac_cv_prog_AR
8042if test -n "$AR"; then
8043  { echo "$as_me:$LINENO: result: $AR" >&5
8044echo "${ECHO_T}$AR" >&6; }
8045else
8046  { echo "$as_me:$LINENO: result: no" >&5
8047echo "${ECHO_T}no" >&6; }
8048fi
8049
8050
8051    STLIB_LD='${AR} cr'
8052    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
8053    if test "x$SHLIB_VERSION" = x; then
8054  SHLIB_VERSION="1.0"
8055fi
8056
8057    case $system in
8058	# TEA specific:
8059	windows)
8060	    # This is a 2-stage check to make sure we have the 64-bit SDK
8061	    # We have to know where the SDK is installed.
8062	    # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
8063	    # MACHINE is IX86 for LINK, but this is used by the manifest,
8064	    # which requires x86|amd64|ia64.
8065	    MACHINE="X86"
8066	    if test "$do64bit" != "no" ; then
8067		if test "x${MSSDK}x" = "xx" ; then
8068		    MSSDK="C:/Progra~1/Microsoft Platform SDK"
8069		fi
8070		MSSDK=`echo "$MSSDK" | sed -e  's!\\\!/!g'`
8071		PATH64=""
8072		case "$do64bit" in
8073		    amd64|x64|yes)
8074			MACHINE="AMD64" ; # default to AMD64 64-bit build
8075			PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
8076			;;
8077		    ia64)
8078			MACHINE="IA64"
8079			PATH64="${MSSDK}/Bin/Win64"
8080			;;
8081		esac
8082		if test ! -d "${PATH64}" ; then
8083		    { echo "$as_me:$LINENO: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&5
8084echo "$as_me: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&2;}
8085		    { echo "$as_me:$LINENO: WARNING: Ensure latest Platform SDK is installed" >&5
8086echo "$as_me: WARNING: Ensure latest Platform SDK is installed" >&2;}
8087		    do64bit="no"
8088		else
8089		    { echo "$as_me:$LINENO: result:    Using 64-bit $MACHINE mode" >&5
8090echo "${ECHO_T}   Using 64-bit $MACHINE mode" >&6; }
8091		    do64bit_ok="yes"
8092		fi
8093	    fi
8094
8095	    if test "$doWince" != "no" ; then
8096		if test "$do64bit" != "no" ; then
8097		    { { echo "$as_me:$LINENO: error: Windows/CE and 64-bit builds incompatible" >&5
8098echo "$as_me: error: Windows/CE and 64-bit builds incompatible" >&2;}
8099   { (exit 1); exit 1; }; }
8100		fi
8101		if test "$GCC" = "yes" ; then
8102		    { { echo "$as_me:$LINENO: error: Windows/CE and GCC builds incompatible" >&5
8103echo "$as_me: error: Windows/CE and GCC builds incompatible" >&2;}
8104   { (exit 1); exit 1; }; }
8105		fi
8106
8107    # First, look for one uninstalled.
8108    # the alternative search directory is invoked by --with-celib
8109
8110    if test x"${no_celib}" = x ; then
8111	# we reset no_celib in case something fails here
8112	no_celib=true
8113
8114# Check whether --with-celib was given.
8115if test "${with_celib+set}" = set; then
8116  withval=$with_celib; with_celibconfig=${withval}
8117fi
8118
8119	{ echo "$as_me:$LINENO: checking for Windows/CE celib directory" >&5
8120echo $ECHO_N "checking for Windows/CE celib directory... $ECHO_C" >&6; }
8121	if test "${ac_cv_c_celibconfig+set}" = set; then
8122  echo $ECHO_N "(cached) $ECHO_C" >&6
8123else
8124
8125	    # First check to see if --with-celibconfig was specified.
8126	    if test x"${with_celibconfig}" != x ; then
8127		if test -d "${with_celibconfig}/inc" ; then
8128		    ac_cv_c_celibconfig=`(cd ${with_celibconfig}; pwd)`
8129		else
8130		    { { echo "$as_me:$LINENO: error: ${with_celibconfig} directory doesn't contain inc directory" >&5
8131echo "$as_me: error: ${with_celibconfig} directory doesn't contain inc directory" >&2;}
8132   { (exit 1); exit 1; }; }
8133		fi
8134	    fi
8135
8136	    # then check for a celib library
8137	    if test x"${ac_cv_c_celibconfig}" = x ; then
8138		for i in \
8139			../celib-palm-3.0 \
8140			../celib \
8141			../../celib-palm-3.0 \
8142			../../celib \
8143			`ls -dr ../celib-*3.[0-9]* 2>/dev/null` \
8144			${srcdir}/../celib-palm-3.0 \
8145			${srcdir}/../celib \
8146			`ls -dr ${srcdir}/../celib-*3.[0-9]* 2>/dev/null` \
8147			; do
8148		    if test -d "$i/inc" ; then
8149			ac_cv_c_celibconfig=`(cd $i; pwd)`
8150			break
8151		    fi
8152		done
8153	    fi
8154
8155fi
8156
8157	if test x"${ac_cv_c_celibconfig}" = x ; then
8158	    { { echo "$as_me:$LINENO: error: Cannot find celib support library directory" >&5
8159echo "$as_me: error: Cannot find celib support library directory" >&2;}
8160   { (exit 1); exit 1; }; }
8161	else
8162	    no_celib=
8163	    CELIB_DIR=${ac_cv_c_celibconfig}
8164	    CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
8165	    { echo "$as_me:$LINENO: result: found $CELIB_DIR" >&5
8166echo "${ECHO_T}found $CELIB_DIR" >&6; }
8167	fi
8168    fi
8169
8170		# Set defaults for common evc4/PPC2003 setup
8171		# Currently Tcl requires 300+, possibly 420+ for sockets
8172		CEVERSION=420; 		# could be 211 300 301 400 420 ...
8173		TARGETCPU=ARMV4;	# could be ARMV4 ARM MIPS SH3 X86 ...
8174		ARCH=ARM;		# could be ARM MIPS X86EM ...
8175		PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002"
8176		if test "$doWince" != "yes"; then
8177		    # If !yes then the user specified something
8178		    # Reset ARCH to allow user to skip specifying it
8179		    ARCH=
8180		    eval `echo $doWince | awk -F, '{ \
8181	    if (length($1)) { printf "CEVERSION=\"%s\"\n", $1; \
8182	    if ($1 < 400)   { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \
8183	    if (length($2)) { printf "TARGETCPU=\"%s\"\n", toupper($2) }; \
8184	    if (length($3)) { printf "ARCH=\"%s\"\n", toupper($3) }; \
8185	    if (length($4)) { printf "PLATFORM=\"%s\"\n", $4 }; \
8186		    }'`
8187		    if test "x${ARCH}" = "x" ; then
8188			ARCH=$TARGETCPU;
8189		    fi
8190		fi
8191		OSVERSION=WCE$CEVERSION;
8192	    	if test "x${WCEROOT}" = "x" ; then
8193			WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0"
8194		    if test ! -d "${WCEROOT}" ; then
8195			WCEROOT="C:/Program Files/Microsoft eMbedded Tools"
8196		    fi
8197		fi
8198		if test "x${SDKROOT}" = "x" ; then
8199		    SDKROOT="C:/Program Files/Windows CE Tools"
8200		    if test ! -d "${SDKROOT}" ; then
8201			SDKROOT="C:/Windows CE Tools"
8202		    fi
8203		fi
8204		WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'`
8205		SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
8206		if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \
8207		    -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then
8208		    { { echo "$as_me:$LINENO: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&5
8209echo "$as_me: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&2;}
8210   { (exit 1); exit 1; }; }
8211		    doWince="no"
8212		else
8213		    # We could PATH_NOSPACE these, but that's not important,
8214		    # as long as we quote them when used.
8215		    CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include"
8216		    if test -d "${CEINCLUDE}/${TARGETCPU}" ; then
8217			CEINCLUDE="${CEINCLUDE}/${TARGETCPU}"
8218		    fi
8219		    CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}"
8220    		fi
8221	    fi
8222
8223	    if test "$GCC" != "yes" ; then
8224	        if test "${SHARED_BUILD}" = "0" ; then
8225		    runtime=-MT
8226	        else
8227		    runtime=-MD
8228	        fi
8229
8230                if test "$do64bit" != "no" ; then
8231		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
8232		    CC="\"${PATH64}/cl.exe\""
8233		    CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
8234		    RC="\"${MSSDK}/bin/rc.exe\""
8235		    lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
8236		    LINKBIN="\"${PATH64}/link.exe\""
8237		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
8238		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
8239		    # Avoid 'unresolved external symbol __security_cookie'
8240		    # errors, c.f. http://support.microsoft.com/?id=894573
8241
8242    vars="bufferoverflowU.lib"
8243    for i in $vars; do
8244	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
8245	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
8246	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
8247	fi
8248	PKG_LIBS="$PKG_LIBS $i"
8249    done
8250
8251
8252		elif test "$doWince" != "no" ; then
8253		    CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin"
8254		    if test "${TARGETCPU}" = "X86"; then
8255			CC="\"${CEBINROOT}/cl.exe\""
8256		    else
8257			CC="\"${CEBINROOT}/cl${ARCH}.exe\""
8258		    fi
8259		    CFLAGS="$CFLAGS -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\""
8260		    RC="\"${WCEROOT}/Common/EVC/bin/rc.exe\""
8261		    arch=`echo ${ARCH} | awk '{print tolower($0)}'`
8262		    defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _WINDOWS"
8263		    if test "${SHARED_BUILD}" = "1" ; then
8264			# Static CE builds require static celib as well
8265		    	defs="${defs} _DLL"
8266		    fi
8267		    for i in $defs ; do
8268
8269cat >>confdefs.h <<_ACEOF
8270#define $i 1
8271_ACEOF
8272
8273		    done
8274
8275cat >>confdefs.h <<_ACEOF
8276#define _WIN32_WCE $CEVERSION
8277_ACEOF
8278
8279
8280cat >>confdefs.h <<_ACEOF
8281#define UNDER_CE $CEVERSION
8282_ACEOF
8283
8284		    CFLAGS_DEBUG="-nologo -Zi -Od"
8285		    CFLAGS_OPTIMIZE="-nologo -Ox"
8286		    lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'`
8287		    lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
8288		    LINKBIN="\"${CEBINROOT}/link.exe\""
8289
8290		else
8291		    RC="rc"
8292		    lflags="-nologo"
8293    		    LINKBIN="link"
8294		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
8295		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
8296		fi
8297	    fi
8298
8299	    if test "$GCC" = "yes"; then
8300		# mingw gcc mode
8301		RC="windres"
8302		CFLAGS_DEBUG="-g"
8303		CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
8304		SHLIB_LD="$CC -shared"
8305		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
8306		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
8307		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
8308	    else
8309		SHLIB_LD="${LINKBIN} -dll ${lflags}"
8310		# link -lib only works when -lib is the first arg
8311		STLIB_LD="${LINKBIN} -lib ${lflags}"
8312		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib'
8313		PATHTYPE=-w
8314		# For information on what debugtype is most useful, see:
8315		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
8316		# and also
8317		# http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx
8318		# This essentially turns it all on.
8319		LDFLAGS_DEBUG="-debug -debugtype:cv"
8320		LDFLAGS_OPTIMIZE="-release"
8321		if test "$doWince" != "no" ; then
8322		    LDFLAGS_CONSOLE="-link ${lflags}"
8323		    LDFLAGS_WINDOW=${LDFLAGS_CONSOLE}
8324		else
8325		    LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
8326		    LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
8327		fi
8328	    fi
8329
8330	    SHLIB_SUFFIX=".dll"
8331	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
8332
8333	    TCL_LIB_VERSIONS_OK=nodots
8334    	    ;;
8335	AIX-*)
8336	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"; then
8337
8338		# AIX requires the _r compiler when gcc isn't being used
8339		case "${CC}" in
8340		    *_r|*_r\ *)
8341			# ok ...
8342			;;
8343		    *)
8344			# Make sure only first arg gets _r
8345		    	CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'`
8346			;;
8347		esac
8348		{ echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5
8349echo "${ECHO_T}Using $CC for compiling with threads" >&6; }
8350
8351fi
8352
8353	    LIBS="$LIBS -lc"
8354	    SHLIB_CFLAGS=""
8355	    SHLIB_SUFFIX=".so"
8356
8357	    LD_LIBRARY_PATH_VAR="LIBPATH"
8358
8359	    # Check to enable 64-bit flags for compiler/linker
8360	    if test "$do64bit" = yes; then
8361
8362		if test "$GCC" = yes; then
8363
8364		    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
8365echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
8366
8367else
8368
8369		    do64bit_ok=yes
8370		    CFLAGS="$CFLAGS -q64"
8371		    LDFLAGS_ARCH="-q64"
8372		    RANLIB="${RANLIB} -X64"
8373		    AR="${AR} -X64"
8374		    SHLIB_LD_FLAGS="-b64"
8375
8376fi
8377
8378
8379fi
8380
8381
8382	    if test "`uname -m`" = ia64; then
8383
8384		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
8385		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
8386		if test "$GCC" = yes; then
8387
8388		    CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
8389
8390else
8391
8392		    CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
8393
8394fi
8395
8396		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
8397
8398else
8399
8400		if test "$GCC" = yes; then
8401
8402		    SHLIB_LD='${CC} -shared -Wl,-bexpall'
8403
8404else
8405
8406		    SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bexpall -H512 -T512 -bnoentry"
8407		    LDFLAGS="$LDFLAGS -brtl"
8408
8409fi
8410
8411		SHLIB_LD="${SHLIB_LD} ${SHLIB_LD_FLAGS}"
8412		CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
8413		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8414
8415fi
8416
8417	    ;;
8418	BeOS*)
8419	    SHLIB_CFLAGS="-fPIC"
8420	    SHLIB_LD='${CC} -nostart'
8421	    SHLIB_SUFFIX=".so"
8422
8423	    #-----------------------------------------------------------
8424	    # Check for inet_ntoa in -lbind, for BeOS (which also needs
8425	    # -lsocket, even if the network functions are in -lnet which
8426	    # is always linked to, for compatibility.
8427	    #-----------------------------------------------------------
8428	    { echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5
8429echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6; }
8430if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then
8431  echo $ECHO_N "(cached) $ECHO_C" >&6
8432else
8433  ac_check_lib_save_LIBS=$LIBS
8434LIBS="-lbind  $LIBS"
8435cat >conftest.$ac_ext <<_ACEOF
8436/* confdefs.h.  */
8437_ACEOF
8438cat confdefs.h >>conftest.$ac_ext
8439cat >>conftest.$ac_ext <<_ACEOF
8440/* end confdefs.h.  */
8441
8442/* Override any GCC internal prototype to avoid an error.
8443   Use char because int might match the return type of a GCC
8444   builtin and then its argument prototype would still apply.  */
8445#ifdef __cplusplus
8446extern "C"
8447#endif
8448char inet_ntoa ();
8449int
8450main ()
8451{
8452return inet_ntoa ();
8453  ;
8454  return 0;
8455}
8456_ACEOF
8457rm -f conftest.$ac_objext conftest$ac_exeext
8458if { (ac_try="$ac_link"
8459case "(($ac_try" in
8460  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8461  *) ac_try_echo=$ac_try;;
8462esac
8463eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8464  (eval "$ac_link") 2>conftest.er1
8465  ac_status=$?
8466  grep -v '^ *+' conftest.er1 >conftest.err
8467  rm -f conftest.er1
8468  cat conftest.err >&5
8469  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8470  (exit $ac_status); } && {
8471	 test -z "$ac_c_werror_flag" ||
8472	 test ! -s conftest.err
8473       } && test -s conftest$ac_exeext &&
8474       $as_test_x conftest$ac_exeext; then
8475  ac_cv_lib_bind_inet_ntoa=yes
8476else
8477  echo "$as_me: failed program was:" >&5
8478sed 's/^/| /' conftest.$ac_ext >&5
8479
8480	ac_cv_lib_bind_inet_ntoa=no
8481fi
8482
8483rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8484      conftest$ac_exeext conftest.$ac_ext
8485LIBS=$ac_check_lib_save_LIBS
8486fi
8487{ echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5
8488echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6; }
8489if test $ac_cv_lib_bind_inet_ntoa = yes; then
8490  LIBS="$LIBS -lbind -lsocket"
8491fi
8492
8493	    ;;
8494	BSD/OS-4.*)
8495	    SHLIB_CFLAGS="-export-dynamic -fPIC"
8496	    SHLIB_LD='${CC} -shared'
8497	    SHLIB_SUFFIX=".so"
8498	    LDFLAGS="$LDFLAGS -export-dynamic"
8499	    CC_SEARCH_FLAGS=""
8500	    LD_SEARCH_FLAGS=""
8501	    ;;
8502	CYGWIN_*)
8503	    SHLIB_CFLAGS=""
8504	    SHLIB_LD='${CC} -shared'
8505	    SHLIB_SUFFIX=".dll"
8506	    EXE_SUFFIX=".exe"
8507	    CC_SEARCH_FLAGS=""
8508	    LD_SEARCH_FLAGS=""
8509	    ;;
8510	Haiku*)
8511	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
8512	    SHLIB_CFLAGS="-fPIC"
8513	    SHLIB_SUFFIX=".so"
8514	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
8515	    { echo "$as_me:$LINENO: checking for inet_ntoa in -lnetwork" >&5
8516echo $ECHO_N "checking for inet_ntoa in -lnetwork... $ECHO_C" >&6; }
8517if test "${ac_cv_lib_network_inet_ntoa+set}" = set; then
8518  echo $ECHO_N "(cached) $ECHO_C" >&6
8519else
8520  ac_check_lib_save_LIBS=$LIBS
8521LIBS="-lnetwork  $LIBS"
8522cat >conftest.$ac_ext <<_ACEOF
8523/* confdefs.h.  */
8524_ACEOF
8525cat confdefs.h >>conftest.$ac_ext
8526cat >>conftest.$ac_ext <<_ACEOF
8527/* end confdefs.h.  */
8528
8529/* Override any GCC internal prototype to avoid an error.
8530   Use char because int might match the return type of a GCC
8531   builtin and then its argument prototype would still apply.  */
8532#ifdef __cplusplus
8533extern "C"
8534#endif
8535char inet_ntoa ();
8536int
8537main ()
8538{
8539return inet_ntoa ();
8540  ;
8541  return 0;
8542}
8543_ACEOF
8544rm -f conftest.$ac_objext conftest$ac_exeext
8545if { (ac_try="$ac_link"
8546case "(($ac_try" in
8547  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8548  *) ac_try_echo=$ac_try;;
8549esac
8550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8551  (eval "$ac_link") 2>conftest.er1
8552  ac_status=$?
8553  grep -v '^ *+' conftest.er1 >conftest.err
8554  rm -f conftest.er1
8555  cat conftest.err >&5
8556  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8557  (exit $ac_status); } && {
8558	 test -z "$ac_c_werror_flag" ||
8559	 test ! -s conftest.err
8560       } && test -s conftest$ac_exeext &&
8561       $as_test_x conftest$ac_exeext; then
8562  ac_cv_lib_network_inet_ntoa=yes
8563else
8564  echo "$as_me: failed program was:" >&5
8565sed 's/^/| /' conftest.$ac_ext >&5
8566
8567	ac_cv_lib_network_inet_ntoa=no
8568fi
8569
8570rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8571      conftest$ac_exeext conftest.$ac_ext
8572LIBS=$ac_check_lib_save_LIBS
8573fi
8574{ echo "$as_me:$LINENO: result: $ac_cv_lib_network_inet_ntoa" >&5
8575echo "${ECHO_T}$ac_cv_lib_network_inet_ntoa" >&6; }
8576if test $ac_cv_lib_network_inet_ntoa = yes; then
8577  LIBS="$LIBS -lnetwork"
8578fi
8579
8580	    ;;
8581	HP-UX-*.11.*)
8582	    # Use updated header definitions where possible
8583
8584cat >>confdefs.h <<\_ACEOF
8585#define _XOPEN_SOURCE_EXTENDED 1
8586_ACEOF
8587
8588	    # TEA specific: Needed by Tcl, but not most extensions
8589	    #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
8590	    #LIBS="$LIBS -lxnet"               # Use the XOPEN network library
8591
8592	    if test "`uname -m`" = ia64; then
8593
8594		SHLIB_SUFFIX=".so"
8595		# Use newer C++ library for C++ extensions
8596		#if test "$GCC" != "yes" ; then
8597		#   CPPFLAGS="-AA"
8598		#fi
8599
8600else
8601
8602		SHLIB_SUFFIX=".sl"
8603
8604fi
8605
8606	    { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
8607echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
8608if test "${ac_cv_lib_dld_shl_load+set}" = set; then
8609  echo $ECHO_N "(cached) $ECHO_C" >&6
8610else
8611  ac_check_lib_save_LIBS=$LIBS
8612LIBS="-ldld  $LIBS"
8613cat >conftest.$ac_ext <<_ACEOF
8614/* confdefs.h.  */
8615_ACEOF
8616cat confdefs.h >>conftest.$ac_ext
8617cat >>conftest.$ac_ext <<_ACEOF
8618/* end confdefs.h.  */
8619
8620/* Override any GCC internal prototype to avoid an error.
8621   Use char because int might match the return type of a GCC
8622   builtin and then its argument prototype would still apply.  */
8623#ifdef __cplusplus
8624extern "C"
8625#endif
8626char shl_load ();
8627int
8628main ()
8629{
8630return shl_load ();
8631  ;
8632  return 0;
8633}
8634_ACEOF
8635rm -f conftest.$ac_objext conftest$ac_exeext
8636if { (ac_try="$ac_link"
8637case "(($ac_try" in
8638  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8639  *) ac_try_echo=$ac_try;;
8640esac
8641eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8642  (eval "$ac_link") 2>conftest.er1
8643  ac_status=$?
8644  grep -v '^ *+' conftest.er1 >conftest.err
8645  rm -f conftest.er1
8646  cat conftest.err >&5
8647  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8648  (exit $ac_status); } && {
8649	 test -z "$ac_c_werror_flag" ||
8650	 test ! -s conftest.err
8651       } && test -s conftest$ac_exeext &&
8652       $as_test_x conftest$ac_exeext; then
8653  ac_cv_lib_dld_shl_load=yes
8654else
8655  echo "$as_me: failed program was:" >&5
8656sed 's/^/| /' conftest.$ac_ext >&5
8657
8658	ac_cv_lib_dld_shl_load=no
8659fi
8660
8661rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8662      conftest$ac_exeext conftest.$ac_ext
8663LIBS=$ac_check_lib_save_LIBS
8664fi
8665{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
8666echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
8667if test $ac_cv_lib_dld_shl_load = yes; then
8668  tcl_ok=yes
8669else
8670  tcl_ok=no
8671fi
8672
8673	    if test "$tcl_ok" = yes; then
8674
8675		LDFLAGS="$LDFLAGS -E"
8676		CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
8677		LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
8678		LD_LIBRARY_PATH_VAR="SHLIB_PATH"
8679
8680fi
8681
8682	    if test "$GCC" = yes; then
8683
8684		SHLIB_LD='${CC} -shared'
8685		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8686
8687else
8688
8689		CFLAGS="$CFLAGS -z"
8690		# Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
8691		#CFLAGS="$CFLAGS +DAportable"
8692		SHLIB_CFLAGS="+z"
8693		SHLIB_LD="ld -b"
8694
8695fi
8696
8697
8698	    # Check to enable 64-bit flags for compiler/linker
8699	    if test "$do64bit" = "yes"; then
8700
8701		if test "$GCC" = yes; then
8702
8703		    case `${CC} -dumpmachine` in
8704			hppa64*)
8705			    # 64-bit gcc in use.  Fix flags for GNU ld.
8706			    do64bit_ok=yes
8707			    SHLIB_LD='${CC} -shared'
8708			    if test $doRpath = yes; then
8709
8710				CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8711fi
8712
8713			    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8714			    ;;
8715			*)
8716			    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
8717echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
8718			    ;;
8719		    esac
8720
8721else
8722
8723		    do64bit_ok=yes
8724		    CFLAGS="$CFLAGS +DD64"
8725		    LDFLAGS_ARCH="+DD64"
8726
8727fi
8728
8729
8730fi
8731 ;;
8732	IRIX-6.*)
8733	    SHLIB_CFLAGS=""
8734	    SHLIB_LD="ld -n32 -shared -rdata_shared"
8735	    SHLIB_SUFFIX=".so"
8736	    if test $doRpath = yes; then
8737
8738		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8739		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
8740fi
8741
8742	    if test "$GCC" = yes; then
8743
8744		CFLAGS="$CFLAGS -mabi=n32"
8745		LDFLAGS="$LDFLAGS -mabi=n32"
8746
8747else
8748
8749		case $system in
8750		    IRIX-6.3)
8751			# Use to build 6.2 compatible binaries on 6.3.
8752			CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
8753			;;
8754		    *)
8755			CFLAGS="$CFLAGS -n32"
8756			;;
8757		esac
8758		LDFLAGS="$LDFLAGS -n32"
8759
8760fi
8761
8762	    ;;
8763	IRIX64-6.*)
8764	    SHLIB_CFLAGS=""
8765	    SHLIB_LD="ld -n32 -shared -rdata_shared"
8766	    SHLIB_SUFFIX=".so"
8767	    if test $doRpath = yes; then
8768
8769		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8770		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
8771fi
8772
8773
8774	    # Check to enable 64-bit flags for compiler/linker
8775
8776	    if test "$do64bit" = yes; then
8777
8778	        if test "$GCC" = yes; then
8779
8780	            { echo "$as_me:$LINENO: WARNING: 64bit mode not supported by gcc" >&5
8781echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;}
8782
8783else
8784
8785	            do64bit_ok=yes
8786	            SHLIB_LD="ld -64 -shared -rdata_shared"
8787	            CFLAGS="$CFLAGS -64"
8788	            LDFLAGS_ARCH="-64"
8789
8790fi
8791
8792
8793fi
8794
8795	    ;;
8796	Linux*)
8797	    SHLIB_CFLAGS="-fPIC"
8798	    SHLIB_SUFFIX=".so"
8799
8800	    # TEA specific:
8801	    CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
8802
8803	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
8804	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}'
8805	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
8806	    if test $doRpath = yes; then
8807
8808		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8809fi
8810
8811	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8812	    if test "`uname -m`" = "alpha"; then
8813  CFLAGS="$CFLAGS -mieee"
8814fi
8815
8816	    if test $do64bit = yes; then
8817
8818		{ echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5
8819echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6; }
8820if test "${tcl_cv_cc_m64+set}" = set; then
8821  echo $ECHO_N "(cached) $ECHO_C" >&6
8822else
8823
8824		    hold_cflags=$CFLAGS
8825		    CFLAGS="$CFLAGS -m64"
8826		    cat >conftest.$ac_ext <<_ACEOF
8827/* confdefs.h.  */
8828_ACEOF
8829cat confdefs.h >>conftest.$ac_ext
8830cat >>conftest.$ac_ext <<_ACEOF
8831/* end confdefs.h.  */
8832
8833int
8834main ()
8835{
8836
8837  ;
8838  return 0;
8839}
8840_ACEOF
8841rm -f conftest.$ac_objext conftest$ac_exeext
8842if { (ac_try="$ac_link"
8843case "(($ac_try" in
8844  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8845  *) ac_try_echo=$ac_try;;
8846esac
8847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8848  (eval "$ac_link") 2>conftest.er1
8849  ac_status=$?
8850  grep -v '^ *+' conftest.er1 >conftest.err
8851  rm -f conftest.er1
8852  cat conftest.err >&5
8853  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8854  (exit $ac_status); } && {
8855	 test -z "$ac_c_werror_flag" ||
8856	 test ! -s conftest.err
8857       } && test -s conftest$ac_exeext &&
8858       $as_test_x conftest$ac_exeext; then
8859  tcl_cv_cc_m64=yes
8860else
8861  echo "$as_me: failed program was:" >&5
8862sed 's/^/| /' conftest.$ac_ext >&5
8863
8864	tcl_cv_cc_m64=no
8865fi
8866
8867rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8868      conftest$ac_exeext conftest.$ac_ext
8869		    CFLAGS=$hold_cflags
8870fi
8871{ echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5
8872echo "${ECHO_T}$tcl_cv_cc_m64" >&6; }
8873		if test $tcl_cv_cc_m64 = yes; then
8874
8875		    CFLAGS="$CFLAGS -m64"
8876		    do64bit_ok=yes
8877
8878fi
8879
8880
8881fi
8882
8883
8884	    # The combo of gcc + glibc has a bug related to inlining of
8885	    # functions like strtod(). The -fno-builtin flag should address
8886	    # this problem but it does not work. The -fno-inline flag is kind
8887	    # of overkill but it works. Disable inlining only when one of the
8888	    # files in compat/*.c is being linked in.
8889
8890	    if test x"${USE_COMPAT}" != x; then
8891  CFLAGS="$CFLAGS -fno-inline"
8892fi
8893
8894
8895	    ;;
8896	GNU*)
8897	    SHLIB_CFLAGS="-fPIC"
8898	    SHLIB_SUFFIX=".so"
8899
8900	    SHLIB_LD='${CC} -shared'
8901	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
8902	    CC_SEARCH_FLAGS=""
8903	    LD_SEARCH_FLAGS=""
8904	    if test "`uname -m`" = "alpha"; then
8905  CFLAGS="$CFLAGS -mieee"
8906fi
8907
8908	    ;;
8909	Lynx*)
8910	    SHLIB_CFLAGS="-fPIC"
8911	    SHLIB_SUFFIX=".so"
8912	    CFLAGS_OPTIMIZE=-02
8913	    SHLIB_LD='${CC} -shared'
8914	    LD_FLAGS="-Wl,--export-dynamic"
8915	    if test $doRpath = yes; then
8916
8917		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8918		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8919fi
8920
8921	    ;;
8922	OpenBSD-*)
8923	    SHLIB_CFLAGS="-fPIC"
8924	    SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
8925	    SHLIB_SUFFIX=".so"
8926	    if test $doRpath = yes; then
8927
8928		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8929fi
8930
8931	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8932	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
8933	    { echo "$as_me:$LINENO: checking for ELF" >&5
8934echo $ECHO_N "checking for ELF... $ECHO_C" >&6; }
8935if test "${tcl_cv_ld_elf+set}" = set; then
8936  echo $ECHO_N "(cached) $ECHO_C" >&6
8937else
8938
8939		cat >conftest.$ac_ext <<_ACEOF
8940/* confdefs.h.  */
8941_ACEOF
8942cat confdefs.h >>conftest.$ac_ext
8943cat >>conftest.$ac_ext <<_ACEOF
8944/* end confdefs.h.  */
8945
8946#ifdef __ELF__
8947	yes
8948#endif
8949
8950_ACEOF
8951if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8952  $EGREP "yes" >/dev/null 2>&1; then
8953  tcl_cv_ld_elf=yes
8954else
8955  tcl_cv_ld_elf=no
8956fi
8957rm -f conftest*
8958
8959fi
8960{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5
8961echo "${ECHO_T}$tcl_cv_ld_elf" >&6; }
8962	    if test $tcl_cv_ld_elf = yes; then
8963
8964		LDFLAGS=-Wl,-export-dynamic
8965
8966else
8967  LDFLAGS=""
8968fi
8969
8970	    if test "${TCL_THREADS}" = "1"; then
8971
8972		# OpenBSD builds and links with -pthread, never -lpthread.
8973		LIBS=`echo $LIBS | sed s/-lpthread//`
8974		CFLAGS="$CFLAGS -pthread"
8975		#SHLIB_CFLAGS="$SHLIB_CFLAGS -pthread"
8976
8977fi
8978
8979	    # OpenBSD doesn't do version numbers with dots.
8980	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
8981	    TCL_LIB_VERSIONS_OK=nodots
8982	    ;;
8983	NetBSD-*|FreeBSD-[3-4].*)
8984	    # FreeBSD 3.* and greater have ELF.
8985	    # NetBSD 2.* has ELF and can use 'cc -shared' to build shared libs
8986	    SHLIB_CFLAGS="-fPIC"
8987	    SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
8988	    SHLIB_SUFFIX=".so"
8989	    LDFLAGS="$LDFLAGS -export-dynamic"
8990	    if test $doRpath = yes; then
8991
8992		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8993fi
8994
8995	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8996	    if test "${TCL_THREADS}" = "1"; then
8997
8998		# The -pthread needs to go in the CFLAGS, not LIBS
8999		LIBS=`echo $LIBS | sed s/-pthread//`
9000		CFLAGS="$CFLAGS -pthread"
9001	    	LDFLAGS="$LDFLAGS -pthread"
9002
9003fi
9004
9005	    case $system in
9006	    FreeBSD-3.*)
9007	    	# FreeBSD-3 doesn't handle version numbers with dots.
9008	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
9009	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
9010	    	TCL_LIB_VERSIONS_OK=nodots
9011		;;
9012	    esac
9013	    ;;
9014	FreeBSD-*|DragonFly-*)
9015	    # This configuration from FreeBSD Ports.
9016	    SHLIB_CFLAGS="-fPIC"
9017	    SHLIB_LD="${CC} -shared"
9018	    TCL_SHLIB_LD_EXTRAS="-soname \$@"
9019	    SHLIB_SUFFIX=".so"
9020	    LDFLAGS=""
9021	    if test $doRpath = yes; then
9022
9023		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9024		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
9025fi
9026
9027	    if test "${TCL_THREADS}" = "1"; then
9028
9029		# The -pthread needs to go in the LDFLAGS, not LIBS
9030		LIBS=`echo $LIBS | sed s/-pthread//`
9031		CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
9032		LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
9033fi
9034
9035	    # Version numbers are dot-stripped by system policy.
9036	    TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .`
9037	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
9038	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
9039	    TCL_LIB_VERSIONS_OK=nodots
9040	    ;;
9041	Darwin-*)
9042	    CFLAGS_OPTIMIZE="-Os"
9043	    SHLIB_CFLAGS="-fno-common"
9044	    # To avoid discrepancies between what headers configure sees during
9045	    # preprocessing tests and compiling tests, move any -isysroot and
9046	    # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
9047	    CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
9048		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
9049		if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`"
9050	    CFLAGS="`echo " ${CFLAGS}" | \
9051		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
9052		if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`"
9053	    if test $do64bit = yes; then
9054
9055		case `arch` in
9056		    ppc)
9057			{ echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5
9058echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6; }
9059if test "${tcl_cv_cc_arch_ppc64+set}" = set; then
9060  echo $ECHO_N "(cached) $ECHO_C" >&6
9061else
9062
9063			    hold_cflags=$CFLAGS
9064			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
9065			    cat >conftest.$ac_ext <<_ACEOF
9066/* confdefs.h.  */
9067_ACEOF
9068cat confdefs.h >>conftest.$ac_ext
9069cat >>conftest.$ac_ext <<_ACEOF
9070/* end confdefs.h.  */
9071
9072int
9073main ()
9074{
9075
9076  ;
9077  return 0;
9078}
9079_ACEOF
9080rm -f conftest.$ac_objext conftest$ac_exeext
9081if { (ac_try="$ac_link"
9082case "(($ac_try" in
9083  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9084  *) ac_try_echo=$ac_try;;
9085esac
9086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9087  (eval "$ac_link") 2>conftest.er1
9088  ac_status=$?
9089  grep -v '^ *+' conftest.er1 >conftest.err
9090  rm -f conftest.er1
9091  cat conftest.err >&5
9092  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9093  (exit $ac_status); } && {
9094	 test -z "$ac_c_werror_flag" ||
9095	 test ! -s conftest.err
9096       } && test -s conftest$ac_exeext &&
9097       $as_test_x conftest$ac_exeext; then
9098  tcl_cv_cc_arch_ppc64=yes
9099else
9100  echo "$as_me: failed program was:" >&5
9101sed 's/^/| /' conftest.$ac_ext >&5
9102
9103	tcl_cv_cc_arch_ppc64=no
9104fi
9105
9106rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9107      conftest$ac_exeext conftest.$ac_ext
9108			    CFLAGS=$hold_cflags
9109fi
9110{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5
9111echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6; }
9112			if test $tcl_cv_cc_arch_ppc64 = yes; then
9113
9114			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
9115			    do64bit_ok=yes
9116
9117fi
9118;;
9119		    i386)
9120			{ echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5
9121echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6; }
9122if test "${tcl_cv_cc_arch_x86_64+set}" = set; then
9123  echo $ECHO_N "(cached) $ECHO_C" >&6
9124else
9125
9126			    hold_cflags=$CFLAGS
9127			    CFLAGS="$CFLAGS -arch x86_64"
9128			    cat >conftest.$ac_ext <<_ACEOF
9129/* confdefs.h.  */
9130_ACEOF
9131cat confdefs.h >>conftest.$ac_ext
9132cat >>conftest.$ac_ext <<_ACEOF
9133/* end confdefs.h.  */
9134
9135int
9136main ()
9137{
9138
9139  ;
9140  return 0;
9141}
9142_ACEOF
9143rm -f conftest.$ac_objext conftest$ac_exeext
9144if { (ac_try="$ac_link"
9145case "(($ac_try" in
9146  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9147  *) ac_try_echo=$ac_try;;
9148esac
9149eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9150  (eval "$ac_link") 2>conftest.er1
9151  ac_status=$?
9152  grep -v '^ *+' conftest.er1 >conftest.err
9153  rm -f conftest.er1
9154  cat conftest.err >&5
9155  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9156  (exit $ac_status); } && {
9157	 test -z "$ac_c_werror_flag" ||
9158	 test ! -s conftest.err
9159       } && test -s conftest$ac_exeext &&
9160       $as_test_x conftest$ac_exeext; then
9161  tcl_cv_cc_arch_x86_64=yes
9162else
9163  echo "$as_me: failed program was:" >&5
9164sed 's/^/| /' conftest.$ac_ext >&5
9165
9166	tcl_cv_cc_arch_x86_64=no
9167fi
9168
9169rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9170      conftest$ac_exeext conftest.$ac_ext
9171			    CFLAGS=$hold_cflags
9172fi
9173{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5
9174echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6; }
9175			if test $tcl_cv_cc_arch_x86_64 = yes; then
9176
9177			    CFLAGS="$CFLAGS -arch x86_64"
9178			    do64bit_ok=yes
9179
9180fi
9181;;
9182		    *)
9183			{ echo "$as_me:$LINENO: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5
9184echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};;
9185		esac
9186
9187else
9188
9189		# Check for combined 32-bit and 64-bit fat build
9190		if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
9191		    && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '; then
9192
9193		    fat_32_64=yes
9194fi
9195
9196
9197fi
9198
9199	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
9200	    SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
9201	    { echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5
9202echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6; }
9203if test "${tcl_cv_ld_single_module+set}" = set; then
9204  echo $ECHO_N "(cached) $ECHO_C" >&6
9205else
9206
9207		hold_ldflags=$LDFLAGS
9208		LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
9209		cat >conftest.$ac_ext <<_ACEOF
9210/* confdefs.h.  */
9211_ACEOF
9212cat confdefs.h >>conftest.$ac_ext
9213cat >>conftest.$ac_ext <<_ACEOF
9214/* end confdefs.h.  */
9215
9216int
9217main ()
9218{
9219int i;
9220  ;
9221  return 0;
9222}
9223_ACEOF
9224rm -f conftest.$ac_objext conftest$ac_exeext
9225if { (ac_try="$ac_link"
9226case "(($ac_try" in
9227  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9228  *) ac_try_echo=$ac_try;;
9229esac
9230eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9231  (eval "$ac_link") 2>conftest.er1
9232  ac_status=$?
9233  grep -v '^ *+' conftest.er1 >conftest.err
9234  rm -f conftest.er1
9235  cat conftest.err >&5
9236  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9237  (exit $ac_status); } && {
9238	 test -z "$ac_c_werror_flag" ||
9239	 test ! -s conftest.err
9240       } && test -s conftest$ac_exeext &&
9241       $as_test_x conftest$ac_exeext; then
9242  tcl_cv_ld_single_module=yes
9243else
9244  echo "$as_me: failed program was:" >&5
9245sed 's/^/| /' conftest.$ac_ext >&5
9246
9247	tcl_cv_ld_single_module=no
9248fi
9249
9250rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9251      conftest$ac_exeext conftest.$ac_ext
9252		LDFLAGS=$hold_ldflags
9253fi
9254{ echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5
9255echo "${ECHO_T}$tcl_cv_ld_single_module" >&6; }
9256	    if test $tcl_cv_ld_single_module = yes; then
9257
9258		SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
9259
9260fi
9261
9262	    # TEA specific: link shlib with current and compatiblity version flags
9263	    vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([0-9]\{1,5\}\)\(\(\.[0-9]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d`
9264	    SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}"
9265	    SHLIB_SUFFIX=".dylib"
9266	    # Don't use -prebind when building for Mac OS X 10.4 or later only:
9267	    if test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \
9268		"`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4; then
9269
9270		LDFLAGS="$LDFLAGS -prebind"
9271fi
9272
9273	    LDFLAGS="$LDFLAGS -headerpad_max_install_names"
9274	    { echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5
9275echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6; }
9276if test "${tcl_cv_ld_search_paths_first+set}" = set; then
9277  echo $ECHO_N "(cached) $ECHO_C" >&6
9278else
9279
9280		hold_ldflags=$LDFLAGS
9281		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
9282		cat >conftest.$ac_ext <<_ACEOF
9283/* confdefs.h.  */
9284_ACEOF
9285cat confdefs.h >>conftest.$ac_ext
9286cat >>conftest.$ac_ext <<_ACEOF
9287/* end confdefs.h.  */
9288
9289int
9290main ()
9291{
9292int i;
9293  ;
9294  return 0;
9295}
9296_ACEOF
9297rm -f conftest.$ac_objext conftest$ac_exeext
9298if { (ac_try="$ac_link"
9299case "(($ac_try" in
9300  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9301  *) ac_try_echo=$ac_try;;
9302esac
9303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9304  (eval "$ac_link") 2>conftest.er1
9305  ac_status=$?
9306  grep -v '^ *+' conftest.er1 >conftest.err
9307  rm -f conftest.er1
9308  cat conftest.err >&5
9309  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9310  (exit $ac_status); } && {
9311	 test -z "$ac_c_werror_flag" ||
9312	 test ! -s conftest.err
9313       } && test -s conftest$ac_exeext &&
9314       $as_test_x conftest$ac_exeext; then
9315  tcl_cv_ld_search_paths_first=yes
9316else
9317  echo "$as_me: failed program was:" >&5
9318sed 's/^/| /' conftest.$ac_ext >&5
9319
9320	tcl_cv_ld_search_paths_first=no
9321fi
9322
9323rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9324      conftest$ac_exeext conftest.$ac_ext
9325		LDFLAGS=$hold_ldflags
9326fi
9327{ echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5
9328echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6; }
9329	    if test $tcl_cv_ld_search_paths_first = yes; then
9330
9331		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
9332
9333fi
9334
9335	    if test "$tcl_cv_cc_visibility_hidden" != yes; then
9336
9337
9338cat >>confdefs.h <<\_ACEOF
9339#define MODULE_SCOPE __private_extern__
9340_ACEOF
9341
9342		tcl_cv_cc_visibility_hidden=yes
9343
9344fi
9345
9346	    CC_SEARCH_FLAGS=""
9347	    LD_SEARCH_FLAGS=""
9348	    LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
9349	    # TEA specific: for combined 32 & 64 bit fat builds of Tk
9350	    # extensions, verify that 64-bit build is possible.
9351	    if test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"; then
9352
9353		if test "${TEA_WINDOWINGSYSTEM}" = x11; then
9354
9355		    { echo "$as_me:$LINENO: checking for 64-bit X11" >&5
9356echo $ECHO_N "checking for 64-bit X11... $ECHO_C" >&6; }
9357if test "${tcl_cv_lib_x11_64+set}" = set; then
9358  echo $ECHO_N "(cached) $ECHO_C" >&6
9359else
9360
9361			for v in CFLAGS CPPFLAGS LDFLAGS; do
9362			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
9363			done
9364			CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
9365			LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
9366			cat >conftest.$ac_ext <<_ACEOF
9367/* confdefs.h.  */
9368_ACEOF
9369cat confdefs.h >>conftest.$ac_ext
9370cat >>conftest.$ac_ext <<_ACEOF
9371/* end confdefs.h.  */
9372#include <X11/Xlib.h>
9373int
9374main ()
9375{
9376XrmInitialize();
9377  ;
9378  return 0;
9379}
9380_ACEOF
9381rm -f conftest.$ac_objext conftest$ac_exeext
9382if { (ac_try="$ac_link"
9383case "(($ac_try" in
9384  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9385  *) ac_try_echo=$ac_try;;
9386esac
9387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9388  (eval "$ac_link") 2>conftest.er1
9389  ac_status=$?
9390  grep -v '^ *+' conftest.er1 >conftest.err
9391  rm -f conftest.er1
9392  cat conftest.err >&5
9393  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9394  (exit $ac_status); } && {
9395	 test -z "$ac_c_werror_flag" ||
9396	 test ! -s conftest.err
9397       } && test -s conftest$ac_exeext &&
9398       $as_test_x conftest$ac_exeext; then
9399  tcl_cv_lib_x11_64=yes
9400else
9401  echo "$as_me: failed program was:" >&5
9402sed 's/^/| /' conftest.$ac_ext >&5
9403
9404	tcl_cv_lib_x11_64=no
9405fi
9406
9407rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9408      conftest$ac_exeext conftest.$ac_ext
9409			for v in CFLAGS CPPFLAGS LDFLAGS; do
9410			    eval $v'="$hold_'$v'"'
9411			done
9412fi
9413{ echo "$as_me:$LINENO: result: $tcl_cv_lib_x11_64" >&5
9414echo "${ECHO_T}$tcl_cv_lib_x11_64" >&6; }
9415
9416fi
9417
9418		if test "${TEA_WINDOWINGSYSTEM}" = aqua; then
9419
9420		    { echo "$as_me:$LINENO: checking for 64-bit Tk" >&5
9421echo $ECHO_N "checking for 64-bit Tk... $ECHO_C" >&6; }
9422if test "${tcl_cv_lib_tk_64+set}" = set; then
9423  echo $ECHO_N "(cached) $ECHO_C" >&6
9424else
9425
9426			for v in CFLAGS CPPFLAGS LDFLAGS; do
9427			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
9428			done
9429			CPPFLAGS="$CPPFLAGS -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 ${TCL_INCLUDES} ${TK_INCLUDES}"
9430			LDFLAGS="$LDFLAGS ${TCL_STUB_LIB_SPEC} ${TK_STUB_LIB_SPEC}"
9431			cat >conftest.$ac_ext <<_ACEOF
9432/* confdefs.h.  */
9433_ACEOF
9434cat confdefs.h >>conftest.$ac_ext
9435cat >>conftest.$ac_ext <<_ACEOF
9436/* end confdefs.h.  */
9437#include <tk.h>
9438int
9439main ()
9440{
9441Tk_InitStubs(NULL, "", 0);
9442  ;
9443  return 0;
9444}
9445_ACEOF
9446rm -f conftest.$ac_objext conftest$ac_exeext
9447if { (ac_try="$ac_link"
9448case "(($ac_try" in
9449  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9450  *) ac_try_echo=$ac_try;;
9451esac
9452eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9453  (eval "$ac_link") 2>conftest.er1
9454  ac_status=$?
9455  grep -v '^ *+' conftest.er1 >conftest.err
9456  rm -f conftest.er1
9457  cat conftest.err >&5
9458  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9459  (exit $ac_status); } && {
9460	 test -z "$ac_c_werror_flag" ||
9461	 test ! -s conftest.err
9462       } && test -s conftest$ac_exeext &&
9463       $as_test_x conftest$ac_exeext; then
9464  tcl_cv_lib_tk_64=yes
9465else
9466  echo "$as_me: failed program was:" >&5
9467sed 's/^/| /' conftest.$ac_ext >&5
9468
9469	tcl_cv_lib_tk_64=no
9470fi
9471
9472rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9473      conftest$ac_exeext conftest.$ac_ext
9474			for v in CFLAGS CPPFLAGS LDFLAGS; do
9475			    eval $v'="$hold_'$v'"'
9476			done
9477fi
9478{ echo "$as_me:$LINENO: result: $tcl_cv_lib_tk_64" >&5
9479echo "${ECHO_T}$tcl_cv_lib_tk_64" >&6; }
9480
9481fi
9482
9483		# remove 64-bit arch flags from CFLAGS et al. if configuration
9484		# does not support 64-bit.
9485		if test "$tcl_cv_lib_tk_64" = no -o "$tcl_cv_lib_x11_64" = no; then
9486
9487		    { echo "$as_me:$LINENO: Removing 64-bit architectures from compiler & linker flags" >&5
9488echo "$as_me: Removing 64-bit architectures from compiler & linker flags" >&6;}
9489		    for v in CFLAGS CPPFLAGS LDFLAGS; do
9490			eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
9491		    done
9492fi
9493
9494
9495fi
9496
9497	    ;;
9498	OS/390-*)
9499	    CFLAGS_OPTIMIZE=""		# Optimizer is buggy
9500
9501cat >>confdefs.h <<\_ACEOF
9502#define _OE_SOCKETS 1
9503_ACEOF
9504
9505	    ;;
9506	OSF1-V*)
9507	    # Digital OSF/1
9508	    SHLIB_CFLAGS=""
9509	    if test "$SHARED_BUILD" = 1; then
9510
9511	        SHLIB_LD='ld -shared -expect_unresolved "*"'
9512
9513else
9514
9515	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
9516
9517fi
9518
9519	    SHLIB_SUFFIX=".so"
9520	    if test $doRpath = yes; then
9521
9522		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9523		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
9524fi
9525
9526	    if test "$GCC" = yes; then
9527  CFLAGS="$CFLAGS -mieee"
9528else
9529
9530		CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
9531fi
9532
9533	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
9534	    if test "${TCL_THREADS}" = 1; then
9535
9536		CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
9537		CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
9538		LIBS=`echo $LIBS | sed s/-lpthreads//`
9539		if test "$GCC" = yes; then
9540
9541		    LIBS="$LIBS -lpthread -lmach -lexc"
9542
9543else
9544
9545		    CFLAGS="$CFLAGS -pthread"
9546		    LDFLAGS="$LDFLAGS -pthread"
9547
9548fi
9549
9550
9551fi
9552
9553	    ;;
9554	QNX-6*)
9555	    # QNX RTP
9556	    # This may work for all QNX, but it was only reported for v6.
9557	    SHLIB_CFLAGS="-fPIC"
9558	    SHLIB_LD="ld -Bshareable -x"
9559	    SHLIB_LD_LIBS=""
9560	    SHLIB_SUFFIX=".so"
9561	    CC_SEARCH_FLAGS=""
9562	    LD_SEARCH_FLAGS=""
9563	    ;;
9564	SCO_SV-3.2*)
9565	    if test "$GCC" = yes; then
9566
9567		SHLIB_CFLAGS="-fPIC -melf"
9568		LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
9569
9570else
9571
9572	       SHLIB_CFLAGS="-Kpic -belf"
9573	       LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
9574
9575fi
9576
9577	    SHLIB_LD="ld -G"
9578	    SHLIB_LD_LIBS=""
9579	    SHLIB_SUFFIX=".so"
9580	    CC_SEARCH_FLAGS=""
9581	    LD_SEARCH_FLAGS=""
9582	    ;;
9583	SunOS-5.[0-6])
9584	    # Careful to not let 5.10+ fall into this case
9585
9586	    # Note: If _REENTRANT isn't defined, then Solaris
9587	    # won't define thread-safe library routines.
9588
9589
9590cat >>confdefs.h <<\_ACEOF
9591#define _REENTRANT 1
9592_ACEOF
9593
9594
9595cat >>confdefs.h <<\_ACEOF
9596#define _POSIX_PTHREAD_SEMANTICS 1
9597_ACEOF
9598
9599
9600	    SHLIB_CFLAGS="-KPIC"
9601	    SHLIB_SUFFIX=".so"
9602	    if test "$GCC" = yes; then
9603
9604		SHLIB_LD='${CC} -shared'
9605		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
9606		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9607
9608else
9609
9610		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
9611		CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
9612		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9613
9614fi
9615
9616	    ;;
9617	SunOS-5*)
9618	    # Note: If _REENTRANT isn't defined, then Solaris
9619	    # won't define thread-safe library routines.
9620
9621
9622cat >>confdefs.h <<\_ACEOF
9623#define _REENTRANT 1
9624_ACEOF
9625
9626
9627cat >>confdefs.h <<\_ACEOF
9628#define _POSIX_PTHREAD_SEMANTICS 1
9629_ACEOF
9630
9631
9632	    SHLIB_CFLAGS="-KPIC"
9633
9634	    # Check to enable 64-bit flags for compiler/linker
9635	    if test "$do64bit" = yes; then
9636
9637		arch=`isainfo`
9638		if test "$arch" = "sparcv9 sparc"; then
9639
9640		    if test "$GCC" = yes; then
9641
9642			if test "`${CC} -dumpversion | awk -F. '{print $1}'`" -lt 3; then
9643
9644			    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5
9645echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;}
9646
9647else
9648
9649			    do64bit_ok=yes
9650			    CFLAGS="$CFLAGS -m64 -mcpu=v9"
9651			    LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
9652			    SHLIB_CFLAGS="-fPIC"
9653
9654fi
9655
9656
9657else
9658
9659			do64bit_ok=yes
9660			if test "$do64bitVIS" = yes; then
9661
9662			    CFLAGS="$CFLAGS -xarch=v9a"
9663			    LDFLAGS_ARCH="-xarch=v9a"
9664
9665else
9666
9667			    CFLAGS="$CFLAGS -xarch=v9"
9668			    LDFLAGS_ARCH="-xarch=v9"
9669
9670fi
9671
9672			# Solaris 64 uses this as well
9673			#LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
9674
9675fi
9676
9677
9678else
9679  if test "$arch" = "amd64 i386"; then
9680
9681		    if test "$GCC" = yes; then
9682
9683			case $system in
9684			    SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
9685				do64bit_ok=yes
9686				CFLAGS="$CFLAGS -m64"
9687				LDFLAGS="$LDFLAGS -m64";;
9688			    *)
9689				{ echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
9690echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;};;
9691			esac
9692
9693else
9694
9695			do64bit_ok=yes
9696			case $system in
9697			    SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
9698				CFLAGS="$CFLAGS -m64"
9699				LDFLAGS="$LDFLAGS -m64";;
9700			    *)
9701				CFLAGS="$CFLAGS -xarch=amd64"
9702				LDFLAGS="$LDFLAGS -xarch=amd64";;
9703			esac
9704
9705fi
9706
9707
9708else
9709  { echo "$as_me:$LINENO: WARNING: 64bit mode not supported for $arch" >&5
9710echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;}
9711fi
9712
9713fi
9714
9715
9716fi
9717
9718
9719	    SHLIB_SUFFIX=".so"
9720	    if test "$GCC" = yes; then
9721
9722		SHLIB_LD='${CC} -shared'
9723		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
9724		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9725		if test "$do64bit_ok" = yes; then
9726
9727		    if test "$arch" = "sparcv9 sparc"; then
9728
9729			# We need to specify -static-libgcc or we need to
9730			# add the path to the sparv9 libgcc.
9731			# JH: static-libgcc is necessary for core Tcl, but may
9732			# not be necessary for extensions.
9733			SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
9734			# for finding sparcv9 libgcc, get the regular libgcc
9735			# path, remove so name and append 'sparcv9'
9736			#v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
9737			#CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
9738
9739else
9740  if test "$arch" = "amd64 i386"; then
9741
9742			# JH: static-libgcc is necessary for core Tcl, but may
9743			# not be necessary for extensions.
9744			SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
9745
9746fi
9747
9748fi
9749
9750
9751fi
9752
9753
9754else
9755
9756		case $system in
9757		    SunOS-5.[1-9][0-9]*)
9758			# TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
9759			SHLIB_LD='${CC} -G -z text ${LDFLAGS_DEFAULT}';;
9760		    *)
9761			SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
9762		esac
9763		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
9764		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
9765
9766fi
9767
9768	    ;;
9769    esac
9770
9771    if test "$do64bit" = yes -a "$do64bit_ok" = no; then
9772
9773	{ echo "$as_me:$LINENO: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5
9774echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;}
9775
9776fi
9777
9778
9779
9780
9781    # Add in the arch flags late to ensure it wasn't removed.
9782    # Not necessary in TEA, but this is aligned with core
9783    LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
9784
9785    # If we're running gcc, then change the C flags for compiling shared
9786    # libraries to the right flags for gcc, instead of those for the
9787    # standard manufacturer compiler.
9788
9789    if test "$GCC" = yes; then
9790
9791	case $system in
9792	    AIX-*) ;;
9793	    BSD/OS*) ;;
9794	    CYGWIN_*) ;;
9795	    IRIX*) ;;
9796	    NetBSD-*|FreeBSD-*|DragonFly-*|OpenBSD-*) ;;
9797	    Darwin-*) ;;
9798	    SCO_SV-3.2*) ;;
9799	    windows) ;;
9800	    *) SHLIB_CFLAGS="-fPIC" ;;
9801	esac
9802fi
9803
9804
9805    if test "$tcl_cv_cc_visibility_hidden" != yes; then
9806
9807
9808cat >>confdefs.h <<\_ACEOF
9809#define MODULE_SCOPE extern
9810_ACEOF
9811
9812
9813cat >>confdefs.h <<\_ACEOF
9814#define NO_VIZ
9815_ACEOF
9816
9817
9818fi
9819
9820
9821    if test "$SHARED_LIB_SUFFIX" = ""; then
9822
9823	# TEA specific: use PACKAGE_VERSION instead of VERSION
9824	SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'
9825fi
9826
9827    if test "$UNSHARED_LIB_SUFFIX" = ""; then
9828
9829	# TEA specific: use PACKAGE_VERSION instead of VERSION
9830	UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
9831fi
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846    # These must be called after we do the basic CFLAGS checks and
9847    # verify any possible 64-bit or similar switches are necessary
9848
9849    { echo "$as_me:$LINENO: checking for required early compiler flags" >&5
9850echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6; }
9851    tcl_flags=""
9852
9853    if test "${tcl_cv_flag__isoc99_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 <stdlib.h>
9863int
9864main ()
9865{
9866char *p = (char *)strtoll; char *q = (char *)strtoull;
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__isoc99_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 _ISOC99_SOURCE 1
9900#include <stdlib.h>
9901int
9902main ()
9903{
9904char *p = (char *)strtoll; char *q = (char *)strtoull;
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__isoc99_source=yes
9927else
9928  echo "$as_me: failed program was:" >&5
9929sed 's/^/| /' conftest.$ac_ext >&5
9930
9931	tcl_cv_flag__isoc99_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__isoc99_source}" = "xyes" ; then
9941
9942cat >>confdefs.h <<\_ACEOF
9943#define _ISOC99_SOURCE 1
9944_ACEOF
9945
9946	tcl_flags="$tcl_flags _ISOC99_SOURCE"
9947    fi
9948
9949
9950    if test "${tcl_cv_flag__largefile64_source+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{
9963struct stat64 buf; int i = stat64("/", &buf);
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__largefile64_source=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 _LARGEFILE64_SOURCE 1
9997#include <sys/stat.h>
9998int
9999main ()
10000{
10001struct stat64 buf; int i = stat64("/", &buf);
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__largefile64_source=yes
10024else
10025  echo "$as_me: failed program was:" >&5
10026sed 's/^/| /' conftest.$ac_ext >&5
10027
10028	tcl_cv_flag__largefile64_source=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__largefile64_source}" = "xyes" ; then
10038
10039cat >>confdefs.h <<\_ACEOF
10040#define _LARGEFILE64_SOURCE 1
10041_ACEOF
10042
10043	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
10044    fi
10045
10046
10047    if test "${tcl_cv_flag__largefile_source64+set}" = set; then
10048  echo $ECHO_N "(cached) $ECHO_C" >&6
10049else
10050  cat >conftest.$ac_ext <<_ACEOF
10051/* confdefs.h.  */
10052_ACEOF
10053cat confdefs.h >>conftest.$ac_ext
10054cat >>conftest.$ac_ext <<_ACEOF
10055/* end confdefs.h.  */
10056#include <sys/stat.h>
10057int
10058main ()
10059{
10060char *p = (char *)open64;
10061  ;
10062  return 0;
10063}
10064_ACEOF
10065rm -f conftest.$ac_objext
10066if { (ac_try="$ac_compile"
10067case "(($ac_try" in
10068  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10069  *) ac_try_echo=$ac_try;;
10070esac
10071eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10072  (eval "$ac_compile") 2>conftest.er1
10073  ac_status=$?
10074  grep -v '^ *+' conftest.er1 >conftest.err
10075  rm -f conftest.er1
10076  cat conftest.err >&5
10077  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10078  (exit $ac_status); } && {
10079	 test -z "$ac_c_werror_flag" ||
10080	 test ! -s conftest.err
10081       } && test -s conftest.$ac_objext; then
10082  tcl_cv_flag__largefile_source64=no
10083else
10084  echo "$as_me: failed program was:" >&5
10085sed 's/^/| /' conftest.$ac_ext >&5
10086
10087	cat >conftest.$ac_ext <<_ACEOF
10088/* confdefs.h.  */
10089_ACEOF
10090cat confdefs.h >>conftest.$ac_ext
10091cat >>conftest.$ac_ext <<_ACEOF
10092/* end confdefs.h.  */
10093#define _LARGEFILE_SOURCE64 1
10094#include <sys/stat.h>
10095int
10096main ()
10097{
10098char *p = (char *)open64;
10099  ;
10100  return 0;
10101}
10102_ACEOF
10103rm -f conftest.$ac_objext
10104if { (ac_try="$ac_compile"
10105case "(($ac_try" in
10106  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10107  *) ac_try_echo=$ac_try;;
10108esac
10109eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10110  (eval "$ac_compile") 2>conftest.er1
10111  ac_status=$?
10112  grep -v '^ *+' conftest.er1 >conftest.err
10113  rm -f conftest.er1
10114  cat conftest.err >&5
10115  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10116  (exit $ac_status); } && {
10117	 test -z "$ac_c_werror_flag" ||
10118	 test ! -s conftest.err
10119       } && test -s conftest.$ac_objext; then
10120  tcl_cv_flag__largefile_source64=yes
10121else
10122  echo "$as_me: failed program was:" >&5
10123sed 's/^/| /' conftest.$ac_ext >&5
10124
10125	tcl_cv_flag__largefile_source64=no
10126fi
10127
10128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10129fi
10130
10131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10132fi
10133
10134    if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then
10135
10136cat >>confdefs.h <<\_ACEOF
10137#define _LARGEFILE_SOURCE64 1
10138_ACEOF
10139
10140	tcl_flags="$tcl_flags _LARGEFILE_SOURCE64"
10141    fi
10142
10143    if test "x${tcl_flags}" = "x" ; then
10144	{ echo "$as_me:$LINENO: result: none" >&5
10145echo "${ECHO_T}none" >&6; }
10146    else
10147	{ echo "$as_me:$LINENO: result: ${tcl_flags}" >&5
10148echo "${ECHO_T}${tcl_flags}" >&6; }
10149    fi
10150
10151
10152    { echo "$as_me:$LINENO: checking for 64-bit integer type" >&5
10153echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6; }
10154    if test "${tcl_cv_type_64bit+set}" = set; then
10155  echo $ECHO_N "(cached) $ECHO_C" >&6
10156else
10157
10158	tcl_cv_type_64bit=none
10159	# See if the compiler knows natively about __int64
10160	cat >conftest.$ac_ext <<_ACEOF
10161/* confdefs.h.  */
10162_ACEOF
10163cat confdefs.h >>conftest.$ac_ext
10164cat >>conftest.$ac_ext <<_ACEOF
10165/* end confdefs.h.  */
10166
10167int
10168main ()
10169{
10170__int64 value = (__int64) 0;
10171  ;
10172  return 0;
10173}
10174_ACEOF
10175rm -f conftest.$ac_objext
10176if { (ac_try="$ac_compile"
10177case "(($ac_try" in
10178  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10179  *) ac_try_echo=$ac_try;;
10180esac
10181eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10182  (eval "$ac_compile") 2>conftest.er1
10183  ac_status=$?
10184  grep -v '^ *+' conftest.er1 >conftest.err
10185  rm -f conftest.er1
10186  cat conftest.err >&5
10187  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10188  (exit $ac_status); } && {
10189	 test -z "$ac_c_werror_flag" ||
10190	 test ! -s conftest.err
10191       } && test -s conftest.$ac_objext; then
10192  tcl_type_64bit=__int64
10193else
10194  echo "$as_me: failed program was:" >&5
10195sed 's/^/| /' conftest.$ac_ext >&5
10196
10197	tcl_type_64bit="long long"
10198fi
10199
10200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10201	# See if we should use long anyway  Note that we substitute in the
10202	# type that is our current guess for a 64-bit type inside this check
10203	# program, so it should be modified only carefully...
10204        cat >conftest.$ac_ext <<_ACEOF
10205/* confdefs.h.  */
10206_ACEOF
10207cat confdefs.h >>conftest.$ac_ext
10208cat >>conftest.$ac_ext <<_ACEOF
10209/* end confdefs.h.  */
10210
10211int
10212main ()
10213{
10214switch (0) {
10215            case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
10216        }
10217  ;
10218  return 0;
10219}
10220_ACEOF
10221rm -f conftest.$ac_objext
10222if { (ac_try="$ac_compile"
10223case "(($ac_try" in
10224  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10225  *) ac_try_echo=$ac_try;;
10226esac
10227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10228  (eval "$ac_compile") 2>conftest.er1
10229  ac_status=$?
10230  grep -v '^ *+' conftest.er1 >conftest.err
10231  rm -f conftest.er1
10232  cat conftest.err >&5
10233  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10234  (exit $ac_status); } && {
10235	 test -z "$ac_c_werror_flag" ||
10236	 test ! -s conftest.err
10237       } && test -s conftest.$ac_objext; then
10238  tcl_cv_type_64bit=${tcl_type_64bit}
10239else
10240  echo "$as_me: failed program was:" >&5
10241sed 's/^/| /' conftest.$ac_ext >&5
10242
10243
10244fi
10245
10246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10247fi
10248
10249    if test "${tcl_cv_type_64bit}" = none ; then
10250
10251cat >>confdefs.h <<\_ACEOF
10252#define TCL_WIDE_INT_IS_LONG 1
10253_ACEOF
10254
10255	{ echo "$as_me:$LINENO: result: using long" >&5
10256echo "${ECHO_T}using long" >&6; }
10257    elif test "${tcl_cv_type_64bit}" = "__int64" \
10258		-a "${TEA_PLATFORM}" = "windows" ; then
10259	# TEA specific: We actually want to use the default tcl.h checks in
10260	# this case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER*
10261	{ echo "$as_me:$LINENO: result: using Tcl header defaults" >&5
10262echo "${ECHO_T}using Tcl header defaults" >&6; }
10263    else
10264
10265cat >>confdefs.h <<_ACEOF
10266#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
10267_ACEOF
10268
10269	{ echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5
10270echo "${ECHO_T}${tcl_cv_type_64bit}" >&6; }
10271
10272	# Now check for auxiliary declarations
10273	{ echo "$as_me:$LINENO: checking for struct dirent64" >&5
10274echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6; }
10275if test "${tcl_cv_struct_dirent64+set}" = set; then
10276  echo $ECHO_N "(cached) $ECHO_C" >&6
10277else
10278
10279	    cat >conftest.$ac_ext <<_ACEOF
10280/* confdefs.h.  */
10281_ACEOF
10282cat confdefs.h >>conftest.$ac_ext
10283cat >>conftest.$ac_ext <<_ACEOF
10284/* end confdefs.h.  */
10285#include <sys/types.h>
10286#include <sys/dirent.h>
10287int
10288main ()
10289{
10290struct dirent64 p;
10291  ;
10292  return 0;
10293}
10294_ACEOF
10295rm -f conftest.$ac_objext
10296if { (ac_try="$ac_compile"
10297case "(($ac_try" in
10298  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10299  *) ac_try_echo=$ac_try;;
10300esac
10301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10302  (eval "$ac_compile") 2>conftest.er1
10303  ac_status=$?
10304  grep -v '^ *+' conftest.er1 >conftest.err
10305  rm -f conftest.er1
10306  cat conftest.err >&5
10307  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10308  (exit $ac_status); } && {
10309	 test -z "$ac_c_werror_flag" ||
10310	 test ! -s conftest.err
10311       } && test -s conftest.$ac_objext; then
10312  tcl_cv_struct_dirent64=yes
10313else
10314  echo "$as_me: failed program was:" >&5
10315sed 's/^/| /' conftest.$ac_ext >&5
10316
10317	tcl_cv_struct_dirent64=no
10318fi
10319
10320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10321fi
10322{ echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5
10323echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6; }
10324	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
10325
10326cat >>confdefs.h <<\_ACEOF
10327#define HAVE_STRUCT_DIRENT64 1
10328_ACEOF
10329
10330	fi
10331
10332	{ echo "$as_me:$LINENO: checking for struct stat64" >&5
10333echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6; }
10334if test "${tcl_cv_struct_stat64+set}" = set; then
10335  echo $ECHO_N "(cached) $ECHO_C" >&6
10336else
10337
10338	    cat >conftest.$ac_ext <<_ACEOF
10339/* confdefs.h.  */
10340_ACEOF
10341cat confdefs.h >>conftest.$ac_ext
10342cat >>conftest.$ac_ext <<_ACEOF
10343/* end confdefs.h.  */
10344#include <sys/stat.h>
10345int
10346main ()
10347{
10348struct stat64 p;
10349
10350  ;
10351  return 0;
10352}
10353_ACEOF
10354rm -f conftest.$ac_objext
10355if { (ac_try="$ac_compile"
10356case "(($ac_try" in
10357  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10358  *) ac_try_echo=$ac_try;;
10359esac
10360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10361  (eval "$ac_compile") 2>conftest.er1
10362  ac_status=$?
10363  grep -v '^ *+' conftest.er1 >conftest.err
10364  rm -f conftest.er1
10365  cat conftest.err >&5
10366  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10367  (exit $ac_status); } && {
10368	 test -z "$ac_c_werror_flag" ||
10369	 test ! -s conftest.err
10370       } && test -s conftest.$ac_objext; then
10371  tcl_cv_struct_stat64=yes
10372else
10373  echo "$as_me: failed program was:" >&5
10374sed 's/^/| /' conftest.$ac_ext >&5
10375
10376	tcl_cv_struct_stat64=no
10377fi
10378
10379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10380fi
10381{ echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5
10382echo "${ECHO_T}$tcl_cv_struct_stat64" >&6; }
10383	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
10384
10385cat >>confdefs.h <<\_ACEOF
10386#define HAVE_STRUCT_STAT64 1
10387_ACEOF
10388
10389	fi
10390
10391
10392
10393for ac_func in open64 lseek64
10394do
10395as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10396{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10397echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10398if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
10399  echo $ECHO_N "(cached) $ECHO_C" >&6
10400else
10401  cat >conftest.$ac_ext <<_ACEOF
10402/* confdefs.h.  */
10403_ACEOF
10404cat confdefs.h >>conftest.$ac_ext
10405cat >>conftest.$ac_ext <<_ACEOF
10406/* end confdefs.h.  */
10407/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10408   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10409#define $ac_func innocuous_$ac_func
10410
10411/* System header to define __stub macros and hopefully few prototypes,
10412    which can conflict with char $ac_func (); below.
10413    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10414    <limits.h> exists even on freestanding compilers.  */
10415
10416#ifdef __STDC__
10417# include <limits.h>
10418#else
10419# include <assert.h>
10420#endif
10421
10422#undef $ac_func
10423
10424/* Override any GCC internal prototype to avoid an error.
10425   Use char because int might match the return type of a GCC
10426   builtin and then its argument prototype would still apply.  */
10427#ifdef __cplusplus
10428extern "C"
10429#endif
10430char $ac_func ();
10431/* The GNU C library defines this for functions which it implements
10432    to always fail with ENOSYS.  Some functions are actually named
10433    something starting with __ and the normal name is an alias.  */
10434#if defined __stub_$ac_func || defined __stub___$ac_func
10435choke me
10436#endif
10437
10438int
10439main ()
10440{
10441return $ac_func ();
10442  ;
10443  return 0;
10444}
10445_ACEOF
10446rm -f conftest.$ac_objext conftest$ac_exeext
10447if { (ac_try="$ac_link"
10448case "(($ac_try" in
10449  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10450  *) ac_try_echo=$ac_try;;
10451esac
10452eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10453  (eval "$ac_link") 2>conftest.er1
10454  ac_status=$?
10455  grep -v '^ *+' conftest.er1 >conftest.err
10456  rm -f conftest.er1
10457  cat conftest.err >&5
10458  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10459  (exit $ac_status); } && {
10460	 test -z "$ac_c_werror_flag" ||
10461	 test ! -s conftest.err
10462       } && test -s conftest$ac_exeext &&
10463       $as_test_x conftest$ac_exeext; then
10464  eval "$as_ac_var=yes"
10465else
10466  echo "$as_me: failed program was:" >&5
10467sed 's/^/| /' conftest.$ac_ext >&5
10468
10469	eval "$as_ac_var=no"
10470fi
10471
10472rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10473      conftest$ac_exeext conftest.$ac_ext
10474fi
10475ac_res=`eval echo '${'$as_ac_var'}'`
10476	       { echo "$as_me:$LINENO: result: $ac_res" >&5
10477echo "${ECHO_T}$ac_res" >&6; }
10478if test `eval echo '${'$as_ac_var'}'` = yes; then
10479  cat >>confdefs.h <<_ACEOF
10480#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10481_ACEOF
10482
10483fi
10484done
10485
10486	{ echo "$as_me:$LINENO: checking for off64_t" >&5
10487echo $ECHO_N "checking for off64_t... $ECHO_C" >&6; }
10488	if test "${tcl_cv_type_off64_t+set}" = set; then
10489  echo $ECHO_N "(cached) $ECHO_C" >&6
10490else
10491
10492	    cat >conftest.$ac_ext <<_ACEOF
10493/* confdefs.h.  */
10494_ACEOF
10495cat confdefs.h >>conftest.$ac_ext
10496cat >>conftest.$ac_ext <<_ACEOF
10497/* end confdefs.h.  */
10498#include <sys/types.h>
10499int
10500main ()
10501{
10502off64_t offset;
10503
10504  ;
10505  return 0;
10506}
10507_ACEOF
10508rm -f conftest.$ac_objext
10509if { (ac_try="$ac_compile"
10510case "(($ac_try" in
10511  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10512  *) ac_try_echo=$ac_try;;
10513esac
10514eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10515  (eval "$ac_compile") 2>conftest.er1
10516  ac_status=$?
10517  grep -v '^ *+' conftest.er1 >conftest.err
10518  rm -f conftest.er1
10519  cat conftest.err >&5
10520  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10521  (exit $ac_status); } && {
10522	 test -z "$ac_c_werror_flag" ||
10523	 test ! -s conftest.err
10524       } && test -s conftest.$ac_objext; then
10525  tcl_cv_type_off64_t=yes
10526else
10527  echo "$as_me: failed program was:" >&5
10528sed 's/^/| /' conftest.$ac_ext >&5
10529
10530	tcl_cv_type_off64_t=no
10531fi
10532
10533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10534fi
10535
10536			if test "x${tcl_cv_type_off64_t}" = "xyes" && \
10537	        test "x${ac_cv_func_lseek64}" = "xyes" && \
10538	        test "x${ac_cv_func_open64}" = "xyes" ; then
10539
10540cat >>confdefs.h <<\_ACEOF
10541#define HAVE_TYPE_OFF64_T 1
10542_ACEOF
10543
10544	    { echo "$as_me:$LINENO: result: yes" >&5
10545echo "${ECHO_T}yes" >&6; }
10546	else
10547	    { echo "$as_me:$LINENO: result: no" >&5
10548echo "${ECHO_T}no" >&6; }
10549	fi
10550    fi
10551
10552
10553
10554# Needed for the chantest library.
10555
10556
10557#--------------------------------------------------------------------
10558# Set the default compiler switches based on the --enable-symbols option.
10559#--------------------------------------------------------------------
10560
10561
10562
10563    { echo "$as_me:$LINENO: checking for build with symbols" >&5
10564echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6; }
10565    # Check whether --enable-symbols was given.
10566if test "${enable_symbols+set}" = set; then
10567  enableval=$enable_symbols; tcl_ok=$enableval
10568else
10569  tcl_ok=no
10570fi
10571
10572    DBGX=""
10573    if test "$tcl_ok" = "no"; then
10574	CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}"
10575	LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
10576	{ echo "$as_me:$LINENO: result: no" >&5
10577echo "${ECHO_T}no" >&6; }
10578    else
10579	CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
10580	LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
10581	if test "$tcl_ok" = "yes"; then
10582	    { echo "$as_me:$LINENO: result: yes (standard debugging)" >&5
10583echo "${ECHO_T}yes (standard debugging)" >&6; }
10584	fi
10585    fi
10586    # TEA specific:
10587    if test "${TEA_PLATFORM}" != "windows" ; then
10588	LDFLAGS_DEFAULT="${LDFLAGS}"
10589    fi
10590
10591
10592
10593
10594    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
10595
10596cat >>confdefs.h <<\_ACEOF
10597#define TCL_MEM_DEBUG 1
10598_ACEOF
10599
10600    fi
10601
10602    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
10603	if test "$tcl_ok" = "all"; then
10604	    { echo "$as_me:$LINENO: result: enabled symbols mem debugging" >&5
10605echo "${ECHO_T}enabled symbols mem debugging" >&6; }
10606	else
10607	    { echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5
10608echo "${ECHO_T}enabled $tcl_ok debugging" >&6; }
10609	fi
10610    fi
10611
10612
10613#--------------------------------------------------------------------
10614# Everyone should be linking against the Tcl stub library.  If you
10615# can't for some reason, remove this definition.  If you aren't using
10616# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
10617# link against the non-stubbed Tcl library.
10618#--------------------------------------------------------------------
10619
10620cat >>confdefs.h <<\_ACEOF
10621#define USE_TCL_STUBS 1
10622_ACEOF
10623
10624
10625#--------------------------------------------------------------------
10626# If ltoa is present, use it to convert integer values into strings.
10627# If not, sprintf is used, which is slower and requires more code.
10628#--------------------------------------------------------------------
10629
10630
10631for ac_func in ltoa
10632do
10633as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10634{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10635echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10636if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
10637  echo $ECHO_N "(cached) $ECHO_C" >&6
10638else
10639  cat >conftest.$ac_ext <<_ACEOF
10640/* confdefs.h.  */
10641_ACEOF
10642cat confdefs.h >>conftest.$ac_ext
10643cat >>conftest.$ac_ext <<_ACEOF
10644/* end confdefs.h.  */
10645/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10646   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10647#define $ac_func innocuous_$ac_func
10648
10649/* System header to define __stub macros and hopefully few prototypes,
10650    which can conflict with char $ac_func (); below.
10651    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10652    <limits.h> exists even on freestanding compilers.  */
10653
10654#ifdef __STDC__
10655# include <limits.h>
10656#else
10657# include <assert.h>
10658#endif
10659
10660#undef $ac_func
10661
10662/* Override any GCC internal prototype to avoid an error.
10663   Use char because int might match the return type of a GCC
10664   builtin and then its argument prototype would still apply.  */
10665#ifdef __cplusplus
10666extern "C"
10667#endif
10668char $ac_func ();
10669/* The GNU C library defines this for functions which it implements
10670    to always fail with ENOSYS.  Some functions are actually named
10671    something starting with __ and the normal name is an alias.  */
10672#if defined __stub_$ac_func || defined __stub___$ac_func
10673choke me
10674#endif
10675
10676int
10677main ()
10678{
10679return $ac_func ();
10680  ;
10681  return 0;
10682}
10683_ACEOF
10684rm -f conftest.$ac_objext conftest$ac_exeext
10685if { (ac_try="$ac_link"
10686case "(($ac_try" in
10687  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10688  *) ac_try_echo=$ac_try;;
10689esac
10690eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10691  (eval "$ac_link") 2>conftest.er1
10692  ac_status=$?
10693  grep -v '^ *+' conftest.er1 >conftest.err
10694  rm -f conftest.er1
10695  cat conftest.err >&5
10696  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10697  (exit $ac_status); } && {
10698	 test -z "$ac_c_werror_flag" ||
10699	 test ! -s conftest.err
10700       } && test -s conftest$ac_exeext &&
10701       $as_test_x conftest$ac_exeext; then
10702  eval "$as_ac_var=yes"
10703else
10704  echo "$as_me: failed program was:" >&5
10705sed 's/^/| /' conftest.$ac_ext >&5
10706
10707	eval "$as_ac_var=no"
10708fi
10709
10710rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10711      conftest$ac_exeext conftest.$ac_ext
10712fi
10713ac_res=`eval echo '${'$as_ac_var'}'`
10714	       { echo "$as_me:$LINENO: result: $ac_res" >&5
10715echo "${ECHO_T}$ac_res" >&6; }
10716if test `eval echo '${'$as_ac_var'}'` = yes; then
10717  cat >>confdefs.h <<_ACEOF
10718#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10719_ACEOF
10720
10721fi
10722done
10723
10724
10725#--------------------------------------------------------------------
10726# This macro generates a line to use when building a library.  It
10727# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
10728# and TEA_LOAD_TCLCONFIG macros above.
10729#--------------------------------------------------------------------
10730
10731
10732    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
10733	MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(PKG_OBJECTS)"
10734	MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\$@ \$(PKG_OBJECTS)"
10735	cat >conftest.$ac_ext <<_ACEOF
10736/* confdefs.h.  */
10737_ACEOF
10738cat confdefs.h >>conftest.$ac_ext
10739cat >>conftest.$ac_ext <<_ACEOF
10740/* end confdefs.h.  */
10741
10742#if defined(_MSC_VER) && _MSC_VER >= 1400
10743print("manifest needed")
10744#endif
10745
10746_ACEOF
10747if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10748  $EGREP "manifest needed" >/dev/null 2>&1; then
10749
10750	# Could do a CHECK_PROG for mt, but should always be with MSVC8+
10751	VC_MANIFEST_EMBED_DLL="if test -f \$@.manifest ; then mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;2 ; fi"
10752	VC_MANIFEST_EMBED_EXE="if test -f \$@.manifest ; then mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;1 ; fi"
10753	MAKE_SHARED_LIB="${MAKE_SHARED_LIB} ; ${VC_MANIFEST_EMBED_DLL}"
10754
10755    CLEANFILES="$CLEANFILES *.manifest"
10756
10757
10758fi
10759rm -f conftest*
10760
10761	MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(PKG_STUB_OBJECTS)"
10762    else
10763	MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(PKG_OBJECTS)"
10764	MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
10765	MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(PKG_STUB_OBJECTS)"
10766    fi
10767
10768    if test "${SHARED_BUILD}" = "1" ; then
10769	MAKE_LIB="${MAKE_SHARED_LIB} "
10770    else
10771	MAKE_LIB="${MAKE_STATIC_LIB} "
10772    fi
10773
10774    #--------------------------------------------------------------------
10775    # Shared libraries and static libraries have different names.
10776    # Use the double eval to make sure any variables in the suffix is
10777    # substituted. (@@@ Might not be necessary anymore)
10778    #--------------------------------------------------------------------
10779
10780    if test "${TEA_PLATFORM}" = "windows" ; then
10781	if test "${SHARED_BUILD}" = "1" ; then
10782	    # We force the unresolved linking of symbols that are really in
10783	    # the private libraries of Tcl and Tk.
10784	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
10785	    if test x"${TK_BIN_DIR}" != x ; then
10786		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
10787	    fi
10788	    eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
10789	else
10790	    eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
10791	fi
10792	# Some packages build their own stubs libraries
10793	eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
10794	if test "$GCC" = "yes"; then
10795	    PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
10796	fi
10797	# These aren't needed on Windows (either MSVC or gcc)
10798	RANLIB=:
10799	RANLIB_STUB=:
10800    else
10801	RANLIB_STUB="${RANLIB}"
10802	if test "${SHARED_BUILD}" = "1" ; then
10803	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
10804	    if test x"${TK_BIN_DIR}" != x ; then
10805		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
10806	    fi
10807	    eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
10808	    RANLIB=:
10809	else
10810	    eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
10811	fi
10812	# Some packages build their own stubs libraries
10813	eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
10814    fi
10815
10816    # These are escaped so that only CFLAGS is picked up at configure time.
10817    # The other values will be substituted at make time.
10818    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
10819    if test "${SHARED_BUILD}" = "1" ; then
10820	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
10821    fi
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832#--------------------------------------------------------------------
10833# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
10834# file during the install process.  Don't run the TCLSH_PROG through
10835# ${CYGPATH} because it's being used directly by make.
10836# Require that we use a tclsh shell version 8.2 or later since earlier
10837# versions have bugs in the pkg_mkIndex routine.
10838# Add WISH as well if this is a Tk extension.
10839#--------------------------------------------------------------------
10840
10841
10842    { echo "$as_me:$LINENO: checking for tclsh" >&5
10843echo $ECHO_N "checking for tclsh... $ECHO_C" >&6; }
10844    if test -f "${TCL_BIN_DIR}/Makefile" ; then
10845        # tclConfig.sh is in Tcl build directory
10846        if test "${TEA_PLATFORM}" = "windows"; then
10847            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
10848        else
10849            TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
10850        fi
10851    else
10852        # tclConfig.sh is in install location
10853        if test "${TEA_PLATFORM}" = "windows"; then
10854            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
10855        else
10856            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}"
10857        fi
10858        list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
10859              `ls -d ${TCL_BIN_DIR}/..     2>/dev/null` \
10860              `ls -d ${TCL_PREFIX}/bin     2>/dev/null`"
10861        for i in $list ; do
10862            if test -f "$i/${TCLSH_PROG}" ; then
10863                REAL_TCL_BIN_DIR="`cd "$i"; pwd`/"
10864                break
10865            fi
10866        done
10867        TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}"
10868    fi
10869    { echo "$as_me:$LINENO: result: ${TCLSH_PROG}" >&5
10870echo "${ECHO_T}${TCLSH_PROG}" >&6; }
10871
10872
10873
10874#--------------------------------------------------------------------
10875# Finally, substitute all of the various values into the Makefile.
10876# You may alternatively have a special pkgIndex.tcl.in or other files
10877# which require substituting th AC variables in.  Include these here.
10878#--------------------------------------------------------------------
10879
10880ac_config_files="$ac_config_files Makefile"
10881
10882cat >confcache <<\_ACEOF
10883# This file is a shell script that caches the results of configure
10884# tests run on this system so they can be shared between configure
10885# scripts and configure runs, see configure's option --config-cache.
10886# It is not useful on other systems.  If it contains results you don't
10887# want to keep, you may remove or edit it.
10888#
10889# config.status only pays attention to the cache file if you give it
10890# the --recheck option to rerun configure.
10891#
10892# `ac_cv_env_foo' variables (set or unset) will be overridden when
10893# loading this file, other *unset* `ac_cv_foo' will be assigned the
10894# following values.
10895
10896_ACEOF
10897
10898# The following way of writing the cache mishandles newlines in values,
10899# but we know of no workaround that is simple, portable, and efficient.
10900# So, we kill variables containing newlines.
10901# Ultrix sh set writes to stderr and can't be redirected directly,
10902# and sets the high bit in the cache file unless we assign to the vars.
10903(
10904  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
10905    eval ac_val=\$$ac_var
10906    case $ac_val in #(
10907    *${as_nl}*)
10908      case $ac_var in #(
10909      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
10910echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
10911      esac
10912      case $ac_var in #(
10913      _ | IFS | as_nl) ;; #(
10914      *) $as_unset $ac_var ;;
10915      esac ;;
10916    esac
10917  done
10918
10919  (set) 2>&1 |
10920    case $as_nl`(ac_space=' '; set) 2>&1` in #(
10921    *${as_nl}ac_space=\ *)
10922      # `set' does not quote correctly, so add quotes (double-quote
10923      # substitution turns \\\\ into \\, and sed turns \\ into \).
10924      sed -n \
10925	"s/'/'\\\\''/g;
10926	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
10927      ;; #(
10928    *)
10929      # `set' quotes correctly as required by POSIX, so do not add quotes.
10930      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
10931      ;;
10932    esac |
10933    sort
10934) |
10935  sed '
10936     /^ac_cv_env_/b end
10937     t clear
10938     :clear
10939     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
10940     t end
10941     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
10942     :end' >>confcache
10943if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
10944  if test -w "$cache_file"; then
10945    test "x$cache_file" != "x/dev/null" &&
10946      { echo "$as_me:$LINENO: updating cache $cache_file" >&5
10947echo "$as_me: updating cache $cache_file" >&6;}
10948    cat confcache >$cache_file
10949  else
10950    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
10951echo "$as_me: not updating unwritable cache $cache_file" >&6;}
10952  fi
10953fi
10954rm -f confcache
10955
10956test "x$prefix" = xNONE && prefix=$ac_default_prefix
10957# Let make expand exec_prefix.
10958test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10959
10960# Transform confdefs.h into DEFS.
10961# Protect against shell expansion while executing Makefile rules.
10962# Protect against Makefile macro expansion.
10963#
10964# If the first sed substitution is executed (which looks for macros that
10965# take arguments), then branch to the quote section.  Otherwise,
10966# look for a macro that doesn't take arguments.
10967ac_script='
10968t clear
10969:clear
10970s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
10971t quote
10972s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
10973t quote
10974b any
10975:quote
10976s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
10977s/\[/\\&/g
10978s/\]/\\&/g
10979s/\$/$$/g
10980H
10981:any
10982${
10983	g
10984	s/^\n//
10985	s/\n/ /g
10986	p
10987}
10988'
10989DEFS=`sed -n "$ac_script" confdefs.h`
10990
10991
10992ac_libobjs=
10993ac_ltlibobjs=
10994for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
10995  # 1. Remove the extension, and $U if already installed.
10996  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
10997  ac_i=`echo "$ac_i" | sed "$ac_script"`
10998  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
10999  #    will be set to the directory where LIBOBJS objects are built.
11000  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
11001  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
11002done
11003LIBOBJS=$ac_libobjs
11004
11005LTLIBOBJS=$ac_ltlibobjs
11006
11007
11008CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""
11009
11010: ${CONFIG_STATUS=./config.status}
11011ac_clean_files_save=$ac_clean_files
11012ac_clean_files="$ac_clean_files $CONFIG_STATUS"
11013{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
11014echo "$as_me: creating $CONFIG_STATUS" >&6;}
11015cat >$CONFIG_STATUS <<_ACEOF
11016#! $SHELL
11017# Generated by $as_me.
11018# Run this file to recreate the current configuration.
11019# Compiler output produced by configure, useful for debugging
11020# configure, is in config.log if it exists.
11021
11022debug=false
11023ac_cs_recheck=false
11024ac_cs_silent=false
11025SHELL=\${CONFIG_SHELL-$SHELL}
11026_ACEOF
11027
11028cat >>$CONFIG_STATUS <<\_ACEOF
11029## --------------------- ##
11030## M4sh Initialization.  ##
11031## --------------------- ##
11032
11033# Be more Bourne compatible
11034DUALCASE=1; export DUALCASE # for MKS sh
11035if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
11036  emulate sh
11037  NULLCMD=:
11038  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
11039  # is contrary to our usage.  Disable this feature.
11040  alias -g '${1+"$@"}'='"$@"'
11041  setopt NO_GLOB_SUBST
11042else
11043  case `(set -o) 2>/dev/null` in
11044  *posix*) set -o posix ;;
11045esac
11046
11047fi
11048
11049
11050
11051
11052# PATH needs CR
11053# Avoid depending upon Character Ranges.
11054as_cr_letters='abcdefghijklmnopqrstuvwxyz'
11055as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
11056as_cr_Letters=$as_cr_letters$as_cr_LETTERS
11057as_cr_digits='0123456789'
11058as_cr_alnum=$as_cr_Letters$as_cr_digits
11059
11060# The user is always right.
11061if test "${PATH_SEPARATOR+set}" != set; then
11062  echo "#! /bin/sh" >conf$$.sh
11063  echo  "exit 0"   >>conf$$.sh
11064  chmod +x conf$$.sh
11065  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
11066    PATH_SEPARATOR=';'
11067  else
11068    PATH_SEPARATOR=:
11069  fi
11070  rm -f conf$$.sh
11071fi
11072
11073# Support unset when possible.
11074if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
11075  as_unset=unset
11076else
11077  as_unset=false
11078fi
11079
11080
11081# IFS
11082# We need space, tab and new line, in precisely that order.  Quoting is
11083# there to prevent editors from complaining about space-tab.
11084# (If _AS_PATH_WALK were called with IFS unset, it would disable word
11085# splitting by setting IFS to empty value.)
11086as_nl='
11087'
11088IFS=" ""	$as_nl"
11089
11090# Find who we are.  Look in the path if we contain no directory separator.
11091case $0 in
11092  *[\\/]* ) as_myself=$0 ;;
11093  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11094for as_dir in $PATH
11095do
11096  IFS=$as_save_IFS
11097  test -z "$as_dir" && as_dir=.
11098  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
11099done
11100IFS=$as_save_IFS
11101
11102     ;;
11103esac
11104# We did not find ourselves, most probably we were run as `sh COMMAND'
11105# in which case we are not to be found in the path.
11106if test "x$as_myself" = x; then
11107  as_myself=$0
11108fi
11109if test ! -f "$as_myself"; then
11110  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
11111  { (exit 1); exit 1; }
11112fi
11113
11114# Work around bugs in pre-3.0 UWIN ksh.
11115for as_var in ENV MAIL MAILPATH
11116do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
11117done
11118PS1='$ '
11119PS2='> '
11120PS4='+ '
11121
11122# NLS nuisances.
11123for as_var in \
11124  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
11125  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
11126  LC_TELEPHONE LC_TIME
11127do
11128  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
11129    eval $as_var=C; export $as_var
11130  else
11131    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
11132  fi
11133done
11134
11135# Required to use basename.
11136if expr a : '\(a\)' >/dev/null 2>&1 &&
11137   test "X`expr 00001 : '.*\(...\)'`" = X001; then
11138  as_expr=expr
11139else
11140  as_expr=false
11141fi
11142
11143if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
11144  as_basename=basename
11145else
11146  as_basename=false
11147fi
11148
11149
11150# Name of the executable.
11151as_me=`$as_basename -- "$0" ||
11152$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
11153	 X"$0" : 'X\(//\)$' \| \
11154	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
11155echo X/"$0" |
11156    sed '/^.*\/\([^/][^/]*\)\/*$/{
11157	    s//\1/
11158	    q
11159	  }
11160	  /^X\/\(\/\/\)$/{
11161	    s//\1/
11162	    q
11163	  }
11164	  /^X\/\(\/\).*/{
11165	    s//\1/
11166	    q
11167	  }
11168	  s/.*/./; q'`
11169
11170# CDPATH.
11171$as_unset CDPATH
11172
11173
11174
11175  as_lineno_1=$LINENO
11176  as_lineno_2=$LINENO
11177  test "x$as_lineno_1" != "x$as_lineno_2" &&
11178  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
11179
11180  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
11181  # uniformly replaced by the line number.  The first 'sed' inserts a
11182  # line-number line after each line using $LINENO; the second 'sed'
11183  # does the real work.  The second script uses 'N' to pair each
11184  # line-number line with the line containing $LINENO, and appends
11185  # trailing '-' during substitution so that $LINENO is not a special
11186  # case at line end.
11187  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
11188  # scripts with optimization help from Paolo Bonzini.  Blame Lee
11189  # E. McMahon (1931-1989) for sed's syntax.  :-)
11190  sed -n '
11191    p
11192    /[$]LINENO/=
11193  ' <$as_myself |
11194    sed '
11195      s/[$]LINENO.*/&-/
11196      t lineno
11197      b
11198      :lineno
11199      N
11200      :loop
11201      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
11202      t loop
11203      s/-\n.*//
11204    ' >$as_me.lineno &&
11205  chmod +x "$as_me.lineno" ||
11206    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
11207   { (exit 1); exit 1; }; }
11208
11209  # Don't try to exec as it changes $[0], causing all sort of problems
11210  # (the dirname of $[0] is not the place where we might find the
11211  # original and so on.  Autoconf is especially sensitive to this).
11212  . "./$as_me.lineno"
11213  # Exit status is that of the last command.
11214  exit
11215}
11216
11217
11218if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
11219  as_dirname=dirname
11220else
11221  as_dirname=false
11222fi
11223
11224ECHO_C= ECHO_N= ECHO_T=
11225case `echo -n x` in
11226-n*)
11227  case `echo 'x\c'` in
11228  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
11229  *)   ECHO_C='\c';;
11230  esac;;
11231*)
11232  ECHO_N='-n';;
11233esac
11234
11235if expr a : '\(a\)' >/dev/null 2>&1 &&
11236   test "X`expr 00001 : '.*\(...\)'`" = X001; then
11237  as_expr=expr
11238else
11239  as_expr=false
11240fi
11241
11242rm -f conf$$ conf$$.exe conf$$.file
11243if test -d conf$$.dir; then
11244  rm -f conf$$.dir/conf$$.file
11245else
11246  rm -f conf$$.dir
11247  mkdir conf$$.dir
11248fi
11249echo >conf$$.file
11250if ln -s conf$$.file conf$$ 2>/dev/null; then
11251  as_ln_s='ln -s'
11252  # ... but there are two gotchas:
11253  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
11254  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
11255  # In both cases, we have to default to `cp -p'.
11256  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
11257    as_ln_s='cp -p'
11258elif ln conf$$.file conf$$ 2>/dev/null; then
11259  as_ln_s=ln
11260else
11261  as_ln_s='cp -p'
11262fi
11263rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
11264rmdir conf$$.dir 2>/dev/null
11265
11266if mkdir -p . 2>/dev/null; then
11267  as_mkdir_p=:
11268else
11269  test -d ./-p && rmdir ./-p
11270  as_mkdir_p=false
11271fi
11272
11273if test -x / >/dev/null 2>&1; then
11274  as_test_x='test -x'
11275else
11276  if ls -dL / >/dev/null 2>&1; then
11277    as_ls_L_option=L
11278  else
11279    as_ls_L_option=
11280  fi
11281  as_test_x='
11282    eval sh -c '\''
11283      if test -d "$1"; then
11284        test -d "$1/.";
11285      else
11286	case $1 in
11287        -*)set "./$1";;
11288	esac;
11289	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
11290	???[sx]*):;;*)false;;esac;fi
11291    '\'' sh
11292  '
11293fi
11294as_executable_p=$as_test_x
11295
11296# Sed expression to map a string onto a valid CPP name.
11297as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
11298
11299# Sed expression to map a string onto a valid variable name.
11300as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
11301
11302
11303exec 6>&1
11304
11305# Save the log message, to keep $[0] and so on meaningful, and to
11306# report actual input values of CONFIG_FILES etc. instead of their
11307# values after options handling.
11308ac_log="
11309This file was extended by Memchan $as_me 2.3, which was
11310generated by GNU Autoconf 2.61.  Invocation command line was
11311
11312  CONFIG_FILES    = $CONFIG_FILES
11313  CONFIG_HEADERS  = $CONFIG_HEADERS
11314  CONFIG_LINKS    = $CONFIG_LINKS
11315  CONFIG_COMMANDS = $CONFIG_COMMANDS
11316  $ $0 $@
11317
11318on `(hostname || uname -n) 2>/dev/null | sed 1q`
11319"
11320
11321_ACEOF
11322
11323cat >>$CONFIG_STATUS <<_ACEOF
11324# Files that config.status was made for.
11325config_files="$ac_config_files"
11326
11327_ACEOF
11328
11329cat >>$CONFIG_STATUS <<\_ACEOF
11330ac_cs_usage="\
11331\`$as_me' instantiates files from templates according to the
11332current configuration.
11333
11334Usage: $0 [OPTIONS] [FILE]...
11335
11336  -h, --help       print this help, then exit
11337  -V, --version    print version number and configuration settings, then exit
11338  -q, --quiet      do not print progress messages
11339  -d, --debug      don't remove temporary files
11340      --recheck    update $as_me by reconfiguring in the same conditions
11341  --file=FILE[:TEMPLATE]
11342		   instantiate the configuration file FILE
11343
11344Configuration files:
11345$config_files
11346
11347Report bugs to <bug-autoconf@gnu.org>."
11348
11349_ACEOF
11350cat >>$CONFIG_STATUS <<_ACEOF
11351ac_cs_version="\\
11352Memchan config.status 2.3
11353configured by $0, generated by GNU Autoconf 2.61,
11354  with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
11355
11356Copyright (C) 2006 Free Software Foundation, Inc.
11357This config.status script is free software; the Free Software Foundation
11358gives unlimited permission to copy, distribute and modify it."
11359
11360ac_pwd='$ac_pwd'
11361srcdir='$srcdir'
11362INSTALL='$INSTALL'
11363_ACEOF
11364
11365cat >>$CONFIG_STATUS <<\_ACEOF
11366# If no file are specified by the user, then we need to provide default
11367# value.  By we need to know if files were specified by the user.
11368ac_need_defaults=:
11369while test $# != 0
11370do
11371  case $1 in
11372  --*=*)
11373    ac_option=`expr "X$1" : 'X\([^=]*\)='`
11374    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
11375    ac_shift=:
11376    ;;
11377  *)
11378    ac_option=$1
11379    ac_optarg=$2
11380    ac_shift=shift
11381    ;;
11382  esac
11383
11384  case $ac_option in
11385  # Handling of the options.
11386  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11387    ac_cs_recheck=: ;;
11388  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
11389    echo "$ac_cs_version"; exit ;;
11390  --debug | --debu | --deb | --de | --d | -d )
11391    debug=: ;;
11392  --file | --fil | --fi | --f )
11393    $ac_shift
11394    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
11395    ac_need_defaults=false;;
11396  --he | --h |  --help | --hel | -h )
11397    echo "$ac_cs_usage"; exit ;;
11398  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
11399  | -silent | --silent | --silen | --sile | --sil | --si | --s)
11400    ac_cs_silent=: ;;
11401
11402  # This is an error.
11403  -*) { echo "$as_me: error: unrecognized option: $1
11404Try \`$0 --help' for more information." >&2
11405   { (exit 1); exit 1; }; } ;;
11406
11407  *) ac_config_targets="$ac_config_targets $1"
11408     ac_need_defaults=false ;;
11409
11410  esac
11411  shift
11412done
11413
11414ac_configure_extra_args=
11415
11416if $ac_cs_silent; then
11417  exec 6>/dev/null
11418  ac_configure_extra_args="$ac_configure_extra_args --silent"
11419fi
11420
11421_ACEOF
11422cat >>$CONFIG_STATUS <<_ACEOF
11423if \$ac_cs_recheck; then
11424  echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
11425  CONFIG_SHELL=$SHELL
11426  export CONFIG_SHELL
11427  exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
11428fi
11429
11430_ACEOF
11431cat >>$CONFIG_STATUS <<\_ACEOF
11432exec 5>>config.log
11433{
11434  echo
11435  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
11436## Running $as_me. ##
11437_ASBOX
11438  echo "$ac_log"
11439} >&5
11440
11441_ACEOF
11442cat >>$CONFIG_STATUS <<_ACEOF
11443_ACEOF
11444
11445cat >>$CONFIG_STATUS <<\_ACEOF
11446
11447# Handling of arguments.
11448for ac_config_target in $ac_config_targets
11449do
11450  case $ac_config_target in
11451    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
11452
11453  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
11454echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
11455   { (exit 1); exit 1; }; };;
11456  esac
11457done
11458
11459
11460# If the user did not use the arguments to specify the items to instantiate,
11461# then the envvar interface is used.  Set only those that are not.
11462# We use the long form for the default assignment because of an extremely
11463# bizarre bug on SunOS 4.1.3.
11464if $ac_need_defaults; then
11465  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
11466fi
11467
11468# Have a temporary directory for convenience.  Make it in the build tree
11469# simply because there is no reason against having it here, and in addition,
11470# creating and moving files from /tmp can sometimes cause problems.
11471# Hook for its removal unless debugging.
11472# Note that there is a small window in which the directory will not be cleaned:
11473# after its creation but before its name has been assigned to `$tmp'.
11474$debug ||
11475{
11476  tmp=
11477  trap 'exit_status=$?
11478  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
11479' 0
11480  trap '{ (exit 1); exit 1; }' 1 2 13 15
11481}
11482# Create a (secure) tmp directory for tmp files.
11483
11484{
11485  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
11486  test -n "$tmp" && test -d "$tmp"
11487}  ||
11488{
11489  tmp=./conf$$-$RANDOM
11490  (umask 077 && mkdir "$tmp")
11491} ||
11492{
11493   echo "$me: cannot create a temporary directory in ." >&2
11494   { (exit 1); exit 1; }
11495}
11496
11497#
11498# Set up the sed scripts for CONFIG_FILES section.
11499#
11500
11501# No need to generate the scripts if there are no CONFIG_FILES.
11502# This happens for instance when ./config.status config.h
11503if test -n "$CONFIG_FILES"; then
11504
11505_ACEOF
11506
11507
11508
11509ac_delim='%!_!# '
11510for ac_last_try in false false false false false :; do
11511  cat >conf$$subs.sed <<_ACEOF
11512SHELL!$SHELL$ac_delim
11513PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
11514PACKAGE_NAME!$PACKAGE_NAME$ac_delim
11515PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
11516PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
11517PACKAGE_STRING!$PACKAGE_STRING$ac_delim
11518PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
11519exec_prefix!$exec_prefix$ac_delim
11520prefix!$prefix$ac_delim
11521program_transform_name!$program_transform_name$ac_delim
11522bindir!$bindir$ac_delim
11523sbindir!$sbindir$ac_delim
11524libexecdir!$libexecdir$ac_delim
11525datarootdir!$datarootdir$ac_delim
11526datadir!$datadir$ac_delim
11527sysconfdir!$sysconfdir$ac_delim
11528sharedstatedir!$sharedstatedir$ac_delim
11529localstatedir!$localstatedir$ac_delim
11530includedir!$includedir$ac_delim
11531oldincludedir!$oldincludedir$ac_delim
11532docdir!$docdir$ac_delim
11533infodir!$infodir$ac_delim
11534htmldir!$htmldir$ac_delim
11535dvidir!$dvidir$ac_delim
11536pdfdir!$pdfdir$ac_delim
11537psdir!$psdir$ac_delim
11538libdir!$libdir$ac_delim
11539localedir!$localedir$ac_delim
11540mandir!$mandir$ac_delim
11541DEFS!$DEFS$ac_delim
11542ECHO_C!$ECHO_C$ac_delim
11543ECHO_N!$ECHO_N$ac_delim
11544ECHO_T!$ECHO_T$ac_delim
11545LIBS!$LIBS$ac_delim
11546build_alias!$build_alias$ac_delim
11547host_alias!$host_alias$ac_delim
11548target_alias!$target_alias$ac_delim
11549CYGPATH!$CYGPATH$ac_delim
11550EXEEXT!$EXEEXT$ac_delim
11551PKG_LIB_FILE!$PKG_LIB_FILE$ac_delim
11552PKG_STUB_LIB_FILE!$PKG_STUB_LIB_FILE$ac_delim
11553PKG_STUB_SOURCES!$PKG_STUB_SOURCES$ac_delim
11554PKG_STUB_OBJECTS!$PKG_STUB_OBJECTS$ac_delim
11555PKG_TCL_SOURCES!$PKG_TCL_SOURCES$ac_delim
11556PKG_HEADERS!$PKG_HEADERS$ac_delim
11557PKG_INCLUDES!$PKG_INCLUDES$ac_delim
11558PKG_LIBS!$PKG_LIBS$ac_delim
11559PKG_CFLAGS!$PKG_CFLAGS$ac_delim
11560TCL_VERSION!$TCL_VERSION$ac_delim
11561TCL_PATCH_LEVEL!$TCL_PATCH_LEVEL$ac_delim
11562TCL_BIN_DIR!$TCL_BIN_DIR$ac_delim
11563TCL_SRC_DIR!$TCL_SRC_DIR$ac_delim
11564TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim
11565TCL_LIB_FLAG!$TCL_LIB_FLAG$ac_delim
11566TCL_LIB_SPEC!$TCL_LIB_SPEC$ac_delim
11567TCL_STUB_LIB_FILE!$TCL_STUB_LIB_FILE$ac_delim
11568TCL_STUB_LIB_FLAG!$TCL_STUB_LIB_FLAG$ac_delim
11569TCL_STUB_LIB_SPEC!$TCL_STUB_LIB_SPEC$ac_delim
11570CLEANFILES!$CLEANFILES$ac_delim
11571TCL_LIBS!$TCL_LIBS$ac_delim
11572TCL_DEFS!$TCL_DEFS$ac_delim
11573TCL_EXTRA_CFLAGS!$TCL_EXTRA_CFLAGS$ac_delim
11574TCL_LD_FLAGS!$TCL_LD_FLAGS$ac_delim
11575TCL_SHLIB_LD_LIBS!$TCL_SHLIB_LD_LIBS$ac_delim
11576CC!$CC$ac_delim
11577CFLAGS!$CFLAGS$ac_delim
11578LDFLAGS!$LDFLAGS$ac_delim
11579CPPFLAGS!$CPPFLAGS$ac_delim
11580ac_ct_CC!$ac_ct_CC$ac_delim
11581OBJEXT!$OBJEXT$ac_delim
11582CPP!$CPP$ac_delim
11583INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
11584INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
11585INSTALL_DATA!$INSTALL_DATA$ac_delim
11586SET_MAKE!$SET_MAKE$ac_delim
11587RANLIB!$RANLIB$ac_delim
11588GREP!$GREP$ac_delim
11589EGREP!$EGREP$ac_delim
11590MATH_LIBS!$MATH_LIBS$ac_delim
11591PKG_SOURCES!$PKG_SOURCES$ac_delim
11592PKG_OBJECTS!$PKG_OBJECTS$ac_delim
11593TCL_INCLUDES!$TCL_INCLUDES$ac_delim
11594TCL_THREADS!$TCL_THREADS$ac_delim
11595SHARED_BUILD!$SHARED_BUILD$ac_delim
11596AR!$AR$ac_delim
11597CELIB_DIR!$CELIB_DIR$ac_delim
11598CFLAGS_DEBUG!$CFLAGS_DEBUG$ac_delim
11599CFLAGS_OPTIMIZE!$CFLAGS_OPTIMIZE$ac_delim
11600CFLAGS_WARNING!$CFLAGS_WARNING$ac_delim
11601STLIB_LD!$STLIB_LD$ac_delim
11602SHLIB_LD!$SHLIB_LD$ac_delim
11603SHLIB_LD_LIBS!$SHLIB_LD_LIBS$ac_delim
11604SHLIB_CFLAGS!$SHLIB_CFLAGS$ac_delim
11605LD_LIBRARY_PATH_VAR!$LD_LIBRARY_PATH_VAR$ac_delim
11606SHLIB_SUFFIX!$SHLIB_SUFFIX$ac_delim
11607CFLAGS_DEFAULT!$CFLAGS_DEFAULT$ac_delim
11608LDFLAGS_DEFAULT!$LDFLAGS_DEFAULT$ac_delim
11609_ACEOF
11610
11611  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
11612    break
11613  elif $ac_last_try; then
11614    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
11615echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
11616   { (exit 1); exit 1; }; }
11617  else
11618    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
11619  fi
11620done
11621
11622ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
11623if test -n "$ac_eof"; then
11624  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
11625  ac_eof=`expr $ac_eof + 1`
11626fi
11627
11628cat >>$CONFIG_STATUS <<_ACEOF
11629cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
11630/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
11631_ACEOF
11632sed '
11633s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
11634s/^/s,@/; s/!/@,|#_!!_#|/
11635:n
11636t n
11637s/'"$ac_delim"'$/,g/; t
11638s/$/\\/; p
11639N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
11640' >>$CONFIG_STATUS <conf$$subs.sed
11641rm -f conf$$subs.sed
11642cat >>$CONFIG_STATUS <<_ACEOF
11643CEOF$ac_eof
11644_ACEOF
11645
11646
11647ac_delim='%!_!# '
11648for ac_last_try in false false false false false :; do
11649  cat >conf$$subs.sed <<_ACEOF
11650TCL_DBGX!$TCL_DBGX$ac_delim
11651MAKE_LIB!$MAKE_LIB$ac_delim
11652MAKE_SHARED_LIB!$MAKE_SHARED_LIB$ac_delim
11653MAKE_STATIC_LIB!$MAKE_STATIC_LIB$ac_delim
11654MAKE_STUB_LIB!$MAKE_STUB_LIB$ac_delim
11655RANLIB_STUB!$RANLIB_STUB$ac_delim
11656VC_MANIFEST_EMBED_DLL!$VC_MANIFEST_EMBED_DLL$ac_delim
11657VC_MANIFEST_EMBED_EXE!$VC_MANIFEST_EMBED_EXE$ac_delim
11658TCLSH_PROG!$TCLSH_PROG$ac_delim
11659LIBOBJS!$LIBOBJS$ac_delim
11660LTLIBOBJS!$LTLIBOBJS$ac_delim
11661_ACEOF
11662
11663  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 11; then
11664    break
11665  elif $ac_last_try; then
11666    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
11667echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
11668   { (exit 1); exit 1; }; }
11669  else
11670    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
11671  fi
11672done
11673
11674ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
11675if test -n "$ac_eof"; then
11676  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
11677  ac_eof=`expr $ac_eof + 1`
11678fi
11679
11680cat >>$CONFIG_STATUS <<_ACEOF
11681cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
11682/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
11683_ACEOF
11684sed '
11685s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
11686s/^/s,@/; s/!/@,|#_!!_#|/
11687:n
11688t n
11689s/'"$ac_delim"'$/,g/; t
11690s/$/\\/; p
11691N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
11692' >>$CONFIG_STATUS <conf$$subs.sed
11693rm -f conf$$subs.sed
11694cat >>$CONFIG_STATUS <<_ACEOF
11695:end
11696s/|#_!!_#|//g
11697CEOF$ac_eof
11698_ACEOF
11699
11700
11701# VPATH may cause trouble with some makes, so we remove $(srcdir),
11702# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
11703# trailing colons and then remove the whole line if VPATH becomes empty
11704# (actually we leave an empty line to preserve line numbers).
11705if test "x$srcdir" = x.; then
11706  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
11707s/:*\$(srcdir):*/:/
11708s/:*\${srcdir}:*/:/
11709s/:*@srcdir@:*/:/
11710s/^\([^=]*=[	 ]*\):*/\1/
11711s/:*$//
11712s/^[^=]*=[	 ]*$//
11713}'
11714fi
11715
11716cat >>$CONFIG_STATUS <<\_ACEOF
11717fi # test -n "$CONFIG_FILES"
11718
11719
11720for ac_tag in  :F $CONFIG_FILES
11721do
11722  case $ac_tag in
11723  :[FHLC]) ac_mode=$ac_tag; continue;;
11724  esac
11725  case $ac_mode$ac_tag in
11726  :[FHL]*:*);;
11727  :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
11728echo "$as_me: error: Invalid tag $ac_tag." >&2;}
11729   { (exit 1); exit 1; }; };;
11730  :[FH]-) ac_tag=-:-;;
11731  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
11732  esac
11733  ac_save_IFS=$IFS
11734  IFS=:
11735  set x $ac_tag
11736  IFS=$ac_save_IFS
11737  shift
11738  ac_file=$1
11739  shift
11740
11741  case $ac_mode in
11742  :L) ac_source=$1;;
11743  :[FH])
11744    ac_file_inputs=
11745    for ac_f
11746    do
11747      case $ac_f in
11748      -) ac_f="$tmp/stdin";;
11749      *) # Look for the file first in the build tree, then in the source tree
11750	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
11751	 # because $ac_f cannot contain `:'.
11752	 test -f "$ac_f" ||
11753	   case $ac_f in
11754	   [\\/$]*) false;;
11755	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
11756	   esac ||
11757	   { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
11758echo "$as_me: error: cannot find input file: $ac_f" >&2;}
11759   { (exit 1); exit 1; }; };;
11760      esac
11761      ac_file_inputs="$ac_file_inputs $ac_f"
11762    done
11763
11764    # Let's still pretend it is `configure' which instantiates (i.e., don't
11765    # use $as_me), people would be surprised to read:
11766    #    /* config.h.  Generated by config.status.  */
11767    configure_input="Generated from "`IFS=:
11768	  echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
11769    if test x"$ac_file" != x-; then
11770      configure_input="$ac_file.  $configure_input"
11771      { echo "$as_me:$LINENO: creating $ac_file" >&5
11772echo "$as_me: creating $ac_file" >&6;}
11773    fi
11774
11775    case $ac_tag in
11776    *:-:* | *:-) cat >"$tmp/stdin";;
11777    esac
11778    ;;
11779  esac
11780
11781  ac_dir=`$as_dirname -- "$ac_file" ||
11782$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11783	 X"$ac_file" : 'X\(//\)[^/]' \| \
11784	 X"$ac_file" : 'X\(//\)$' \| \
11785	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
11786echo X"$ac_file" |
11787    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
11788	    s//\1/
11789	    q
11790	  }
11791	  /^X\(\/\/\)[^/].*/{
11792	    s//\1/
11793	    q
11794	  }
11795	  /^X\(\/\/\)$/{
11796	    s//\1/
11797	    q
11798	  }
11799	  /^X\(\/\).*/{
11800	    s//\1/
11801	    q
11802	  }
11803	  s/.*/./; q'`
11804  { as_dir="$ac_dir"
11805  case $as_dir in #(
11806  -*) as_dir=./$as_dir;;
11807  esac
11808  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
11809    as_dirs=
11810    while :; do
11811      case $as_dir in #(
11812      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
11813      *) as_qdir=$as_dir;;
11814      esac
11815      as_dirs="'$as_qdir' $as_dirs"
11816      as_dir=`$as_dirname -- "$as_dir" ||
11817$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11818	 X"$as_dir" : 'X\(//\)[^/]' \| \
11819	 X"$as_dir" : 'X\(//\)$' \| \
11820	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
11821echo X"$as_dir" |
11822    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
11823	    s//\1/
11824	    q
11825	  }
11826	  /^X\(\/\/\)[^/].*/{
11827	    s//\1/
11828	    q
11829	  }
11830	  /^X\(\/\/\)$/{
11831	    s//\1/
11832	    q
11833	  }
11834	  /^X\(\/\).*/{
11835	    s//\1/
11836	    q
11837	  }
11838	  s/.*/./; q'`
11839      test -d "$as_dir" && break
11840    done
11841    test -z "$as_dirs" || eval "mkdir $as_dirs"
11842  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
11843echo "$as_me: error: cannot create directory $as_dir" >&2;}
11844   { (exit 1); exit 1; }; }; }
11845  ac_builddir=.
11846
11847case "$ac_dir" in
11848.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
11849*)
11850  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
11851  # A ".." for each directory in $ac_dir_suffix.
11852  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
11853  case $ac_top_builddir_sub in
11854  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
11855  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
11856  esac ;;
11857esac
11858ac_abs_top_builddir=$ac_pwd
11859ac_abs_builddir=$ac_pwd$ac_dir_suffix
11860# for backward compatibility:
11861ac_top_builddir=$ac_top_build_prefix
11862
11863case $srcdir in
11864  .)  # We are building in place.
11865    ac_srcdir=.
11866    ac_top_srcdir=$ac_top_builddir_sub
11867    ac_abs_top_srcdir=$ac_pwd ;;
11868  [\\/]* | ?:[\\/]* )  # Absolute name.
11869    ac_srcdir=$srcdir$ac_dir_suffix;
11870    ac_top_srcdir=$srcdir
11871    ac_abs_top_srcdir=$srcdir ;;
11872  *) # Relative name.
11873    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
11874    ac_top_srcdir=$ac_top_build_prefix$srcdir
11875    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
11876esac
11877ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
11878
11879
11880  case $ac_mode in
11881  :F)
11882  #
11883  # CONFIG_FILE
11884  #
11885
11886  case $INSTALL in
11887  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
11888  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
11889  esac
11890_ACEOF
11891
11892cat >>$CONFIG_STATUS <<\_ACEOF
11893# If the template does not know about datarootdir, expand it.
11894# FIXME: This hack should be removed a few years after 2.60.
11895ac_datarootdir_hack=; ac_datarootdir_seen=
11896
11897case `sed -n '/datarootdir/ {
11898  p
11899  q
11900}
11901/@datadir@/p
11902/@docdir@/p
11903/@infodir@/p
11904/@localedir@/p
11905/@mandir@/p
11906' $ac_file_inputs` in
11907*datarootdir*) ac_datarootdir_seen=yes;;
11908*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
11909  { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
11910echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
11911_ACEOF
11912cat >>$CONFIG_STATUS <<_ACEOF
11913  ac_datarootdir_hack='
11914  s&@datadir@&$datadir&g
11915  s&@docdir@&$docdir&g
11916  s&@infodir@&$infodir&g
11917  s&@localedir@&$localedir&g
11918  s&@mandir@&$mandir&g
11919    s&\\\${datarootdir}&$datarootdir&g' ;;
11920esac
11921_ACEOF
11922
11923# Neutralize VPATH when `$srcdir' = `.'.
11924# Shell code in configure.ac might set extrasub.
11925# FIXME: do we really want to maintain this feature?
11926cat >>$CONFIG_STATUS <<_ACEOF
11927  sed "$ac_vpsub
11928$extrasub
11929_ACEOF
11930cat >>$CONFIG_STATUS <<\_ACEOF
11931:t
11932/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
11933s&@configure_input@&$configure_input&;t t
11934s&@top_builddir@&$ac_top_builddir_sub&;t t
11935s&@srcdir@&$ac_srcdir&;t t
11936s&@abs_srcdir@&$ac_abs_srcdir&;t t
11937s&@top_srcdir@&$ac_top_srcdir&;t t
11938s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
11939s&@builddir@&$ac_builddir&;t t
11940s&@abs_builddir@&$ac_abs_builddir&;t t
11941s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
11942s&@INSTALL@&$ac_INSTALL&;t t
11943$ac_datarootdir_hack
11944" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
11945
11946test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
11947  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
11948  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
11949  { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
11950which seems to be undefined.  Please make sure it is defined." >&5
11951echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
11952which seems to be undefined.  Please make sure it is defined." >&2;}
11953
11954  rm -f "$tmp/stdin"
11955  case $ac_file in
11956  -) cat "$tmp/out"; rm -f "$tmp/out";;
11957  *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
11958  esac
11959 ;;
11960
11961
11962
11963  esac
11964
11965done # for ac_tag
11966
11967
11968{ (exit 0); exit 0; }
11969_ACEOF
11970chmod +x $CONFIG_STATUS
11971ac_clean_files=$ac_clean_files_save
11972
11973
11974# configure is writing to config.log, and then calls config.status.
11975# config.status does its own redirection, appending to config.log.
11976# Unfortunately, on DOS this fails, as config.log is still kept open
11977# by configure, so config.status won't be able to write to it; its
11978# output is simply discarded.  So we exec the FD to /dev/null,
11979# effectively closing config.log, so it can be properly (re)opened and
11980# appended to by config.status.  When coming back to configure, we
11981# need to make the FD available again.
11982if test "$no_create" != yes; then
11983  ac_cs_success=:
11984  ac_config_status_args=
11985  test "$silent" = yes &&
11986    ac_config_status_args="$ac_config_status_args --quiet"
11987  exec 5>/dev/null
11988  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
11989  exec 5>>config.log
11990  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
11991  # would make configure fail if this is the last instruction.
11992  $ac_cs_success || { (exit 1); exit 1; }
11993fi
11994
11995
11996#--------------------------------------------------------------------
11997