1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.61 for snack 2.2.
4#
5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9## --------------------- ##
10## M4sh Initialization.  ##
11## --------------------- ##
12
13# Be more Bourne compatible
14DUALCASE=1; export DUALCASE # for MKS sh
15if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16  emulate sh
17  NULLCMD=:
18  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
19  # is contrary to our usage.  Disable this feature.
20  alias -g '${1+"$@"}'='"$@"'
21  setopt NO_GLOB_SUBST
22else
23  case `(set -o) 2>/dev/null` in
24  *posix*) set -o posix ;;
25esac
26
27fi
28
29
30
31
32# PATH needs CR
33# Avoid depending upon Character Ranges.
34as_cr_letters='abcdefghijklmnopqrstuvwxyz'
35as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
36as_cr_Letters=$as_cr_letters$as_cr_LETTERS
37as_cr_digits='0123456789'
38as_cr_alnum=$as_cr_Letters$as_cr_digits
39
40# The user is always right.
41if test "${PATH_SEPARATOR+set}" != set; then
42  echo "#! /bin/sh" >conf$$.sh
43  echo  "exit 0"   >>conf$$.sh
44  chmod +x conf$$.sh
45  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
46    PATH_SEPARATOR=';'
47  else
48    PATH_SEPARATOR=:
49  fi
50  rm -f conf$$.sh
51fi
52
53# Support unset when possible.
54if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
55  as_unset=unset
56else
57  as_unset=false
58fi
59
60
61# IFS
62# We need space, tab and new line, in precisely that order.  Quoting is
63# there to prevent editors from complaining about space-tab.
64# (If _AS_PATH_WALK were called with IFS unset, it would disable word
65# splitting by setting IFS to empty value.)
66as_nl='
67'
68IFS=" ""	$as_nl"
69
70# Find who we are.  Look in the path if we contain no directory separator.
71case $0 in
72  *[\\/]* ) as_myself=$0 ;;
73  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
74for as_dir in $PATH
75do
76  IFS=$as_save_IFS
77  test -z "$as_dir" && as_dir=.
78  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
79done
80IFS=$as_save_IFS
81
82     ;;
83esac
84# We did not find ourselves, most probably we were run as `sh COMMAND'
85# in which case we are not to be found in the path.
86if test "x$as_myself" = x; then
87  as_myself=$0
88fi
89if test ! -f "$as_myself"; then
90  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
91  { (exit 1); exit 1; }
92fi
93
94# Work around bugs in pre-3.0 UWIN ksh.
95for as_var in ENV MAIL MAILPATH
96do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
97done
98PS1='$ '
99PS2='> '
100PS4='+ '
101
102# NLS nuisances.
103for as_var in \
104  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
105  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
106  LC_TELEPHONE LC_TIME
107do
108  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
109    eval $as_var=C; export $as_var
110  else
111    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
112  fi
113done
114
115# Required to use basename.
116if expr a : '\(a\)' >/dev/null 2>&1 &&
117   test "X`expr 00001 : '.*\(...\)'`" = X001; then
118  as_expr=expr
119else
120  as_expr=false
121fi
122
123if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
124  as_basename=basename
125else
126  as_basename=false
127fi
128
129
130# Name of the executable.
131as_me=`$as_basename -- "$0" ||
132$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
133	 X"$0" : 'X\(//\)$' \| \
134	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
135echo X/"$0" |
136    sed '/^.*\/\([^/][^/]*\)\/*$/{
137	    s//\1/
138	    q
139	  }
140	  /^X\/\(\/\/\)$/{
141	    s//\1/
142	    q
143	  }
144	  /^X\/\(\/\).*/{
145	    s//\1/
146	    q
147	  }
148	  s/.*/./; q'`
149
150# CDPATH.
151$as_unset CDPATH
152
153
154if test "x$CONFIG_SHELL" = x; then
155  if (eval ":") 2>/dev/null; then
156  as_have_required=yes
157else
158  as_have_required=no
159fi
160
161  if test $as_have_required = yes && 	 (eval ":
162(as_func_return () {
163  (exit \$1)
164}
165as_func_success () {
166  as_func_return 0
167}
168as_func_failure () {
169  as_func_return 1
170}
171as_func_ret_success () {
172  return 0
173}
174as_func_ret_failure () {
175  return 1
176}
177
178exitcode=0
179if as_func_success; then
180  :
181else
182  exitcode=1
183  echo as_func_success failed.
184fi
185
186if as_func_failure; then
187  exitcode=1
188  echo as_func_failure succeeded.
189fi
190
191if as_func_ret_success; then
192  :
193else
194  exitcode=1
195  echo as_func_ret_success failed.
196fi
197
198if as_func_ret_failure; then
199  exitcode=1
200  echo as_func_ret_failure succeeded.
201fi
202
203if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
204  :
205else
206  exitcode=1
207  echo positional parameters were not saved.
208fi
209
210test \$exitcode = 0) || { (exit 1); exit 1; }
211
212(
213  as_lineno_1=\$LINENO
214  as_lineno_2=\$LINENO
215  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
216  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
217") 2> /dev/null; then
218  :
219else
220  as_candidate_shells=
221    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
222for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
223do
224  IFS=$as_save_IFS
225  test -z "$as_dir" && as_dir=.
226  case $as_dir in
227	 /*)
228	   for as_base in sh bash ksh sh5; do
229	     as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
230	   done;;
231       esac
232done
233IFS=$as_save_IFS
234
235
236      for as_shell in $as_candidate_shells $SHELL; do
237	 # Try only shells that exist, to save several forks.
238	 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
239		{ ("$as_shell") 2> /dev/null <<\_ASEOF
240if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
241  emulate sh
242  NULLCMD=:
243  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
244  # is contrary to our usage.  Disable this feature.
245  alias -g '${1+"$@"}'='"$@"'
246  setopt NO_GLOB_SUBST
247else
248  case `(set -o) 2>/dev/null` in
249  *posix*) set -o posix ;;
250esac
251
252fi
253
254
255:
256_ASEOF
257}; then
258  CONFIG_SHELL=$as_shell
259	       as_have_required=yes
260	       if { "$as_shell" 2> /dev/null <<\_ASEOF
261if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
262  emulate sh
263  NULLCMD=:
264  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
265  # is contrary to our usage.  Disable this feature.
266  alias -g '${1+"$@"}'='"$@"'
267  setopt NO_GLOB_SUBST
268else
269  case `(set -o) 2>/dev/null` in
270  *posix*) set -o posix ;;
271esac
272
273fi
274
275
276:
277(as_func_return () {
278  (exit $1)
279}
280as_func_success () {
281  as_func_return 0
282}
283as_func_failure () {
284  as_func_return 1
285}
286as_func_ret_success () {
287  return 0
288}
289as_func_ret_failure () {
290  return 1
291}
292
293exitcode=0
294if as_func_success; then
295  :
296else
297  exitcode=1
298  echo as_func_success failed.
299fi
300
301if as_func_failure; then
302  exitcode=1
303  echo as_func_failure succeeded.
304fi
305
306if as_func_ret_success; then
307  :
308else
309  exitcode=1
310  echo as_func_ret_success failed.
311fi
312
313if as_func_ret_failure; then
314  exitcode=1
315  echo as_func_ret_failure succeeded.
316fi
317
318if ( set x; as_func_ret_success y && test x = "$1" ); then
319  :
320else
321  exitcode=1
322  echo positional parameters were not saved.
323fi
324
325test $exitcode = 0) || { (exit 1); exit 1; }
326
327(
328  as_lineno_1=$LINENO
329  as_lineno_2=$LINENO
330  test "x$as_lineno_1" != "x$as_lineno_2" &&
331  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
332
333_ASEOF
334}; then
335  break
336fi
337
338fi
339
340      done
341
342      if test "x$CONFIG_SHELL" != x; then
343  for as_var in BASH_ENV ENV
344        do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
345        done
346        export CONFIG_SHELL
347        exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
348fi
349
350
351    if test $as_have_required = no; then
352  echo This script requires a shell more modern than all the
353      echo shells that I found on your system.  Please install a
354      echo modern shell, or manually run the script under such a
355      echo shell if you do have one.
356      { (exit 1); exit 1; }
357fi
358
359
360fi
361
362fi
363
364
365
366(eval "as_func_return () {
367  (exit \$1)
368}
369as_func_success () {
370  as_func_return 0
371}
372as_func_failure () {
373  as_func_return 1
374}
375as_func_ret_success () {
376  return 0
377}
378as_func_ret_failure () {
379  return 1
380}
381
382exitcode=0
383if as_func_success; then
384  :
385else
386  exitcode=1
387  echo as_func_success failed.
388fi
389
390if as_func_failure; then
391  exitcode=1
392  echo as_func_failure succeeded.
393fi
394
395if as_func_ret_success; then
396  :
397else
398  exitcode=1
399  echo as_func_ret_success failed.
400fi
401
402if as_func_ret_failure; then
403  exitcode=1
404  echo as_func_ret_failure succeeded.
405fi
406
407if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
408  :
409else
410  exitcode=1
411  echo positional parameters were not saved.
412fi
413
414test \$exitcode = 0") || {
415  echo No shell found that supports shell functions.
416  echo Please tell autoconf@gnu.org about your system,
417  echo including any error possibly output before this
418  echo message
419}
420
421
422
423  as_lineno_1=$LINENO
424  as_lineno_2=$LINENO
425  test "x$as_lineno_1" != "x$as_lineno_2" &&
426  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
427
428  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
429  # uniformly replaced by the line number.  The first 'sed' inserts a
430  # line-number line after each line using $LINENO; the second 'sed'
431  # does the real work.  The second script uses 'N' to pair each
432  # line-number line with the line containing $LINENO, and appends
433  # trailing '-' during substitution so that $LINENO is not a special
434  # case at line end.
435  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
436  # scripts with optimization help from Paolo Bonzini.  Blame Lee
437  # E. McMahon (1931-1989) for sed's syntax.  :-)
438  sed -n '
439    p
440    /[$]LINENO/=
441  ' <$as_myself |
442    sed '
443      s/[$]LINENO.*/&-/
444      t lineno
445      b
446      :lineno
447      N
448      :loop
449      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
450      t loop
451      s/-\n.*//
452    ' >$as_me.lineno &&
453  chmod +x "$as_me.lineno" ||
454    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
455   { (exit 1); exit 1; }; }
456
457  # Don't try to exec as it changes $[0], causing all sort of problems
458  # (the dirname of $[0] is not the place where we might find the
459  # original and so on.  Autoconf is especially sensitive to this).
460  . "./$as_me.lineno"
461  # Exit status is that of the last command.
462  exit
463}
464
465
466if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
467  as_dirname=dirname
468else
469  as_dirname=false
470fi
471
472ECHO_C= ECHO_N= ECHO_T=
473case `echo -n x` in
474-n*)
475  case `echo 'x\c'` in
476  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
477  *)   ECHO_C='\c';;
478  esac;;
479*)
480  ECHO_N='-n';;
481esac
482
483if expr a : '\(a\)' >/dev/null 2>&1 &&
484   test "X`expr 00001 : '.*\(...\)'`" = X001; then
485  as_expr=expr
486else
487  as_expr=false
488fi
489
490rm -f conf$$ conf$$.exe conf$$.file
491if test -d conf$$.dir; then
492  rm -f conf$$.dir/conf$$.file
493else
494  rm -f conf$$.dir
495  mkdir conf$$.dir
496fi
497echo >conf$$.file
498if ln -s conf$$.file conf$$ 2>/dev/null; then
499  as_ln_s='ln -s'
500  # ... but there are two gotchas:
501  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
502  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
503  # In both cases, we have to default to `cp -p'.
504  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
505    as_ln_s='cp -p'
506elif ln conf$$.file conf$$ 2>/dev/null; then
507  as_ln_s=ln
508else
509  as_ln_s='cp -p'
510fi
511rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
512rmdir conf$$.dir 2>/dev/null
513
514if mkdir -p . 2>/dev/null; then
515  as_mkdir_p=:
516else
517  test -d ./-p && rmdir ./-p
518  as_mkdir_p=false
519fi
520
521if test -x / >/dev/null 2>&1; then
522  as_test_x='test -x'
523else
524  if ls -dL / >/dev/null 2>&1; then
525    as_ls_L_option=L
526  else
527    as_ls_L_option=
528  fi
529  as_test_x='
530    eval sh -c '\''
531      if test -d "$1"; then
532        test -d "$1/.";
533      else
534	case $1 in
535        -*)set "./$1";;
536	esac;
537	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
538	???[sx]*):;;*)false;;esac;fi
539    '\'' sh
540  '
541fi
542as_executable_p=$as_test_x
543
544# Sed expression to map a string onto a valid CPP name.
545as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
546
547# Sed expression to map a string onto a valid variable name.
548as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
549
550
551
552exec 7<&0 </dev/null 6>&1
553
554# Name of the host.
555# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
556# so uname gets run too.
557ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
558
559#
560# Initializations.
561#
562ac_default_prefix=/usr/local
563ac_clean_files=
564ac_config_libobj_dir=.
565LIBOBJS=
566cross_compiling=no
567subdirs=
568MFLAGS=
569MAKEFLAGS=
570SHELL=${CONFIG_SHELL-/bin/sh}
571
572# Identity of this package.
573PACKAGE_NAME='snack'
574PACKAGE_TARNAME='snack'
575PACKAGE_VERSION='2.2'
576PACKAGE_STRING='snack 2.2'
577PACKAGE_BUGREPORT=''
578
579# Factoring default headers for most tests.
580ac_includes_default="\
581#include <stdio.h>
582#ifdef HAVE_SYS_TYPES_H
583# include <sys/types.h>
584#endif
585#ifdef HAVE_SYS_STAT_H
586# include <sys/stat.h>
587#endif
588#ifdef STDC_HEADERS
589# include <stdlib.h>
590# include <stddef.h>
591#else
592# ifdef HAVE_STDLIB_H
593#  include <stdlib.h>
594# endif
595#endif
596#ifdef HAVE_STRING_H
597# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
598#  include <memory.h>
599# endif
600# include <string.h>
601#endif
602#ifdef HAVE_STRINGS_H
603# include <strings.h>
604#endif
605#ifdef HAVE_INTTYPES_H
606# include <inttypes.h>
607#endif
608#ifdef HAVE_STDINT_H
609# include <stdint.h>
610#endif
611#ifdef HAVE_UNISTD_H
612# include <unistd.h>
613#endif"
614
615ac_subst_vars='SHELL
616PATH_SEPARATOR
617PACKAGE_NAME
618PACKAGE_TARNAME
619PACKAGE_VERSION
620PACKAGE_STRING
621PACKAGE_BUGREPORT
622exec_prefix
623prefix
624program_transform_name
625bindir
626sbindir
627libexecdir
628datarootdir
629datadir
630sysconfdir
631sharedstatedir
632localstatedir
633includedir
634oldincludedir
635docdir
636infodir
637htmldir
638dvidir
639pdfdir
640psdir
641libdir
642localedir
643mandir
644DEFS
645ECHO_C
646ECHO_N
647ECHO_T
648LIBS
649build_alias
650host_alias
651target_alias
652CYGPATH
653EXEEXT
654PKG_LIB_FILE
655PKG_STUB_LIB_FILE
656PKG_STUB_SOURCES
657PKG_STUB_OBJECTS
658PKG_TCL_SOURCES
659PKG_HEADERS
660PKG_INCLUDES
661PKG_LIBS
662PKG_CFLAGS
663TCL_VERSION
664TCL_PATCH_LEVEL
665TCL_BIN_DIR
666TCL_SRC_DIR
667TCL_LIB_FILE
668TCL_LIB_FLAG
669TCL_LIB_SPEC
670TCL_STUB_LIB_FILE
671TCL_STUB_LIB_FLAG
672TCL_STUB_LIB_SPEC
673CLEANFILES
674TCL_LIBS
675TCL_DEFS
676TCL_EXTRA_CFLAGS
677TCL_LD_FLAGS
678TCL_SHLIB_LD_LIBS
679TK_VERSION
680TK_BIN_DIR
681TK_SRC_DIR
682TK_LIB_FILE
683TK_LIB_FLAG
684TK_LIB_SPEC
685TK_STUB_LIB_FILE
686TK_STUB_LIB_FLAG
687TK_STUB_LIB_SPEC
688TK_LIBS
689TK_XINCLUDES
690CC
691CFLAGS
692LDFLAGS
693CPPFLAGS
694ac_ct_CC
695OBJEXT
696CPP
697INSTALL_PROGRAM
698INSTALL_SCRIPT
699INSTALL_DATA
700SET_MAKE
701RANLIB
702GREP
703EGREP
704MATH_LIBS
705PKG_SOURCES
706PKG_OBJECTS
707TCL_INCLUDES
708TK_INCLUDES
709TCL_THREADS
710SHARED_BUILD
711AR
712CELIB_DIR
713CFLAGS_DEBUG
714CFLAGS_OPTIMIZE
715CFLAGS_WARNING
716STLIB_LD
717SHLIB_LD
718SHLIB_LD_LIBS
719SHLIB_CFLAGS
720LD_LIBRARY_PATH_VAR
721CFLAGS_DEFAULT
722LDFLAGS_DEFAULT
723TCL_DBGX
724MAKE_LIB
725MAKE_SHARED_LIB
726MAKE_STATIC_LIB
727MAKE_STUB_LIB
728RANLIB_STUB
729VC_MANIFEST_EMBED_DLL
730VC_MANIFEST_EMBED_EXE
731TCLSH_PROG
732LIBOBJS
733LTLIBOBJS'
734ac_subst_files=''
735      ac_precious_vars='build_alias
736host_alias
737target_alias
738CC
739CFLAGS
740LDFLAGS
741LIBS
742CPPFLAGS
743CPP'
744
745
746# Initialize some variables set by options.
747ac_init_help=
748ac_init_version=false
749# The variables have the same names as the options, with
750# dashes changed to underlines.
751cache_file=/dev/null
752exec_prefix=NONE
753no_create=
754no_recursion=
755prefix=NONE
756program_prefix=NONE
757program_suffix=NONE
758program_transform_name=s,x,x,
759silent=
760site=
761srcdir=
762verbose=
763x_includes=NONE
764x_libraries=NONE
765
766# Installation directory options.
767# These are left unexpanded so users can "make install exec_prefix=/foo"
768# and all the variables that are supposed to be based on exec_prefix
769# by default will actually change.
770# Use braces instead of parens because sh, perl, etc. also accept them.
771# (The list follows the same order as the GNU Coding Standards.)
772bindir='${exec_prefix}/bin'
773sbindir='${exec_prefix}/sbin'
774libexecdir='${exec_prefix}/libexec'
775datarootdir='${prefix}/share'
776datadir='${datarootdir}'
777sysconfdir='${prefix}/etc'
778sharedstatedir='${prefix}/com'
779localstatedir='${prefix}/var'
780includedir='${prefix}/include'
781oldincludedir='/usr/include'
782docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
783infodir='${datarootdir}/info'
784htmldir='${docdir}'
785dvidir='${docdir}'
786pdfdir='${docdir}'
787psdir='${docdir}'
788libdir='${exec_prefix}/lib'
789localedir='${datarootdir}/locale'
790mandir='${datarootdir}/man'
791
792ac_prev=
793ac_dashdash=
794for ac_option
795do
796  # If the previous option needs an argument, assign it.
797  if test -n "$ac_prev"; then
798    eval $ac_prev=\$ac_option
799    ac_prev=
800    continue
801  fi
802
803  case $ac_option in
804  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
805  *)	ac_optarg=yes ;;
806  esac
807
808  # Accept the important Cygnus configure options, so we can diagnose typos.
809
810  case $ac_dashdash$ac_option in
811  --)
812    ac_dashdash=yes ;;
813
814  -bindir | --bindir | --bindi | --bind | --bin | --bi)
815    ac_prev=bindir ;;
816  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
817    bindir=$ac_optarg ;;
818
819  -build | --build | --buil | --bui | --bu)
820    ac_prev=build_alias ;;
821  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
822    build_alias=$ac_optarg ;;
823
824  -cache-file | --cache-file | --cache-fil | --cache-fi \
825  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
826    ac_prev=cache_file ;;
827  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
828  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
829    cache_file=$ac_optarg ;;
830
831  --config-cache | -C)
832    cache_file=config.cache ;;
833
834  -datadir | --datadir | --datadi | --datad)
835    ac_prev=datadir ;;
836  -datadir=* | --datadir=* | --datadi=* | --datad=*)
837    datadir=$ac_optarg ;;
838
839  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
840  | --dataroo | --dataro | --datar)
841    ac_prev=datarootdir ;;
842  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
843  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
844    datarootdir=$ac_optarg ;;
845
846  -disable-* | --disable-*)
847    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
848    # Reject names that are not valid shell variable names.
849    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
850      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
851   { (exit 1); exit 1; }; }
852    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
853    eval enable_$ac_feature=no ;;
854
855  -docdir | --docdir | --docdi | --doc | --do)
856    ac_prev=docdir ;;
857  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
858    docdir=$ac_optarg ;;
859
860  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
861    ac_prev=dvidir ;;
862  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
863    dvidir=$ac_optarg ;;
864
865  -enable-* | --enable-*)
866    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
867    # Reject names that are not valid shell variable names.
868    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
869      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
870   { (exit 1); exit 1; }; }
871    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
872    eval enable_$ac_feature=\$ac_optarg ;;
873
874  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
875  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
876  | --exec | --exe | --ex)
877    ac_prev=exec_prefix ;;
878  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
879  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
880  | --exec=* | --exe=* | --ex=*)
881    exec_prefix=$ac_optarg ;;
882
883  -gas | --gas | --ga | --g)
884    # Obsolete; use --with-gas.
885    with_gas=yes ;;
886
887  -help | --help | --hel | --he | -h)
888    ac_init_help=long ;;
889  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
890    ac_init_help=recursive ;;
891  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
892    ac_init_help=short ;;
893
894  -host | --host | --hos | --ho)
895    ac_prev=host_alias ;;
896  -host=* | --host=* | --hos=* | --ho=*)
897    host_alias=$ac_optarg ;;
898
899  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
900    ac_prev=htmldir ;;
901  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
902  | --ht=*)
903    htmldir=$ac_optarg ;;
904
905  -includedir | --includedir | --includedi | --included | --include \
906  | --includ | --inclu | --incl | --inc)
907    ac_prev=includedir ;;
908  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
909  | --includ=* | --inclu=* | --incl=* | --inc=*)
910    includedir=$ac_optarg ;;
911
912  -infodir | --infodir | --infodi | --infod | --info | --inf)
913    ac_prev=infodir ;;
914  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
915    infodir=$ac_optarg ;;
916
917  -libdir | --libdir | --libdi | --libd)
918    ac_prev=libdir ;;
919  -libdir=* | --libdir=* | --libdi=* | --libd=*)
920    libdir=$ac_optarg ;;
921
922  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
923  | --libexe | --libex | --libe)
924    ac_prev=libexecdir ;;
925  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
926  | --libexe=* | --libex=* | --libe=*)
927    libexecdir=$ac_optarg ;;
928
929  -localedir | --localedir | --localedi | --localed | --locale)
930    ac_prev=localedir ;;
931  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
932    localedir=$ac_optarg ;;
933
934  -localstatedir | --localstatedir | --localstatedi | --localstated \
935  | --localstate | --localstat | --localsta | --localst | --locals)
936    ac_prev=localstatedir ;;
937  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
938  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
939    localstatedir=$ac_optarg ;;
940
941  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
942    ac_prev=mandir ;;
943  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
944    mandir=$ac_optarg ;;
945
946  -nfp | --nfp | --nf)
947    # Obsolete; use --without-fp.
948    with_fp=no ;;
949
950  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
951  | --no-cr | --no-c | -n)
952    no_create=yes ;;
953
954  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
955  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
956    no_recursion=yes ;;
957
958  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
959  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
960  | --oldin | --oldi | --old | --ol | --o)
961    ac_prev=oldincludedir ;;
962  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
963  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
964  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
965    oldincludedir=$ac_optarg ;;
966
967  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
968    ac_prev=prefix ;;
969  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
970    prefix=$ac_optarg ;;
971
972  -program-prefix | --program-prefix | --program-prefi | --program-pref \
973  | --program-pre | --program-pr | --program-p)
974    ac_prev=program_prefix ;;
975  -program-prefix=* | --program-prefix=* | --program-prefi=* \
976  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
977    program_prefix=$ac_optarg ;;
978
979  -program-suffix | --program-suffix | --program-suffi | --program-suff \
980  | --program-suf | --program-su | --program-s)
981    ac_prev=program_suffix ;;
982  -program-suffix=* | --program-suffix=* | --program-suffi=* \
983  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
984    program_suffix=$ac_optarg ;;
985
986  -program-transform-name | --program-transform-name \
987  | --program-transform-nam | --program-transform-na \
988  | --program-transform-n | --program-transform- \
989  | --program-transform | --program-transfor \
990  | --program-transfo | --program-transf \
991  | --program-trans | --program-tran \
992  | --progr-tra | --program-tr | --program-t)
993    ac_prev=program_transform_name ;;
994  -program-transform-name=* | --program-transform-name=* \
995  | --program-transform-nam=* | --program-transform-na=* \
996  | --program-transform-n=* | --program-transform-=* \
997  | --program-transform=* | --program-transfor=* \
998  | --program-transfo=* | --program-transf=* \
999  | --program-trans=* | --program-tran=* \
1000  | --progr-tra=* | --program-tr=* | --program-t=*)
1001    program_transform_name=$ac_optarg ;;
1002
1003  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1004    ac_prev=pdfdir ;;
1005  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1006    pdfdir=$ac_optarg ;;
1007
1008  -psdir | --psdir | --psdi | --psd | --ps)
1009    ac_prev=psdir ;;
1010  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1011    psdir=$ac_optarg ;;
1012
1013  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1014  | -silent | --silent | --silen | --sile | --sil)
1015    silent=yes ;;
1016
1017  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1018    ac_prev=sbindir ;;
1019  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1020  | --sbi=* | --sb=*)
1021    sbindir=$ac_optarg ;;
1022
1023  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1024  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1025  | --sharedst | --shareds | --shared | --share | --shar \
1026  | --sha | --sh)
1027    ac_prev=sharedstatedir ;;
1028  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1029  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1030  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1031  | --sha=* | --sh=*)
1032    sharedstatedir=$ac_optarg ;;
1033
1034  -site | --site | --sit)
1035    ac_prev=site ;;
1036  -site=* | --site=* | --sit=*)
1037    site=$ac_optarg ;;
1038
1039  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1040    ac_prev=srcdir ;;
1041  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1042    srcdir=$ac_optarg ;;
1043
1044  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1045  | --syscon | --sysco | --sysc | --sys | --sy)
1046    ac_prev=sysconfdir ;;
1047  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1048  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1049    sysconfdir=$ac_optarg ;;
1050
1051  -target | --target | --targe | --targ | --tar | --ta | --t)
1052    ac_prev=target_alias ;;
1053  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1054    target_alias=$ac_optarg ;;
1055
1056  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1057    verbose=yes ;;
1058
1059  -version | --version | --versio | --versi | --vers | -V)
1060    ac_init_version=: ;;
1061
1062  -with-* | --with-*)
1063    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1064    # Reject names that are not valid shell variable names.
1065    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1066      { echo "$as_me: error: invalid package name: $ac_package" >&2
1067   { (exit 1); exit 1; }; }
1068    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1069    eval with_$ac_package=\$ac_optarg ;;
1070
1071  -without-* | --without-*)
1072    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1073    # Reject names that are not valid shell variable names.
1074    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1075      { echo "$as_me: error: invalid package name: $ac_package" >&2
1076   { (exit 1); exit 1; }; }
1077    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1078    eval with_$ac_package=no ;;
1079
1080  --x)
1081    # Obsolete; use --with-x.
1082    with_x=yes ;;
1083
1084  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1085  | --x-incl | --x-inc | --x-in | --x-i)
1086    ac_prev=x_includes ;;
1087  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1088  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1089    x_includes=$ac_optarg ;;
1090
1091  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1092  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1093    ac_prev=x_libraries ;;
1094  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1095  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1096    x_libraries=$ac_optarg ;;
1097
1098  -*) { echo "$as_me: error: unrecognized option: $ac_option
1099Try \`$0 --help' for more information." >&2
1100   { (exit 1); exit 1; }; }
1101    ;;
1102
1103  *=*)
1104    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1105    # Reject names that are not valid shell variable names.
1106    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1107      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1108   { (exit 1); exit 1; }; }
1109    eval $ac_envvar=\$ac_optarg
1110    export $ac_envvar ;;
1111
1112  *)
1113    # FIXME: should be removed in autoconf 3.0.
1114    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1115    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1116      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1117    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1118    ;;
1119
1120  esac
1121done
1122
1123if test -n "$ac_prev"; then
1124  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1125  { echo "$as_me: error: missing argument to $ac_option" >&2
1126   { (exit 1); exit 1; }; }
1127fi
1128
1129# Be sure to have absolute directory names.
1130for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1131		datadir sysconfdir sharedstatedir localstatedir includedir \
1132		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1133		libdir localedir mandir
1134do
1135  eval ac_val=\$$ac_var
1136  case $ac_val in
1137    [\\/$]* | ?:[\\/]* )  continue;;
1138    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1139  esac
1140  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1141   { (exit 1); exit 1; }; }
1142done
1143
1144# There might be people who depend on the old broken behavior: `$host'
1145# used to hold the argument of --host etc.
1146# FIXME: To remove some day.
1147build=$build_alias
1148host=$host_alias
1149target=$target_alias
1150
1151# FIXME: To remove some day.
1152if test "x$host_alias" != x; then
1153  if test "x$build_alias" = x; then
1154    cross_compiling=maybe
1155    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1156    If a cross compiler is detected then cross compile mode will be used." >&2
1157  elif test "x$build_alias" != "x$host_alias"; then
1158    cross_compiling=yes
1159  fi
1160fi
1161
1162ac_tool_prefix=
1163test -n "$host_alias" && ac_tool_prefix=$host_alias-
1164
1165test "$silent" = yes && exec 6>/dev/null
1166
1167
1168ac_pwd=`pwd` && test -n "$ac_pwd" &&
1169ac_ls_di=`ls -di .` &&
1170ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1171  { echo "$as_me: error: Working directory cannot be determined" >&2
1172   { (exit 1); exit 1; }; }
1173test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1174  { echo "$as_me: error: pwd does not report name of working directory" >&2
1175   { (exit 1); exit 1; }; }
1176
1177
1178# Find the source files, if location was not specified.
1179if test -z "$srcdir"; then
1180  ac_srcdir_defaulted=yes
1181  # Try the directory containing this script, then the parent directory.
1182  ac_confdir=`$as_dirname -- "$0" ||
1183$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1184	 X"$0" : 'X\(//\)[^/]' \| \
1185	 X"$0" : 'X\(//\)$' \| \
1186	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1187echo X"$0" |
1188    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1189	    s//\1/
1190	    q
1191	  }
1192	  /^X\(\/\/\)[^/].*/{
1193	    s//\1/
1194	    q
1195	  }
1196	  /^X\(\/\/\)$/{
1197	    s//\1/
1198	    q
1199	  }
1200	  /^X\(\/\).*/{
1201	    s//\1/
1202	    q
1203	  }
1204	  s/.*/./; q'`
1205  srcdir=$ac_confdir
1206  if test ! -r "$srcdir/$ac_unique_file"; then
1207    srcdir=..
1208  fi
1209else
1210  ac_srcdir_defaulted=no
1211fi
1212if test ! -r "$srcdir/$ac_unique_file"; then
1213  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1214  { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1215   { (exit 1); exit 1; }; }
1216fi
1217ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1218ac_abs_confdir=`(
1219	cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
1220   { (exit 1); exit 1; }; }
1221	pwd)`
1222# When building in place, set srcdir=.
1223if test "$ac_abs_confdir" = "$ac_pwd"; then
1224  srcdir=.
1225fi
1226# Remove unnecessary trailing slashes from srcdir.
1227# Double slashes in file names in object file debugging info
1228# mess up M-x gdb in Emacs.
1229case $srcdir in
1230*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1231esac
1232for ac_var in $ac_precious_vars; do
1233  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1234  eval ac_env_${ac_var}_value=\$${ac_var}
1235  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1236  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1237done
1238
1239#
1240# Report the --help message.
1241#
1242if test "$ac_init_help" = "long"; then
1243  # Omit some internal or obsolete options to make the list less imposing.
1244  # This message is too long to be a string in the A/UX 3.1 sh.
1245  cat <<_ACEOF
1246\`configure' configures snack 2.2 to adapt to many kinds of systems.
1247
1248Usage: $0 [OPTION]... [VAR=VALUE]...
1249
1250To assign environment variables (e.g., CC, CFLAGS...), specify them as
1251VAR=VALUE.  See below for descriptions of some of the useful variables.
1252
1253Defaults for the options are specified in brackets.
1254
1255Configuration:
1256  -h, --help              display this help and exit
1257      --help=short        display options specific to this package
1258      --help=recursive    display the short help of all the included packages
1259  -V, --version           display version information and exit
1260  -q, --quiet, --silent   do not print \`checking...' messages
1261      --cache-file=FILE   cache test results in FILE [disabled]
1262  -C, --config-cache      alias for \`--cache-file=config.cache'
1263  -n, --no-create         do not create output files
1264      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1265
1266Installation directories:
1267  --prefix=PREFIX         install architecture-independent files in PREFIX
1268			  [$ac_default_prefix]
1269  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1270			  [PREFIX]
1271
1272By default, \`make install' will install all the files in
1273\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1274an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1275for instance \`--prefix=\$HOME'.
1276
1277For better control, use the options below.
1278
1279Fine tuning of the installation directories:
1280  --bindir=DIR           user executables [EPREFIX/bin]
1281  --sbindir=DIR          system admin executables [EPREFIX/sbin]
1282  --libexecdir=DIR       program executables [EPREFIX/libexec]
1283  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
1284  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
1285  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
1286  --libdir=DIR           object code libraries [EPREFIX/lib]
1287  --includedir=DIR       C header files [PREFIX/include]
1288  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
1289  --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
1290  --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
1291  --infodir=DIR          info documentation [DATAROOTDIR/info]
1292  --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
1293  --mandir=DIR           man documentation [DATAROOTDIR/man]
1294  --docdir=DIR           documentation root [DATAROOTDIR/doc/snack]
1295  --htmldir=DIR          html documentation [DOCDIR]
1296  --dvidir=DIR           dvi documentation [DOCDIR]
1297  --pdfdir=DIR           pdf documentation [DOCDIR]
1298  --psdir=DIR            ps documentation [DOCDIR]
1299_ACEOF
1300
1301  cat <<\_ACEOF
1302_ACEOF
1303fi
1304
1305if test -n "$ac_init_help"; then
1306  case $ac_init_help in
1307     short | recursive ) echo "Configuration of snack 2.2:";;
1308   esac
1309  cat <<\_ACEOF
1310
1311Optional Features:
1312  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1313  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1314  --enable-threads        build with threads
1315  --enable-shared         build and link with shared libraries (default: on)
1316  --enable-64bit          enable 64bit support (default: off)
1317  --enable-64bit-vis      enable 64bit Sparc VIS support (default: off)
1318  --disable-rpath         disable rpath support (default: on)
1319  --enable-wince          enable Win/CE support (where applicable)
1320  --enable-alsa           enable ALSA support
1321  --enable-symbols        build with debugging symbols (default: off)
1322
1323Optional Packages:
1324  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1325  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1326  --with-tcl              directory containing tcl configuration
1327                          (tclConfig.sh)
1328  --with-tk               directory containing tk configuration (tkConfig.sh)
1329  --with-tclinclude       directory containing the public Tcl header files
1330  --with-tkinclude        directory containing the public Tk header files
1331  --with-celib=DIR        use Windows/CE support library from DIR
1332
1333Some influential environment variables:
1334  CC          C compiler command
1335  CFLAGS      C compiler flags
1336  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1337              nonstandard directory <lib dir>
1338  LIBS        libraries to pass to the linker, e.g. -l<library>
1339  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1340              you have headers in a nonstandard directory <include dir>
1341  CPP         C preprocessor
1342
1343Use these variables to override the choices made by `configure' or to help
1344it to find libraries and programs with nonstandard names/locations.
1345
1346_ACEOF
1347ac_status=$?
1348fi
1349
1350if test "$ac_init_help" = "recursive"; then
1351  # If there are subdirs, report their specific --help.
1352  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1353    test -d "$ac_dir" || continue
1354    ac_builddir=.
1355
1356case "$ac_dir" in
1357.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1358*)
1359  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
1360  # A ".." for each directory in $ac_dir_suffix.
1361  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1362  case $ac_top_builddir_sub in
1363  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1364  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1365  esac ;;
1366esac
1367ac_abs_top_builddir=$ac_pwd
1368ac_abs_builddir=$ac_pwd$ac_dir_suffix
1369# for backward compatibility:
1370ac_top_builddir=$ac_top_build_prefix
1371
1372case $srcdir in
1373  .)  # We are building in place.
1374    ac_srcdir=.
1375    ac_top_srcdir=$ac_top_builddir_sub
1376    ac_abs_top_srcdir=$ac_pwd ;;
1377  [\\/]* | ?:[\\/]* )  # Absolute name.
1378    ac_srcdir=$srcdir$ac_dir_suffix;
1379    ac_top_srcdir=$srcdir
1380    ac_abs_top_srcdir=$srcdir ;;
1381  *) # Relative name.
1382    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1383    ac_top_srcdir=$ac_top_build_prefix$srcdir
1384    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1385esac
1386ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1387
1388    cd "$ac_dir" || { ac_status=$?; continue; }
1389    # Check for guested configure.
1390    if test -f "$ac_srcdir/configure.gnu"; then
1391      echo &&
1392      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1393    elif test -f "$ac_srcdir/configure"; then
1394      echo &&
1395      $SHELL "$ac_srcdir/configure" --help=recursive
1396    else
1397      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1398    fi || ac_status=$?
1399    cd "$ac_pwd" || { ac_status=$?; break; }
1400  done
1401fi
1402
1403test -n "$ac_init_help" && exit $ac_status
1404if $ac_init_version; then
1405  cat <<\_ACEOF
1406snack configure 2.2
1407generated by GNU Autoconf 2.61
1408
1409Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14102002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1411This configure script is free software; the Free Software Foundation
1412gives unlimited permission to copy, distribute and modify it.
1413_ACEOF
1414  exit
1415fi
1416cat >config.log <<_ACEOF
1417This file contains any messages produced by compilers while
1418running configure, to aid debugging if configure makes a mistake.
1419
1420It was created by snack $as_me 2.2, which was
1421generated by GNU Autoconf 2.61.  Invocation command line was
1422
1423  $ $0 $@
1424
1425_ACEOF
1426exec 5>>config.log
1427{
1428cat <<_ASUNAME
1429## --------- ##
1430## Platform. ##
1431## --------- ##
1432
1433hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1434uname -m = `(uname -m) 2>/dev/null || echo unknown`
1435uname -r = `(uname -r) 2>/dev/null || echo unknown`
1436uname -s = `(uname -s) 2>/dev/null || echo unknown`
1437uname -v = `(uname -v) 2>/dev/null || echo unknown`
1438
1439/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1440/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1441
1442/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1443/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1444/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1445/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1446/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1447/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1448/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1449
1450_ASUNAME
1451
1452as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1453for as_dir in $PATH
1454do
1455  IFS=$as_save_IFS
1456  test -z "$as_dir" && as_dir=.
1457  echo "PATH: $as_dir"
1458done
1459IFS=$as_save_IFS
1460
1461} >&5
1462
1463cat >&5 <<_ACEOF
1464
1465
1466## ----------- ##
1467## Core tests. ##
1468## ----------- ##
1469
1470_ACEOF
1471
1472
1473# Keep a trace of the command line.
1474# Strip out --no-create and --no-recursion so they do not pile up.
1475# Strip out --silent because we don't want to record it for future runs.
1476# Also quote any args containing shell meta-characters.
1477# Make two passes to allow for proper duplicate-argument suppression.
1478ac_configure_args=
1479ac_configure_args0=
1480ac_configure_args1=
1481ac_must_keep_next=false
1482for ac_pass in 1 2
1483do
1484  for ac_arg
1485  do
1486    case $ac_arg in
1487    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1488    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1489    | -silent | --silent | --silen | --sile | --sil)
1490      continue ;;
1491    *\'*)
1492      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1493    esac
1494    case $ac_pass in
1495    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1496    2)
1497      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1498      if test $ac_must_keep_next = true; then
1499	ac_must_keep_next=false # Got value, back to normal.
1500      else
1501	case $ac_arg in
1502	  *=* | --config-cache | -C | -disable-* | --disable-* \
1503	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1504	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1505	  | -with-* | --with-* | -without-* | --without-* | --x)
1506	    case "$ac_configure_args0 " in
1507	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1508	    esac
1509	    ;;
1510	  -* ) ac_must_keep_next=true ;;
1511	esac
1512      fi
1513      ac_configure_args="$ac_configure_args '$ac_arg'"
1514      ;;
1515    esac
1516  done
1517done
1518$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1519$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1520
1521# When interrupted or exit'd, cleanup temporary files, and complete
1522# config.log.  We remove comments because anyway the quotes in there
1523# would cause problems or look ugly.
1524# WARNING: Use '\'' to represent an apostrophe within the trap.
1525# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1526trap 'exit_status=$?
1527  # Save into config.log some information that might help in debugging.
1528  {
1529    echo
1530
1531    cat <<\_ASBOX
1532## ---------------- ##
1533## Cache variables. ##
1534## ---------------- ##
1535_ASBOX
1536    echo
1537    # The following way of writing the cache mishandles newlines in values,
1538(
1539  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1540    eval ac_val=\$$ac_var
1541    case $ac_val in #(
1542    *${as_nl}*)
1543      case $ac_var in #(
1544      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1545echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1546      esac
1547      case $ac_var in #(
1548      _ | IFS | as_nl) ;; #(
1549      *) $as_unset $ac_var ;;
1550      esac ;;
1551    esac
1552  done
1553  (set) 2>&1 |
1554    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1555    *${as_nl}ac_space=\ *)
1556      sed -n \
1557	"s/'\''/'\''\\\\'\'''\''/g;
1558	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1559      ;; #(
1560    *)
1561      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1562      ;;
1563    esac |
1564    sort
1565)
1566    echo
1567
1568    cat <<\_ASBOX
1569## ----------------- ##
1570## Output variables. ##
1571## ----------------- ##
1572_ASBOX
1573    echo
1574    for ac_var in $ac_subst_vars
1575    do
1576      eval ac_val=\$$ac_var
1577      case $ac_val in
1578      *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1579      esac
1580      echo "$ac_var='\''$ac_val'\''"
1581    done | sort
1582    echo
1583
1584    if test -n "$ac_subst_files"; then
1585      cat <<\_ASBOX
1586## ------------------- ##
1587## File substitutions. ##
1588## ------------------- ##
1589_ASBOX
1590      echo
1591      for ac_var in $ac_subst_files
1592      do
1593	eval ac_val=\$$ac_var
1594	case $ac_val in
1595	*\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1596	esac
1597	echo "$ac_var='\''$ac_val'\''"
1598      done | sort
1599      echo
1600    fi
1601
1602    if test -s confdefs.h; then
1603      cat <<\_ASBOX
1604## ----------- ##
1605## confdefs.h. ##
1606## ----------- ##
1607_ASBOX
1608      echo
1609      cat confdefs.h
1610      echo
1611    fi
1612    test "$ac_signal" != 0 &&
1613      echo "$as_me: caught signal $ac_signal"
1614    echo "$as_me: exit $exit_status"
1615  } >&5
1616  rm -f core *.core core.conftest.* &&
1617    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1618    exit $exit_status
1619' 0
1620for ac_signal in 1 2 13 15; do
1621  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1622done
1623ac_signal=0
1624
1625# confdefs.h avoids OS command line length limits that DEFS can exceed.
1626rm -f -r conftest* confdefs.h
1627
1628# Predefined preprocessor variables.
1629
1630cat >>confdefs.h <<_ACEOF
1631#define PACKAGE_NAME "$PACKAGE_NAME"
1632_ACEOF
1633
1634
1635cat >>confdefs.h <<_ACEOF
1636#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1637_ACEOF
1638
1639
1640cat >>confdefs.h <<_ACEOF
1641#define PACKAGE_VERSION "$PACKAGE_VERSION"
1642_ACEOF
1643
1644
1645cat >>confdefs.h <<_ACEOF
1646#define PACKAGE_STRING "$PACKAGE_STRING"
1647_ACEOF
1648
1649
1650cat >>confdefs.h <<_ACEOF
1651#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1652_ACEOF
1653
1654
1655# Let the site file select an alternate cache file if it wants to.
1656# Prefer explicitly selected file to automatically selected ones.
1657if test -n "$CONFIG_SITE"; then
1658  set x "$CONFIG_SITE"
1659elif test "x$prefix" != xNONE; then
1660  set x "$prefix/share/config.site" "$prefix/etc/config.site"
1661else
1662  set x "$ac_default_prefix/share/config.site" \
1663	"$ac_default_prefix/etc/config.site"
1664fi
1665shift
1666for ac_site_file
1667do
1668  if test -r "$ac_site_file"; then
1669    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1670echo "$as_me: loading site script $ac_site_file" >&6;}
1671    sed 's/^/| /' "$ac_site_file" >&5
1672    . "$ac_site_file"
1673  fi
1674done
1675
1676if test -r "$cache_file"; then
1677  # Some versions of bash will fail to source /dev/null (special
1678  # files actually), so we avoid doing that.
1679  if test -f "$cache_file"; then
1680    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1681echo "$as_me: loading cache $cache_file" >&6;}
1682    case $cache_file in
1683      [\\/]* | ?:[\\/]* ) . "$cache_file";;
1684      *)                      . "./$cache_file";;
1685    esac
1686  fi
1687else
1688  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1689echo "$as_me: creating cache $cache_file" >&6;}
1690  >$cache_file
1691fi
1692
1693# Check that the precious variables saved in the cache have kept the same
1694# value.
1695ac_cache_corrupted=false
1696for ac_var in $ac_precious_vars; do
1697  eval ac_old_set=\$ac_cv_env_${ac_var}_set
1698  eval ac_new_set=\$ac_env_${ac_var}_set
1699  eval ac_old_val=\$ac_cv_env_${ac_var}_value
1700  eval ac_new_val=\$ac_env_${ac_var}_value
1701  case $ac_old_set,$ac_new_set in
1702    set,)
1703      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1704echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1705      ac_cache_corrupted=: ;;
1706    ,set)
1707      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1708echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1709      ac_cache_corrupted=: ;;
1710    ,);;
1711    *)
1712      if test "x$ac_old_val" != "x$ac_new_val"; then
1713	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1714echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1715	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1716echo "$as_me:   former value:  $ac_old_val" >&2;}
1717	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1718echo "$as_me:   current value: $ac_new_val" >&2;}
1719	ac_cache_corrupted=:
1720      fi;;
1721  esac
1722  # Pass precious variables to config.status.
1723  if test "$ac_new_set" = set; then
1724    case $ac_new_val in
1725    *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1726    *) ac_arg=$ac_var=$ac_new_val ;;
1727    esac
1728    case " $ac_configure_args " in
1729      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1730      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1731    esac
1732  fi
1733done
1734if $ac_cache_corrupted; then
1735  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1736echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1737  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1738echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1739   { (exit 1); exit 1; }; }
1740fi
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766ac_ext=c
1767ac_cpp='$CPP $CPPFLAGS'
1768ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1769ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1770ac_compiler_gnu=$ac_cv_c_compiler_gnu
1771
1772
1773
1774#--------------------------------------------------------------------
1775# Call TEA_INIT as the first TEA_ macro to set up initial vars.
1776# This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
1777# as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
1778#--------------------------------------------------------------------
1779
1780
1781    # TEA extensions pass this us the version of TEA they think they
1782    # are compatible with.
1783    TEA_VERSION="3.9"
1784
1785    { echo "$as_me:$LINENO: checking for correct TEA configuration" >&5
1786echo $ECHO_N "checking for correct TEA configuration... $ECHO_C" >&6; }
1787    if test x"${PACKAGE_NAME}" = x ; then
1788	{ { echo "$as_me:$LINENO: error:
1789The PACKAGE_NAME variable must be defined by your TEA configure.in" >&5
1790echo "$as_me: error:
1791The PACKAGE_NAME variable must be defined by your TEA configure.in" >&2;}
1792   { (exit 1); exit 1; }; }
1793    fi
1794    if test x"3.9" = x ; then
1795	{ { echo "$as_me:$LINENO: error:
1796TEA version not specified." >&5
1797echo "$as_me: error:
1798TEA version not specified." >&2;}
1799   { (exit 1); exit 1; }; }
1800    elif test "3.9" != "${TEA_VERSION}" ; then
1801	{ echo "$as_me:$LINENO: result: warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&5
1802echo "${ECHO_T}warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&6; }
1803    else
1804	{ echo "$as_me:$LINENO: result: ok (TEA ${TEA_VERSION})" >&5
1805echo "${ECHO_T}ok (TEA ${TEA_VERSION})" >&6; }
1806    fi
1807    case "`uname -s`" in
1808	*win32*|*WIN32*|*MINGW32_*)
1809	    # Extract the first word of "cygpath", so it can be a program name with args.
1810set dummy cygpath; ac_word=$2
1811{ echo "$as_me:$LINENO: checking for $ac_word" >&5
1812echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
1813if test "${ac_cv_prog_CYGPATH+set}" = set; then
1814  echo $ECHO_N "(cached) $ECHO_C" >&6
1815else
1816  if test -n "$CYGPATH"; then
1817  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
1818else
1819as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1820for as_dir in $PATH
1821do
1822  IFS=$as_save_IFS
1823  test -z "$as_dir" && as_dir=.
1824  for ac_exec_ext in '' $ac_executable_extensions; do
1825  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
1826    ac_cv_prog_CYGPATH="cygpath -w"
1827    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1828    break 2
1829  fi
1830done
1831done
1832IFS=$as_save_IFS
1833
1834  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
1835fi
1836fi
1837CYGPATH=$ac_cv_prog_CYGPATH
1838if test -n "$CYGPATH"; then
1839  { echo "$as_me:$LINENO: result: $CYGPATH" >&5
1840echo "${ECHO_T}$CYGPATH" >&6; }
1841else
1842  { echo "$as_me:$LINENO: result: no" >&5
1843echo "${ECHO_T}no" >&6; }
1844fi
1845
1846
1847	    EXEEXT=".exe"
1848	    TEA_PLATFORM="windows"
1849	    ;;
1850	*CYGWIN_*)
1851	    CYGPATH=echo
1852	    EXEEXT=".exe"
1853	    # TEA_PLATFORM is determined later in LOAD_TCLCONFIG
1854	    ;;
1855	*)
1856	    CYGPATH=echo
1857	    EXEEXT=""
1858	    TEA_PLATFORM="unix"
1859	    ;;
1860    esac
1861
1862    # Check if exec_prefix is set. If not use fall back to prefix.
1863    # Note when adjusted, so that TEA_PREFIX can correct for this.
1864    # This is needed for recursive configures, since autoconf propagates
1865    # $prefix, but not $exec_prefix (doh!).
1866    if test x$exec_prefix = xNONE ; then
1867	exec_prefix_default=yes
1868	exec_prefix=$prefix
1869    fi
1870
1871
1872
1873
1874    # This package name must be replaced statically for AC_SUBST to work
1875
1876    # Substitute STUB_LIB_FILE in case package creates a stub library too.
1877
1878
1879    # We AC_SUBST these here to ensure they are subst'ed,
1880    # in case the user doesn't call TEA_ADD_...
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890ac_aux_dir=
1891for ac_dir in tclconfig "$srcdir"/tclconfig; do
1892  if test -f "$ac_dir/install-sh"; then
1893    ac_aux_dir=$ac_dir
1894    ac_install_sh="$ac_aux_dir/install-sh -c"
1895    break
1896  elif test -f "$ac_dir/install.sh"; then
1897    ac_aux_dir=$ac_dir
1898    ac_install_sh="$ac_aux_dir/install.sh -c"
1899    break
1900  elif test -f "$ac_dir/shtool"; then
1901    ac_aux_dir=$ac_dir
1902    ac_install_sh="$ac_aux_dir/shtool install -c"
1903    break
1904  fi
1905done
1906if test -z "$ac_aux_dir"; then
1907  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in tclconfig \"$srcdir\"/tclconfig" >&5
1908echo "$as_me: error: cannot find install-sh or install.sh in tclconfig \"$srcdir\"/tclconfig" >&2;}
1909   { (exit 1); exit 1; }; }
1910fi
1911
1912# These three variables are undocumented and unsupported,
1913# and are intended to be withdrawn in a future Autoconf release.
1914# They can cause serious problems if a builder's source tree is in a directory
1915# whose full name contains unusual characters.
1916ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
1917ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
1918ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
1919
1920
1921
1922#--------------------------------------------------------------------
1923# Load the tclConfig.sh file
1924#--------------------------------------------------------------------
1925
1926
1927
1928    #
1929    # Ok, lets find the tcl configuration
1930    # First, look for one uninstalled.
1931    # the alternative search directory is invoked by --with-tcl
1932    #
1933
1934    if test x"${no_tcl}" = x ; then
1935	# we reset no_tcl in case something fails here
1936	no_tcl=true
1937
1938# Check whether --with-tcl was given.
1939if test "${with_tcl+set}" = set; then
1940  withval=$with_tcl; with_tclconfig="${withval}"
1941fi
1942
1943	{ echo "$as_me:$LINENO: checking for Tcl configuration" >&5
1944echo $ECHO_N "checking for Tcl configuration... $ECHO_C" >&6; }
1945	if test "${ac_cv_c_tclconfig+set}" = set; then
1946  echo $ECHO_N "(cached) $ECHO_C" >&6
1947else
1948
1949
1950	    # First check to see if --with-tcl was specified.
1951	    if test x"${with_tclconfig}" != x ; then
1952		case "${with_tclconfig}" in
1953		    */tclConfig.sh )
1954			if test -f "${with_tclconfig}"; then
1955			    { echo "$as_me:$LINENO: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&5
1956echo "$as_me: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&2;}
1957			    with_tclconfig="`echo "${with_tclconfig}" | sed 's!/tclConfig\.sh$!!'`"
1958			fi ;;
1959		esac
1960		if test -f "${with_tclconfig}/tclConfig.sh" ; then
1961		    ac_cv_c_tclconfig="`(cd "${with_tclconfig}"; pwd)`"
1962		else
1963		    { { echo "$as_me:$LINENO: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&5
1964echo "$as_me: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&2;}
1965   { (exit 1); exit 1; }; }
1966		fi
1967	    fi
1968
1969	    # then check for a private Tcl installation
1970	    if test x"${ac_cv_c_tclconfig}" = x ; then
1971		for i in \
1972			../tcl \
1973			`ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
1974			`ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
1975			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
1976			../../tcl \
1977			`ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
1978			`ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
1979			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
1980			../../../tcl \
1981			`ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
1982			`ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
1983			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
1984		    if test "${TEA_PLATFORM}" = "windows" \
1985			    -a -f "$i/win/tclConfig.sh" ; then
1986			ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
1987			break
1988		    fi
1989		    if test -f "$i/unix/tclConfig.sh" ; then
1990			ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
1991			break
1992		    fi
1993		done
1994	    fi
1995
1996	    # on Darwin, check in Framework installation locations
1997	    if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
1998		for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
1999			`ls -d /Library/Frameworks 2>/dev/null` \
2000			`ls -d /Network/Library/Frameworks 2>/dev/null` \
2001			`ls -d /System/Library/Frameworks 2>/dev/null` \
2002			; do
2003		    if test -f "$i/Tcl.framework/tclConfig.sh" ; then
2004			ac_cv_c_tclconfig="`(cd $i/Tcl.framework; pwd)`"
2005			break
2006		    fi
2007		done
2008	    fi
2009
2010	    # TEA specific: on Windows, check in common installation locations
2011	    if test "${TEA_PLATFORM}" = "windows" \
2012		-a x"${ac_cv_c_tclconfig}" = x ; then
2013		for i in `ls -d C:/Tcl/lib 2>/dev/null` \
2014			`ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
2015			; do
2016		    if test -f "$i/tclConfig.sh" ; then
2017			ac_cv_c_tclconfig="`(cd $i; pwd)`"
2018			break
2019		    fi
2020		done
2021	    fi
2022
2023	    # check in a few common install locations
2024	    if test x"${ac_cv_c_tclconfig}" = x ; then
2025		for i in `ls -d ${libdir} 2>/dev/null` \
2026			`ls -d ${exec_prefix}/lib 2>/dev/null` \
2027			`ls -d ${prefix}/lib 2>/dev/null` \
2028			`ls -d /usr/local/lib 2>/dev/null` \
2029			`ls -d /usr/contrib/lib 2>/dev/null` \
2030			`ls -d /usr/lib 2>/dev/null` \
2031			`ls -d /usr/lib64 2>/dev/null` \
2032			; do
2033		    if test -f "$i/tclConfig.sh" ; then
2034			ac_cv_c_tclconfig="`(cd $i; pwd)`"
2035			break
2036		    fi
2037		done
2038	    fi
2039
2040	    # check in a few other private locations
2041	    if test x"${ac_cv_c_tclconfig}" = x ; then
2042		for i in \
2043			${srcdir}/../tcl \
2044			`ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2045			`ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
2046			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
2047		    if test "${TEA_PLATFORM}" = "windows" \
2048			    -a -f "$i/win/tclConfig.sh" ; then
2049			ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
2050			break
2051		    fi
2052		    if test -f "$i/unix/tclConfig.sh" ; then
2053			ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
2054			break
2055		    fi
2056		done
2057	    fi
2058
2059fi
2060
2061
2062	if test x"${ac_cv_c_tclconfig}" = x ; then
2063	    TCL_BIN_DIR="# no Tcl configs found"
2064	    { { echo "$as_me:$LINENO: error: Can't find Tcl configuration definitions" >&5
2065echo "$as_me: error: Can't find Tcl configuration definitions" >&2;}
2066   { (exit 1); exit 1; }; }
2067	else
2068	    no_tcl=
2069	    TCL_BIN_DIR="${ac_cv_c_tclconfig}"
2070	    { echo "$as_me:$LINENO: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
2071echo "${ECHO_T}found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
2072	fi
2073    fi
2074
2075
2076    { echo "$as_me:$LINENO: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
2077echo $ECHO_N "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... $ECHO_C" >&6; }
2078
2079    if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
2080        { echo "$as_me:$LINENO: result: loading" >&5
2081echo "${ECHO_T}loading" >&6; }
2082	. "${TCL_BIN_DIR}/tclConfig.sh"
2083    else
2084        { echo "$as_me:$LINENO: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
2085echo "${ECHO_T}could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
2086    fi
2087
2088    # eval is required to do the TCL_DBGX substitution
2089    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
2090    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
2091
2092    # If the TCL_BIN_DIR is the build directory (not the install directory),
2093    # then set the common variable name to the value of the build variables.
2094    # For example, the variable TCL_LIB_SPEC will be set to the value
2095    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
2096    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
2097    # installed and uninstalled version of Tcl.
2098    if test -f "${TCL_BIN_DIR}/Makefile" ; then
2099        TCL_LIB_SPEC="${TCL_BUILD_LIB_SPEC}"
2100        TCL_STUB_LIB_SPEC="${TCL_BUILD_STUB_LIB_SPEC}"
2101        TCL_STUB_LIB_PATH="${TCL_BUILD_STUB_LIB_PATH}"
2102    elif test "`uname -s`" = "Darwin"; then
2103	# If Tcl was built as a framework, attempt to use the libraries
2104	# from the framework at the given location so that linking works
2105	# against Tcl.framework installed in an arbitrary location.
2106	case ${TCL_DEFS} in
2107	    *TCL_FRAMEWORK*)
2108		if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
2109		    for i in "`cd "${TCL_BIN_DIR}"; pwd`" \
2110			     "`cd "${TCL_BIN_DIR}"/../..; pwd`"; do
2111			if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
2112			    TCL_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TCL_LIB_FILE}"
2113			    break
2114			fi
2115		    done
2116		fi
2117		if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
2118		    TCL_STUB_LIB_SPEC="-L`echo "${TCL_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
2119		    TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
2120		fi
2121		;;
2122	esac
2123    fi
2124
2125    # eval is required to do the TCL_DBGX substitution
2126    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
2127    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
2128    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
2129    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144    case "`uname -s`" in
2145	*CYGWIN_*)
2146	    { echo "$as_me:$LINENO: checking for cygwin variant" >&5
2147echo $ECHO_N "checking for cygwin variant... $ECHO_C" >&6; }
2148	    case ${TCL_EXTRA_CFLAGS} in
2149		*-mwin32*|*-mno-cygwin*)
2150		    TEA_PLATFORM="windows"
2151		    CFLAGS="$CFLAGS -mwin32"
2152		    { echo "$as_me:$LINENO: result: win32" >&5
2153echo "${ECHO_T}win32" >&6; }
2154		    ;;
2155		*)
2156		    TEA_PLATFORM="unix"
2157		    { echo "$as_me:$LINENO: result: unix" >&5
2158echo "${ECHO_T}unix" >&6; }
2159		    ;;
2160	    esac
2161	    EXEEXT=".exe"
2162	    ;;
2163	*)
2164	    ;;
2165    esac
2166
2167    # Do this here as we have fully defined TEA_PLATFORM now
2168    if test "${TEA_PLATFORM}" = "windows" ; then
2169	# The BUILD_$pkg is to define the correct extern storage class
2170	# handling when making this package
2171
2172cat >>confdefs.h <<_ACEOF
2173#define BUILD_${PACKAGE_NAME}
2174_ACEOF
2175
2176	CLEANFILES="$CLEANFILES *.lib *.dll *.pdb *.exp"
2177    fi
2178
2179    # TEA specific:
2180
2181
2182
2183
2184
2185
2186
2187
2188#--------------------------------------------------------------------
2189# Load the tkConfig.sh file if necessary (Tk extension)
2190#--------------------------------------------------------------------
2191
2192
2193    #
2194    # Ok, lets find the tk configuration
2195    # First, look for one uninstalled.
2196    # the alternative search directory is invoked by --with-tk
2197    #
2198
2199    if test x"${no_tk}" = x ; then
2200	# we reset no_tk in case something fails here
2201	no_tk=true
2202
2203# Check whether --with-tk was given.
2204if test "${with_tk+set}" = set; then
2205  withval=$with_tk; with_tkconfig="${withval}"
2206fi
2207
2208	{ echo "$as_me:$LINENO: checking for Tk configuration" >&5
2209echo $ECHO_N "checking for Tk configuration... $ECHO_C" >&6; }
2210	if test "${ac_cv_c_tkconfig+set}" = set; then
2211  echo $ECHO_N "(cached) $ECHO_C" >&6
2212else
2213
2214
2215	    # First check to see if --with-tkconfig was specified.
2216	    if test x"${with_tkconfig}" != x ; then
2217		case "${with_tkconfig}" in
2218		    */tkConfig.sh )
2219			if test -f "${with_tkconfig}"; then
2220			    { echo "$as_me:$LINENO: WARNING: --with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself" >&5
2221echo "$as_me: WARNING: --with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself" >&2;}
2222			    with_tkconfig="`echo "${with_tkconfig}" | sed 's!/tkConfig\.sh$!!'`"
2223			fi ;;
2224		esac
2225		if test -f "${with_tkconfig}/tkConfig.sh" ; then
2226		    ac_cv_c_tkconfig="`(cd "${with_tkconfig}"; pwd)`"
2227		else
2228		    { { echo "$as_me:$LINENO: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&5
2229echo "$as_me: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&2;}
2230   { (exit 1); exit 1; }; }
2231		fi
2232	    fi
2233
2234	    # then check for a private Tk library
2235	    if test x"${ac_cv_c_tkconfig}" = x ; then
2236		for i in \
2237			../tk \
2238			`ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
2239			`ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
2240			`ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
2241			../../tk \
2242			`ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
2243			`ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
2244			`ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
2245			../../../tk \
2246			`ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
2247			`ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
2248			`ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
2249		    if test "${TEA_PLATFORM}" = "windows" \
2250			    -a -f "$i/win/tkConfig.sh" ; then
2251			ac_cv_c_tkconfig="`(cd $i/win; pwd)`"
2252			break
2253		    fi
2254		    if test -f "$i/unix/tkConfig.sh" ; then
2255			ac_cv_c_tkconfig="`(cd $i/unix; pwd)`"
2256			break
2257		    fi
2258		done
2259	    fi
2260
2261	    # on Darwin, check in Framework installation locations
2262	    if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
2263		for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
2264			`ls -d /Library/Frameworks 2>/dev/null` \
2265			`ls -d /Network/Library/Frameworks 2>/dev/null` \
2266			`ls -d /System/Library/Frameworks 2>/dev/null` \
2267			; do
2268		    if test -f "$i/Tk.framework/tkConfig.sh" ; then
2269			ac_cv_c_tkconfig="`(cd $i/Tk.framework; pwd)`"
2270			break
2271		    fi
2272		done
2273	    fi
2274
2275	    # check in a few common install locations
2276	    if test x"${ac_cv_c_tkconfig}" = x ; then
2277		for i in `ls -d ${libdir} 2>/dev/null` \
2278			`ls -d ${exec_prefix}/lib 2>/dev/null` \
2279			`ls -d ${prefix}/lib 2>/dev/null` \
2280			`ls -d /usr/local/lib 2>/dev/null` \
2281			`ls -d /usr/contrib/lib 2>/dev/null` \
2282			`ls -d /usr/lib 2>/dev/null` \
2283			`ls -d /usr/lib64 2>/dev/null` \
2284			; do
2285		    if test -f "$i/tkConfig.sh" ; then
2286			ac_cv_c_tkconfig="`(cd $i; pwd)`"
2287			break
2288		    fi
2289		done
2290	    fi
2291
2292	    # TEA specific: on Windows, check in common installation locations
2293	    if test "${TEA_PLATFORM}" = "windows" \
2294		-a x"${ac_cv_c_tkconfig}" = x ; then
2295		for i in `ls -d C:/Tcl/lib 2>/dev/null` \
2296			`ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
2297			; do
2298		    if test -f "$i/tkConfig.sh" ; then
2299			ac_cv_c_tkconfig="`(cd $i; pwd)`"
2300			break
2301		    fi
2302		done
2303	    fi
2304
2305	    # check in a few other private locations
2306	    if test x"${ac_cv_c_tkconfig}" = x ; then
2307		for i in \
2308			${srcdir}/../tk \
2309			`ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
2310			`ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
2311			`ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
2312		    if test "${TEA_PLATFORM}" = "windows" \
2313			    -a -f "$i/win/tkConfig.sh" ; then
2314			ac_cv_c_tkconfig="`(cd $i/win; pwd)`"
2315			break
2316		    fi
2317		    if test -f "$i/unix/tkConfig.sh" ; then
2318			ac_cv_c_tkconfig="`(cd $i/unix; pwd)`"
2319			break
2320		    fi
2321		done
2322	    fi
2323
2324fi
2325
2326
2327	if test x"${ac_cv_c_tkconfig}" = x ; then
2328	    TK_BIN_DIR="# no Tk configs found"
2329	    { { echo "$as_me:$LINENO: error: Can't find Tk configuration definitions" >&5
2330echo "$as_me: error: Can't find Tk configuration definitions" >&2;}
2331   { (exit 1); exit 1; }; }
2332	else
2333	    no_tk=
2334	    TK_BIN_DIR="${ac_cv_c_tkconfig}"
2335	    { echo "$as_me:$LINENO: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
2336echo "${ECHO_T}found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
2337	fi
2338    fi
2339
2340
2341    { echo "$as_me:$LINENO: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
2342echo $ECHO_N "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... $ECHO_C" >&6; }
2343
2344    if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
2345        { echo "$as_me:$LINENO: result: loading" >&5
2346echo "${ECHO_T}loading" >&6; }
2347	. "${TK_BIN_DIR}/tkConfig.sh"
2348    else
2349        { echo "$as_me:$LINENO: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
2350echo "${ECHO_T}could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
2351    fi
2352
2353    # eval is required to do the TK_DBGX substitution
2354    eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
2355    eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
2356
2357    # If the TK_BIN_DIR is the build directory (not the install directory),
2358    # then set the common variable name to the value of the build variables.
2359    # For example, the variable TK_LIB_SPEC will be set to the value
2360    # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
2361    # instead of TK_BUILD_LIB_SPEC since it will work with both an
2362    # installed and uninstalled version of Tcl.
2363    if test -f "${TK_BIN_DIR}/Makefile" ; then
2364        TK_LIB_SPEC="${TK_BUILD_LIB_SPEC}"
2365        TK_STUB_LIB_SPEC="${TK_BUILD_STUB_LIB_SPEC}"
2366        TK_STUB_LIB_PATH="${TK_BUILD_STUB_LIB_PATH}"
2367    elif test "`uname -s`" = "Darwin"; then
2368	# If Tk was built as a framework, attempt to use the libraries
2369	# from the framework at the given location so that linking works
2370	# against Tk.framework installed in an arbitrary location.
2371	case ${TK_DEFS} in
2372	    *TK_FRAMEWORK*)
2373		if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
2374		    for i in "`cd "${TK_BIN_DIR}"; pwd`" \
2375			     "`cd "${TK_BIN_DIR}"/../..; pwd`"; do
2376			if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
2377			    TK_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TK_LIB_FILE}"
2378			    break
2379			fi
2380		    done
2381		fi
2382		if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
2383		    TK_STUB_LIB_SPEC="-L` echo "${TK_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TK_STUB_LIB_FLAG}"
2384		    TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
2385		fi
2386		;;
2387	esac
2388    fi
2389
2390    # eval is required to do the TK_DBGX substitution
2391    eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
2392    eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
2393    eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
2394    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
2395
2396    # TEA specific: Ensure windowingsystem is defined
2397    if test "${TEA_PLATFORM}" = "unix" ; then
2398	case ${TK_DEFS} in
2399	    *MAC_OSX_TK*)
2400
2401cat >>confdefs.h <<\_ACEOF
2402#define MAC_OSX_TK 1
2403_ACEOF
2404
2405		TEA_WINDOWINGSYSTEM="aqua"
2406		;;
2407	    *)
2408		TEA_WINDOWINGSYSTEM="x11"
2409		;;
2410	esac
2411    elif test "${TEA_PLATFORM}" = "windows" ; then
2412	TEA_WINDOWINGSYSTEM="win32"
2413    fi
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427    # TEA specific:
2428
2429
2430
2431
2432#-----------------------------------------------------------------------
2433# Handle the --prefix=... option by defaulting to what Tcl gave.
2434# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
2435#-----------------------------------------------------------------------
2436
2437
2438    if test "${prefix}" = "NONE"; then
2439	prefix_default=yes
2440	if test x"${TCL_PREFIX}" != x; then
2441	    { echo "$as_me:$LINENO: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&5
2442echo "$as_me: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&6;}
2443	    prefix=${TCL_PREFIX}
2444	else
2445	    { echo "$as_me:$LINENO: --prefix defaulting to /usr/local" >&5
2446echo "$as_me: --prefix defaulting to /usr/local" >&6;}
2447	    prefix=/usr/local
2448	fi
2449    fi
2450    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \
2451	-o x"${exec_prefix_default}" = x"yes" ; then
2452	if test x"${TCL_EXEC_PREFIX}" != x; then
2453	    { echo "$as_me:$LINENO: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&5
2454echo "$as_me: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&6;}
2455	    exec_prefix=${TCL_EXEC_PREFIX}
2456	else
2457	    { echo "$as_me:$LINENO: --exec-prefix defaulting to ${prefix}" >&5
2458echo "$as_me: --exec-prefix defaulting to ${prefix}" >&6;}
2459	    exec_prefix=$prefix
2460	fi
2461    fi
2462
2463
2464#-----------------------------------------------------------------------
2465# Standard compiler checks.
2466# This sets up CC by using the CC env var, or looks for gcc otherwise.
2467# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
2468# the basic setup necessary to compile executables.
2469#-----------------------------------------------------------------------
2470
2471
2472    # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE)
2473    # in this macro, they need to go into TEA_SETUP_COMPILER instead.
2474
2475    # If the user did not set CFLAGS, set it now to keep
2476    # the AC_PROG_CC macro from adding "-g -O2".
2477    if test "${CFLAGS+set}" != "set" ; then
2478	CFLAGS=""
2479    fi
2480
2481    ac_ext=c
2482ac_cpp='$CPP $CPPFLAGS'
2483ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2484ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2485ac_compiler_gnu=$ac_cv_c_compiler_gnu
2486if test -n "$ac_tool_prefix"; then
2487  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2488set dummy ${ac_tool_prefix}gcc; ac_word=$2
2489{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2490echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2491if test "${ac_cv_prog_CC+set}" = set; then
2492  echo $ECHO_N "(cached) $ECHO_C" >&6
2493else
2494  if test -n "$CC"; then
2495  ac_cv_prog_CC="$CC" # Let the user override the test.
2496else
2497as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2498for as_dir in $PATH
2499do
2500  IFS=$as_save_IFS
2501  test -z "$as_dir" && as_dir=.
2502  for ac_exec_ext in '' $ac_executable_extensions; do
2503  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2504    ac_cv_prog_CC="${ac_tool_prefix}gcc"
2505    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2506    break 2
2507  fi
2508done
2509done
2510IFS=$as_save_IFS
2511
2512fi
2513fi
2514CC=$ac_cv_prog_CC
2515if test -n "$CC"; then
2516  { echo "$as_me:$LINENO: result: $CC" >&5
2517echo "${ECHO_T}$CC" >&6; }
2518else
2519  { echo "$as_me:$LINENO: result: no" >&5
2520echo "${ECHO_T}no" >&6; }
2521fi
2522
2523
2524fi
2525if test -z "$ac_cv_prog_CC"; then
2526  ac_ct_CC=$CC
2527  # Extract the first word of "gcc", so it can be a program name with args.
2528set dummy gcc; ac_word=$2
2529{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2530echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2531if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2532  echo $ECHO_N "(cached) $ECHO_C" >&6
2533else
2534  if test -n "$ac_ct_CC"; then
2535  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2536else
2537as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2538for as_dir in $PATH
2539do
2540  IFS=$as_save_IFS
2541  test -z "$as_dir" && as_dir=.
2542  for ac_exec_ext in '' $ac_executable_extensions; do
2543  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2544    ac_cv_prog_ac_ct_CC="gcc"
2545    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2546    break 2
2547  fi
2548done
2549done
2550IFS=$as_save_IFS
2551
2552fi
2553fi
2554ac_ct_CC=$ac_cv_prog_ac_ct_CC
2555if test -n "$ac_ct_CC"; then
2556  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2557echo "${ECHO_T}$ac_ct_CC" >&6; }
2558else
2559  { echo "$as_me:$LINENO: result: no" >&5
2560echo "${ECHO_T}no" >&6; }
2561fi
2562
2563  if test "x$ac_ct_CC" = x; then
2564    CC=""
2565  else
2566    case $cross_compiling:$ac_tool_warned in
2567yes:)
2568{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2569whose name does not start with the host triplet.  If you think this
2570configuration is useful to you, please write to autoconf@gnu.org." >&5
2571echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2572whose name does not start with the host triplet.  If you think this
2573configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2574ac_tool_warned=yes ;;
2575esac
2576    CC=$ac_ct_CC
2577  fi
2578else
2579  CC="$ac_cv_prog_CC"
2580fi
2581
2582if test -z "$CC"; then
2583          if test -n "$ac_tool_prefix"; then
2584    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2585set dummy ${ac_tool_prefix}cc; ac_word=$2
2586{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2587echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2588if test "${ac_cv_prog_CC+set}" = set; then
2589  echo $ECHO_N "(cached) $ECHO_C" >&6
2590else
2591  if test -n "$CC"; then
2592  ac_cv_prog_CC="$CC" # Let the user override the test.
2593else
2594as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2595for as_dir in $PATH
2596do
2597  IFS=$as_save_IFS
2598  test -z "$as_dir" && as_dir=.
2599  for ac_exec_ext in '' $ac_executable_extensions; do
2600  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2601    ac_cv_prog_CC="${ac_tool_prefix}cc"
2602    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2603    break 2
2604  fi
2605done
2606done
2607IFS=$as_save_IFS
2608
2609fi
2610fi
2611CC=$ac_cv_prog_CC
2612if test -n "$CC"; then
2613  { echo "$as_me:$LINENO: result: $CC" >&5
2614echo "${ECHO_T}$CC" >&6; }
2615else
2616  { echo "$as_me:$LINENO: result: no" >&5
2617echo "${ECHO_T}no" >&6; }
2618fi
2619
2620
2621  fi
2622fi
2623if test -z "$CC"; then
2624  # Extract the first word of "cc", so it can be a program name with args.
2625set dummy cc; ac_word=$2
2626{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2627echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2628if test "${ac_cv_prog_CC+set}" = set; then
2629  echo $ECHO_N "(cached) $ECHO_C" >&6
2630else
2631  if test -n "$CC"; then
2632  ac_cv_prog_CC="$CC" # Let the user override the test.
2633else
2634  ac_prog_rejected=no
2635as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2636for as_dir in $PATH
2637do
2638  IFS=$as_save_IFS
2639  test -z "$as_dir" && as_dir=.
2640  for ac_exec_ext in '' $ac_executable_extensions; do
2641  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2642    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2643       ac_prog_rejected=yes
2644       continue
2645     fi
2646    ac_cv_prog_CC="cc"
2647    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2648    break 2
2649  fi
2650done
2651done
2652IFS=$as_save_IFS
2653
2654if test $ac_prog_rejected = yes; then
2655  # We found a bogon in the path, so make sure we never use it.
2656  set dummy $ac_cv_prog_CC
2657  shift
2658  if test $# != 0; then
2659    # We chose a different compiler from the bogus one.
2660    # However, it has the same basename, so the bogon will be chosen
2661    # first if we set CC to just the basename; use the full file name.
2662    shift
2663    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2664  fi
2665fi
2666fi
2667fi
2668CC=$ac_cv_prog_CC
2669if test -n "$CC"; then
2670  { echo "$as_me:$LINENO: result: $CC" >&5
2671echo "${ECHO_T}$CC" >&6; }
2672else
2673  { echo "$as_me:$LINENO: result: no" >&5
2674echo "${ECHO_T}no" >&6; }
2675fi
2676
2677
2678fi
2679if test -z "$CC"; then
2680  if test -n "$ac_tool_prefix"; then
2681  for ac_prog in cl.exe
2682  do
2683    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2684set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2685{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2686echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2687if test "${ac_cv_prog_CC+set}" = set; then
2688  echo $ECHO_N "(cached) $ECHO_C" >&6
2689else
2690  if test -n "$CC"; then
2691  ac_cv_prog_CC="$CC" # Let the user override the test.
2692else
2693as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2694for as_dir in $PATH
2695do
2696  IFS=$as_save_IFS
2697  test -z "$as_dir" && as_dir=.
2698  for ac_exec_ext in '' $ac_executable_extensions; do
2699  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2700    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2701    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2702    break 2
2703  fi
2704done
2705done
2706IFS=$as_save_IFS
2707
2708fi
2709fi
2710CC=$ac_cv_prog_CC
2711if test -n "$CC"; then
2712  { echo "$as_me:$LINENO: result: $CC" >&5
2713echo "${ECHO_T}$CC" >&6; }
2714else
2715  { echo "$as_me:$LINENO: result: no" >&5
2716echo "${ECHO_T}no" >&6; }
2717fi
2718
2719
2720    test -n "$CC" && break
2721  done
2722fi
2723if test -z "$CC"; then
2724  ac_ct_CC=$CC
2725  for ac_prog in cl.exe
2726do
2727  # Extract the first word of "$ac_prog", so it can be a program name with args.
2728set dummy $ac_prog; ac_word=$2
2729{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2730echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2731if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2732  echo $ECHO_N "(cached) $ECHO_C" >&6
2733else
2734  if test -n "$ac_ct_CC"; then
2735  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2736else
2737as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2738for as_dir in $PATH
2739do
2740  IFS=$as_save_IFS
2741  test -z "$as_dir" && as_dir=.
2742  for ac_exec_ext in '' $ac_executable_extensions; do
2743  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2744    ac_cv_prog_ac_ct_CC="$ac_prog"
2745    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2746    break 2
2747  fi
2748done
2749done
2750IFS=$as_save_IFS
2751
2752fi
2753fi
2754ac_ct_CC=$ac_cv_prog_ac_ct_CC
2755if test -n "$ac_ct_CC"; then
2756  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2757echo "${ECHO_T}$ac_ct_CC" >&6; }
2758else
2759  { echo "$as_me:$LINENO: result: no" >&5
2760echo "${ECHO_T}no" >&6; }
2761fi
2762
2763
2764  test -n "$ac_ct_CC" && break
2765done
2766
2767  if test "x$ac_ct_CC" = x; then
2768    CC=""
2769  else
2770    case $cross_compiling:$ac_tool_warned in
2771yes:)
2772{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2773whose name does not start with the host triplet.  If you think this
2774configuration is useful to you, please write to autoconf@gnu.org." >&5
2775echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2776whose name does not start with the host triplet.  If you think this
2777configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2778ac_tool_warned=yes ;;
2779esac
2780    CC=$ac_ct_CC
2781  fi
2782fi
2783
2784fi
2785
2786
2787test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2788See \`config.log' for more details." >&5
2789echo "$as_me: error: no acceptable C compiler found in \$PATH
2790See \`config.log' for more details." >&2;}
2791   { (exit 1); exit 1; }; }
2792
2793# Provide some information about the compiler.
2794echo "$as_me:$LINENO: checking for C compiler version" >&5
2795ac_compiler=`set X $ac_compile; echo $2`
2796{ (ac_try="$ac_compiler --version >&5"
2797case "(($ac_try" in
2798  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2799  *) ac_try_echo=$ac_try;;
2800esac
2801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2802  (eval "$ac_compiler --version >&5") 2>&5
2803  ac_status=$?
2804  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2805  (exit $ac_status); }
2806{ (ac_try="$ac_compiler -v >&5"
2807case "(($ac_try" in
2808  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2809  *) ac_try_echo=$ac_try;;
2810esac
2811eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2812  (eval "$ac_compiler -v >&5") 2>&5
2813  ac_status=$?
2814  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2815  (exit $ac_status); }
2816{ (ac_try="$ac_compiler -V >&5"
2817case "(($ac_try" in
2818  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2819  *) ac_try_echo=$ac_try;;
2820esac
2821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2822  (eval "$ac_compiler -V >&5") 2>&5
2823  ac_status=$?
2824  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2825  (exit $ac_status); }
2826
2827cat >conftest.$ac_ext <<_ACEOF
2828/* confdefs.h.  */
2829_ACEOF
2830cat confdefs.h >>conftest.$ac_ext
2831cat >>conftest.$ac_ext <<_ACEOF
2832/* end confdefs.h.  */
2833
2834int
2835main ()
2836{
2837
2838  ;
2839  return 0;
2840}
2841_ACEOF
2842ac_clean_files_save=$ac_clean_files
2843ac_clean_files="$ac_clean_files a.out a.exe b.out"
2844# Try to create an executable without -o first, disregard a.out.
2845# It will help us diagnose broken compilers, and finding out an intuition
2846# of exeext.
2847{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2848echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2849ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2850#
2851# List of possible output files, starting from the most likely.
2852# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2853# only as a last resort.  b.out is created by i960 compilers.
2854ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2855#
2856# The IRIX 6 linker writes into existing files which may not be
2857# executable, retaining their permissions.  Remove them first so a
2858# subsequent execution test works.
2859ac_rmfiles=
2860for ac_file in $ac_files
2861do
2862  case $ac_file in
2863    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2864    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2865  esac
2866done
2867rm -f $ac_rmfiles
2868
2869if { (ac_try="$ac_link_default"
2870case "(($ac_try" in
2871  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2872  *) ac_try_echo=$ac_try;;
2873esac
2874eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2875  (eval "$ac_link_default") 2>&5
2876  ac_status=$?
2877  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2878  (exit $ac_status); }; then
2879  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2880# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2881# in a Makefile.  We should not override ac_cv_exeext if it was cached,
2882# so that the user can short-circuit this test for compilers unknown to
2883# Autoconf.
2884for ac_file in $ac_files ''
2885do
2886  test -f "$ac_file" || continue
2887  case $ac_file in
2888    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
2889	;;
2890    [ab].out )
2891	# We found the default executable, but exeext='' is most
2892	# certainly right.
2893	break;;
2894    *.* )
2895        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2896	then :; else
2897	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2898	fi
2899	# We set ac_cv_exeext here because the later test for it is not
2900	# safe: cross compilers may not add the suffix if given an `-o'
2901	# argument, so we may need to know it at that point already.
2902	# Even if this section looks crufty: it has the advantage of
2903	# actually working.
2904	break;;
2905    * )
2906	break;;
2907  esac
2908done
2909test "$ac_cv_exeext" = no && ac_cv_exeext=
2910
2911else
2912  ac_file=''
2913fi
2914
2915{ echo "$as_me:$LINENO: result: $ac_file" >&5
2916echo "${ECHO_T}$ac_file" >&6; }
2917if test -z "$ac_file"; then
2918  echo "$as_me: failed program was:" >&5
2919sed 's/^/| /' conftest.$ac_ext >&5
2920
2921{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2922See \`config.log' for more details." >&5
2923echo "$as_me: error: C compiler cannot create executables
2924See \`config.log' for more details." >&2;}
2925   { (exit 77); exit 77; }; }
2926fi
2927
2928ac_exeext=$ac_cv_exeext
2929
2930# Check that the compiler produces executables we can run.  If not, either
2931# the compiler is broken, or we cross compile.
2932{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2933echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
2934# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2935# If not cross compiling, check that we can run a simple program.
2936if test "$cross_compiling" != yes; then
2937  if { ac_try='./$ac_file'
2938  { (case "(($ac_try" in
2939  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2940  *) ac_try_echo=$ac_try;;
2941esac
2942eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2943  (eval "$ac_try") 2>&5
2944  ac_status=$?
2945  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2946  (exit $ac_status); }; }; then
2947    cross_compiling=no
2948  else
2949    if test "$cross_compiling" = maybe; then
2950	cross_compiling=yes
2951    else
2952	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2953If you meant to cross compile, use \`--host'.
2954See \`config.log' for more details." >&5
2955echo "$as_me: error: cannot run C compiled programs.
2956If you meant to cross compile, use \`--host'.
2957See \`config.log' for more details." >&2;}
2958   { (exit 1); exit 1; }; }
2959    fi
2960  fi
2961fi
2962{ echo "$as_me:$LINENO: result: yes" >&5
2963echo "${ECHO_T}yes" >&6; }
2964
2965rm -f a.out a.exe conftest$ac_cv_exeext b.out
2966ac_clean_files=$ac_clean_files_save
2967# Check that the compiler produces executables we can run.  If not, either
2968# the compiler is broken, or we cross compile.
2969{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2970echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2971{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2972echo "${ECHO_T}$cross_compiling" >&6; }
2973
2974{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2975echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2976if { (ac_try="$ac_link"
2977case "(($ac_try" in
2978  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2979  *) ac_try_echo=$ac_try;;
2980esac
2981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2982  (eval "$ac_link") 2>&5
2983  ac_status=$?
2984  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2985  (exit $ac_status); }; then
2986  # If both `conftest.exe' and `conftest' are `present' (well, observable)
2987# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2988# work properly (i.e., refer to `conftest.exe'), while it won't with
2989# `rm'.
2990for ac_file in conftest.exe conftest conftest.*; do
2991  test -f "$ac_file" || continue
2992  case $ac_file in
2993    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2994    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2995	  break;;
2996    * ) break;;
2997  esac
2998done
2999else
3000  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3001See \`config.log' for more details." >&5
3002echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3003See \`config.log' for more details." >&2;}
3004   { (exit 1); exit 1; }; }
3005fi
3006
3007rm -f conftest$ac_cv_exeext
3008{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3009echo "${ECHO_T}$ac_cv_exeext" >&6; }
3010
3011rm -f conftest.$ac_ext
3012EXEEXT=$ac_cv_exeext
3013ac_exeext=$EXEEXT
3014{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
3015echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
3016if test "${ac_cv_objext+set}" = set; then
3017  echo $ECHO_N "(cached) $ECHO_C" >&6
3018else
3019  cat >conftest.$ac_ext <<_ACEOF
3020/* confdefs.h.  */
3021_ACEOF
3022cat confdefs.h >>conftest.$ac_ext
3023cat >>conftest.$ac_ext <<_ACEOF
3024/* end confdefs.h.  */
3025
3026int
3027main ()
3028{
3029
3030  ;
3031  return 0;
3032}
3033_ACEOF
3034rm -f conftest.o conftest.obj
3035if { (ac_try="$ac_compile"
3036case "(($ac_try" in
3037  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3038  *) ac_try_echo=$ac_try;;
3039esac
3040eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3041  (eval "$ac_compile") 2>&5
3042  ac_status=$?
3043  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3044  (exit $ac_status); }; then
3045  for ac_file in conftest.o conftest.obj conftest.*; do
3046  test -f "$ac_file" || continue;
3047  case $ac_file in
3048    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
3049    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3050       break;;
3051  esac
3052done
3053else
3054  echo "$as_me: failed program was:" >&5
3055sed 's/^/| /' conftest.$ac_ext >&5
3056
3057{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3058See \`config.log' for more details." >&5
3059echo "$as_me: error: cannot compute suffix of object files: cannot compile
3060See \`config.log' for more details." >&2;}
3061   { (exit 1); exit 1; }; }
3062fi
3063
3064rm -f conftest.$ac_cv_objext conftest.$ac_ext
3065fi
3066{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3067echo "${ECHO_T}$ac_cv_objext" >&6; }
3068OBJEXT=$ac_cv_objext
3069ac_objext=$OBJEXT
3070{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3071echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
3072if test "${ac_cv_c_compiler_gnu+set}" = set; then
3073  echo $ECHO_N "(cached) $ECHO_C" >&6
3074else
3075  cat >conftest.$ac_ext <<_ACEOF
3076/* confdefs.h.  */
3077_ACEOF
3078cat confdefs.h >>conftest.$ac_ext
3079cat >>conftest.$ac_ext <<_ACEOF
3080/* end confdefs.h.  */
3081
3082int
3083main ()
3084{
3085#ifndef __GNUC__
3086       choke me
3087#endif
3088
3089  ;
3090  return 0;
3091}
3092_ACEOF
3093rm -f conftest.$ac_objext
3094if { (ac_try="$ac_compile"
3095case "(($ac_try" in
3096  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3097  *) ac_try_echo=$ac_try;;
3098esac
3099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3100  (eval "$ac_compile") 2>conftest.er1
3101  ac_status=$?
3102  grep -v '^ *+' conftest.er1 >conftest.err
3103  rm -f conftest.er1
3104  cat conftest.err >&5
3105  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3106  (exit $ac_status); } && {
3107	 test -z "$ac_c_werror_flag" ||
3108	 test ! -s conftest.err
3109       } && test -s conftest.$ac_objext; then
3110  ac_compiler_gnu=yes
3111else
3112  echo "$as_me: failed program was:" >&5
3113sed 's/^/| /' conftest.$ac_ext >&5
3114
3115	ac_compiler_gnu=no
3116fi
3117
3118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3119ac_cv_c_compiler_gnu=$ac_compiler_gnu
3120
3121fi
3122{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3123echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
3124GCC=`test $ac_compiler_gnu = yes && echo yes`
3125ac_test_CFLAGS=${CFLAGS+set}
3126ac_save_CFLAGS=$CFLAGS
3127{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3128echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
3129if test "${ac_cv_prog_cc_g+set}" = set; then
3130  echo $ECHO_N "(cached) $ECHO_C" >&6
3131else
3132  ac_save_c_werror_flag=$ac_c_werror_flag
3133   ac_c_werror_flag=yes
3134   ac_cv_prog_cc_g=no
3135   CFLAGS="-g"
3136   cat >conftest.$ac_ext <<_ACEOF
3137/* confdefs.h.  */
3138_ACEOF
3139cat confdefs.h >>conftest.$ac_ext
3140cat >>conftest.$ac_ext <<_ACEOF
3141/* end confdefs.h.  */
3142
3143int
3144main ()
3145{
3146
3147  ;
3148  return 0;
3149}
3150_ACEOF
3151rm -f conftest.$ac_objext
3152if { (ac_try="$ac_compile"
3153case "(($ac_try" in
3154  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3155  *) ac_try_echo=$ac_try;;
3156esac
3157eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3158  (eval "$ac_compile") 2>conftest.er1
3159  ac_status=$?
3160  grep -v '^ *+' conftest.er1 >conftest.err
3161  rm -f conftest.er1
3162  cat conftest.err >&5
3163  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3164  (exit $ac_status); } && {
3165	 test -z "$ac_c_werror_flag" ||
3166	 test ! -s conftest.err
3167       } && test -s conftest.$ac_objext; then
3168  ac_cv_prog_cc_g=yes
3169else
3170  echo "$as_me: failed program was:" >&5
3171sed 's/^/| /' conftest.$ac_ext >&5
3172
3173	CFLAGS=""
3174      cat >conftest.$ac_ext <<_ACEOF
3175/* confdefs.h.  */
3176_ACEOF
3177cat confdefs.h >>conftest.$ac_ext
3178cat >>conftest.$ac_ext <<_ACEOF
3179/* end confdefs.h.  */
3180
3181int
3182main ()
3183{
3184
3185  ;
3186  return 0;
3187}
3188_ACEOF
3189rm -f conftest.$ac_objext
3190if { (ac_try="$ac_compile"
3191case "(($ac_try" in
3192  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3193  *) ac_try_echo=$ac_try;;
3194esac
3195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3196  (eval "$ac_compile") 2>conftest.er1
3197  ac_status=$?
3198  grep -v '^ *+' conftest.er1 >conftest.err
3199  rm -f conftest.er1
3200  cat conftest.err >&5
3201  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3202  (exit $ac_status); } && {
3203	 test -z "$ac_c_werror_flag" ||
3204	 test ! -s conftest.err
3205       } && test -s conftest.$ac_objext; then
3206  :
3207else
3208  echo "$as_me: failed program was:" >&5
3209sed 's/^/| /' conftest.$ac_ext >&5
3210
3211	ac_c_werror_flag=$ac_save_c_werror_flag
3212	 CFLAGS="-g"
3213	 cat >conftest.$ac_ext <<_ACEOF
3214/* confdefs.h.  */
3215_ACEOF
3216cat confdefs.h >>conftest.$ac_ext
3217cat >>conftest.$ac_ext <<_ACEOF
3218/* end confdefs.h.  */
3219
3220int
3221main ()
3222{
3223
3224  ;
3225  return 0;
3226}
3227_ACEOF
3228rm -f conftest.$ac_objext
3229if { (ac_try="$ac_compile"
3230case "(($ac_try" in
3231  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3232  *) ac_try_echo=$ac_try;;
3233esac
3234eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3235  (eval "$ac_compile") 2>conftest.er1
3236  ac_status=$?
3237  grep -v '^ *+' conftest.er1 >conftest.err
3238  rm -f conftest.er1
3239  cat conftest.err >&5
3240  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3241  (exit $ac_status); } && {
3242	 test -z "$ac_c_werror_flag" ||
3243	 test ! -s conftest.err
3244       } && test -s conftest.$ac_objext; then
3245  ac_cv_prog_cc_g=yes
3246else
3247  echo "$as_me: failed program was:" >&5
3248sed 's/^/| /' conftest.$ac_ext >&5
3249
3250
3251fi
3252
3253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3254fi
3255
3256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3257fi
3258
3259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3260   ac_c_werror_flag=$ac_save_c_werror_flag
3261fi
3262{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3263echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
3264if test "$ac_test_CFLAGS" = set; then
3265  CFLAGS=$ac_save_CFLAGS
3266elif test $ac_cv_prog_cc_g = yes; then
3267  if test "$GCC" = yes; then
3268    CFLAGS="-g -O2"
3269  else
3270    CFLAGS="-g"
3271  fi
3272else
3273  if test "$GCC" = yes; then
3274    CFLAGS="-O2"
3275  else
3276    CFLAGS=
3277  fi
3278fi
3279{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3280echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3281if test "${ac_cv_prog_cc_c89+set}" = set; then
3282  echo $ECHO_N "(cached) $ECHO_C" >&6
3283else
3284  ac_cv_prog_cc_c89=no
3285ac_save_CC=$CC
3286cat >conftest.$ac_ext <<_ACEOF
3287/* confdefs.h.  */
3288_ACEOF
3289cat confdefs.h >>conftest.$ac_ext
3290cat >>conftest.$ac_ext <<_ACEOF
3291/* end confdefs.h.  */
3292#include <stdarg.h>
3293#include <stdio.h>
3294#include <sys/types.h>
3295#include <sys/stat.h>
3296/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3297struct buf { int x; };
3298FILE * (*rcsopen) (struct buf *, struct stat *, int);
3299static char *e (p, i)
3300     char **p;
3301     int i;
3302{
3303  return p[i];
3304}
3305static char *f (char * (*g) (char **, int), char **p, ...)
3306{
3307  char *s;
3308  va_list v;
3309  va_start (v,p);
3310  s = g (p, va_arg (v,int));
3311  va_end (v);
3312  return s;
3313}
3314
3315/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3316   function prototypes and stuff, but not '\xHH' hex character constants.
3317   These don't provoke an error unfortunately, instead are silently treated
3318   as 'x'.  The following induces an error, until -std is added to get
3319   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3320   array size at least.  It's necessary to write '\x00'==0 to get something
3321   that's true only with -std.  */
3322int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3323
3324/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3325   inside strings and character constants.  */
3326#define FOO(x) 'x'
3327int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3328
3329int test (int i, double x);
3330struct s1 {int (*f) (int a);};
3331struct s2 {int (*f) (double a);};
3332int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3333int argc;
3334char **argv;
3335int
3336main ()
3337{
3338return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3339  ;
3340  return 0;
3341}
3342_ACEOF
3343for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3344	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3345do
3346  CC="$ac_save_CC $ac_arg"
3347  rm -f conftest.$ac_objext
3348if { (ac_try="$ac_compile"
3349case "(($ac_try" in
3350  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3351  *) ac_try_echo=$ac_try;;
3352esac
3353eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3354  (eval "$ac_compile") 2>conftest.er1
3355  ac_status=$?
3356  grep -v '^ *+' conftest.er1 >conftest.err
3357  rm -f conftest.er1
3358  cat conftest.err >&5
3359  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3360  (exit $ac_status); } && {
3361	 test -z "$ac_c_werror_flag" ||
3362	 test ! -s conftest.err
3363       } && test -s conftest.$ac_objext; then
3364  ac_cv_prog_cc_c89=$ac_arg
3365else
3366  echo "$as_me: failed program was:" >&5
3367sed 's/^/| /' conftest.$ac_ext >&5
3368
3369
3370fi
3371
3372rm -f core conftest.err conftest.$ac_objext
3373  test "x$ac_cv_prog_cc_c89" != "xno" && break
3374done
3375rm -f conftest.$ac_ext
3376CC=$ac_save_CC
3377
3378fi
3379# AC_CACHE_VAL
3380case "x$ac_cv_prog_cc_c89" in
3381  x)
3382    { echo "$as_me:$LINENO: result: none needed" >&5
3383echo "${ECHO_T}none needed" >&6; } ;;
3384  xno)
3385    { echo "$as_me:$LINENO: result: unsupported" >&5
3386echo "${ECHO_T}unsupported" >&6; } ;;
3387  *)
3388    CC="$CC $ac_cv_prog_cc_c89"
3389    { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3390echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
3391esac
3392
3393
3394ac_ext=c
3395ac_cpp='$CPP $CPPFLAGS'
3396ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3397ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3398ac_compiler_gnu=$ac_cv_c_compiler_gnu
3399
3400    ac_ext=c
3401ac_cpp='$CPP $CPPFLAGS'
3402ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3403ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3404ac_compiler_gnu=$ac_cv_c_compiler_gnu
3405{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3406echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
3407# On Suns, sometimes $CPP names a directory.
3408if test -n "$CPP" && test -d "$CPP"; then
3409  CPP=
3410fi
3411if test -z "$CPP"; then
3412  if test "${ac_cv_prog_CPP+set}" = set; then
3413  echo $ECHO_N "(cached) $ECHO_C" >&6
3414else
3415      # Double quotes because CPP needs to be expanded
3416    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3417    do
3418      ac_preproc_ok=false
3419for ac_c_preproc_warn_flag in '' yes
3420do
3421  # Use a header file that comes with gcc, so configuring glibc
3422  # with a fresh cross-compiler works.
3423  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3424  # <limits.h> exists even on freestanding compilers.
3425  # On the NeXT, cc -E runs the code through the compiler's parser,
3426  # not just through cpp. "Syntax error" is here to catch this case.
3427  cat >conftest.$ac_ext <<_ACEOF
3428/* confdefs.h.  */
3429_ACEOF
3430cat confdefs.h >>conftest.$ac_ext
3431cat >>conftest.$ac_ext <<_ACEOF
3432/* end confdefs.h.  */
3433#ifdef __STDC__
3434# include <limits.h>
3435#else
3436# include <assert.h>
3437#endif
3438		     Syntax error
3439_ACEOF
3440if { (ac_try="$ac_cpp conftest.$ac_ext"
3441case "(($ac_try" in
3442  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3443  *) ac_try_echo=$ac_try;;
3444esac
3445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3446  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3447  ac_status=$?
3448  grep -v '^ *+' conftest.er1 >conftest.err
3449  rm -f conftest.er1
3450  cat conftest.err >&5
3451  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3452  (exit $ac_status); } >/dev/null && {
3453	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3454	 test ! -s conftest.err
3455       }; then
3456  :
3457else
3458  echo "$as_me: failed program was:" >&5
3459sed 's/^/| /' conftest.$ac_ext >&5
3460
3461  # Broken: fails on valid input.
3462continue
3463fi
3464
3465rm -f conftest.err conftest.$ac_ext
3466
3467  # OK, works on sane cases.  Now check whether nonexistent headers
3468  # can be detected and how.
3469  cat >conftest.$ac_ext <<_ACEOF
3470/* confdefs.h.  */
3471_ACEOF
3472cat confdefs.h >>conftest.$ac_ext
3473cat >>conftest.$ac_ext <<_ACEOF
3474/* end confdefs.h.  */
3475#include <ac_nonexistent.h>
3476_ACEOF
3477if { (ac_try="$ac_cpp conftest.$ac_ext"
3478case "(($ac_try" in
3479  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3480  *) ac_try_echo=$ac_try;;
3481esac
3482eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3483  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3484  ac_status=$?
3485  grep -v '^ *+' conftest.er1 >conftest.err
3486  rm -f conftest.er1
3487  cat conftest.err >&5
3488  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3489  (exit $ac_status); } >/dev/null && {
3490	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3491	 test ! -s conftest.err
3492       }; then
3493  # Broken: success on invalid input.
3494continue
3495else
3496  echo "$as_me: failed program was:" >&5
3497sed 's/^/| /' conftest.$ac_ext >&5
3498
3499  # Passes both tests.
3500ac_preproc_ok=:
3501break
3502fi
3503
3504rm -f conftest.err conftest.$ac_ext
3505
3506done
3507# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3508rm -f conftest.err conftest.$ac_ext
3509if $ac_preproc_ok; then
3510  break
3511fi
3512
3513    done
3514    ac_cv_prog_CPP=$CPP
3515
3516fi
3517  CPP=$ac_cv_prog_CPP
3518else
3519  ac_cv_prog_CPP=$CPP
3520fi
3521{ echo "$as_me:$LINENO: result: $CPP" >&5
3522echo "${ECHO_T}$CPP" >&6; }
3523ac_preproc_ok=false
3524for ac_c_preproc_warn_flag in '' yes
3525do
3526  # Use a header file that comes with gcc, so configuring glibc
3527  # with a fresh cross-compiler works.
3528  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3529  # <limits.h> exists even on freestanding compilers.
3530  # On the NeXT, cc -E runs the code through the compiler's parser,
3531  # not just through cpp. "Syntax error" is here to catch this case.
3532  cat >conftest.$ac_ext <<_ACEOF
3533/* confdefs.h.  */
3534_ACEOF
3535cat confdefs.h >>conftest.$ac_ext
3536cat >>conftest.$ac_ext <<_ACEOF
3537/* end confdefs.h.  */
3538#ifdef __STDC__
3539# include <limits.h>
3540#else
3541# include <assert.h>
3542#endif
3543		     Syntax error
3544_ACEOF
3545if { (ac_try="$ac_cpp conftest.$ac_ext"
3546case "(($ac_try" in
3547  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3548  *) ac_try_echo=$ac_try;;
3549esac
3550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3551  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3552  ac_status=$?
3553  grep -v '^ *+' conftest.er1 >conftest.err
3554  rm -f conftest.er1
3555  cat conftest.err >&5
3556  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3557  (exit $ac_status); } >/dev/null && {
3558	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3559	 test ! -s conftest.err
3560       }; then
3561  :
3562else
3563  echo "$as_me: failed program was:" >&5
3564sed 's/^/| /' conftest.$ac_ext >&5
3565
3566  # Broken: fails on valid input.
3567continue
3568fi
3569
3570rm -f conftest.err conftest.$ac_ext
3571
3572  # OK, works on sane cases.  Now check whether nonexistent headers
3573  # can be detected and how.
3574  cat >conftest.$ac_ext <<_ACEOF
3575/* confdefs.h.  */
3576_ACEOF
3577cat confdefs.h >>conftest.$ac_ext
3578cat >>conftest.$ac_ext <<_ACEOF
3579/* end confdefs.h.  */
3580#include <ac_nonexistent.h>
3581_ACEOF
3582if { (ac_try="$ac_cpp conftest.$ac_ext"
3583case "(($ac_try" in
3584  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3585  *) ac_try_echo=$ac_try;;
3586esac
3587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3588  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3589  ac_status=$?
3590  grep -v '^ *+' conftest.er1 >conftest.err
3591  rm -f conftest.er1
3592  cat conftest.err >&5
3593  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3594  (exit $ac_status); } >/dev/null && {
3595	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3596	 test ! -s conftest.err
3597       }; then
3598  # Broken: success on invalid input.
3599continue
3600else
3601  echo "$as_me: failed program was:" >&5
3602sed 's/^/| /' conftest.$ac_ext >&5
3603
3604  # Passes both tests.
3605ac_preproc_ok=:
3606break
3607fi
3608
3609rm -f conftest.err conftest.$ac_ext
3610
3611done
3612# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3613rm -f conftest.err conftest.$ac_ext
3614if $ac_preproc_ok; then
3615  :
3616else
3617  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3618See \`config.log' for more details." >&5
3619echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3620See \`config.log' for more details." >&2;}
3621   { (exit 1); exit 1; }; }
3622fi
3623
3624ac_ext=c
3625ac_cpp='$CPP $CPPFLAGS'
3626ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3627ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3628ac_compiler_gnu=$ac_cv_c_compiler_gnu
3629
3630
3631    # Find a good install program.  We prefer a C program (faster),
3632# so one script is as good as another.  But avoid the broken or
3633# incompatible versions:
3634# SysV /etc/install, /usr/sbin/install
3635# SunOS /usr/etc/install
3636# IRIX /sbin/install
3637# AIX /bin/install
3638# AmigaOS /C/install, which installs bootblocks on floppy discs
3639# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3640# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3641# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3642# OS/2's system install, which has a completely different semantic
3643# ./install, which can be erroneously created by make from ./install.sh.
3644{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3645echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
3646if test -z "$INSTALL"; then
3647if test "${ac_cv_path_install+set}" = set; then
3648  echo $ECHO_N "(cached) $ECHO_C" >&6
3649else
3650  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3651for as_dir in $PATH
3652do
3653  IFS=$as_save_IFS
3654  test -z "$as_dir" && as_dir=.
3655  # Account for people who put trailing slashes in PATH elements.
3656case $as_dir/ in
3657  ./ | .// | /cC/* | \
3658  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3659  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
3660  /usr/ucb/* ) ;;
3661  *)
3662    # OSF1 and SCO ODT 3.0 have their own names for install.
3663    # Don't use installbsd from OSF since it installs stuff as root
3664    # by default.
3665    for ac_prog in ginstall scoinst install; do
3666      for ac_exec_ext in '' $ac_executable_extensions; do
3667	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3668	  if test $ac_prog = install &&
3669	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3670	    # AIX install.  It has an incompatible calling convention.
3671	    :
3672	  elif test $ac_prog = install &&
3673	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3674	    # program-specific install script used by HP pwplus--don't use.
3675	    :
3676	  else
3677	    ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3678	    break 3
3679	  fi
3680	fi
3681      done
3682    done
3683    ;;
3684esac
3685done
3686IFS=$as_save_IFS
3687
3688
3689fi
3690  if test "${ac_cv_path_install+set}" = set; then
3691    INSTALL=$ac_cv_path_install
3692  else
3693    # As a last resort, use the slow shell script.  Don't cache a
3694    # value for INSTALL within a source directory, because that will
3695    # break other packages using the cache if that directory is
3696    # removed, or if the value is a relative name.
3697    INSTALL=$ac_install_sh
3698  fi
3699fi
3700{ echo "$as_me:$LINENO: result: $INSTALL" >&5
3701echo "${ECHO_T}$INSTALL" >&6; }
3702
3703# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3704# It thinks the first close brace ends the variable substitution.
3705test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3706
3707test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3708
3709test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3710
3711
3712    #--------------------------------------------------------------------
3713    # Checks to see if the make program sets the $MAKE variable.
3714    #--------------------------------------------------------------------
3715
3716    { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3717echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
3718set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3719if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
3720  echo $ECHO_N "(cached) $ECHO_C" >&6
3721else
3722  cat >conftest.make <<\_ACEOF
3723SHELL = /bin/sh
3724all:
3725	@echo '@@@%%%=$(MAKE)=@@@%%%'
3726_ACEOF
3727# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3728case `${MAKE-make} -f conftest.make 2>/dev/null` in
3729  *@@@%%%=?*=@@@%%%*)
3730    eval ac_cv_prog_make_${ac_make}_set=yes;;
3731  *)
3732    eval ac_cv_prog_make_${ac_make}_set=no;;
3733esac
3734rm -f conftest.make
3735fi
3736if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3737  { echo "$as_me:$LINENO: result: yes" >&5
3738echo "${ECHO_T}yes" >&6; }
3739  SET_MAKE=
3740else
3741  { echo "$as_me:$LINENO: result: no" >&5
3742echo "${ECHO_T}no" >&6; }
3743  SET_MAKE="MAKE=${MAKE-make}"
3744fi
3745
3746
3747    #--------------------------------------------------------------------
3748    # Find ranlib
3749    #--------------------------------------------------------------------
3750
3751    if test -n "$ac_tool_prefix"; then
3752  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3753set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3754{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3755echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3756if test "${ac_cv_prog_RANLIB+set}" = set; then
3757  echo $ECHO_N "(cached) $ECHO_C" >&6
3758else
3759  if test -n "$RANLIB"; then
3760  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3761else
3762as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3763for as_dir in $PATH
3764do
3765  IFS=$as_save_IFS
3766  test -z "$as_dir" && as_dir=.
3767  for ac_exec_ext in '' $ac_executable_extensions; do
3768  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3769    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3770    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3771    break 2
3772  fi
3773done
3774done
3775IFS=$as_save_IFS
3776
3777fi
3778fi
3779RANLIB=$ac_cv_prog_RANLIB
3780if test -n "$RANLIB"; then
3781  { echo "$as_me:$LINENO: result: $RANLIB" >&5
3782echo "${ECHO_T}$RANLIB" >&6; }
3783else
3784  { echo "$as_me:$LINENO: result: no" >&5
3785echo "${ECHO_T}no" >&6; }
3786fi
3787
3788
3789fi
3790if test -z "$ac_cv_prog_RANLIB"; then
3791  ac_ct_RANLIB=$RANLIB
3792  # Extract the first word of "ranlib", so it can be a program name with args.
3793set dummy ranlib; ac_word=$2
3794{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3795echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3796if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3797  echo $ECHO_N "(cached) $ECHO_C" >&6
3798else
3799  if test -n "$ac_ct_RANLIB"; then
3800  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3801else
3802as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3803for as_dir in $PATH
3804do
3805  IFS=$as_save_IFS
3806  test -z "$as_dir" && as_dir=.
3807  for ac_exec_ext in '' $ac_executable_extensions; do
3808  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3809    ac_cv_prog_ac_ct_RANLIB="ranlib"
3810    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3811    break 2
3812  fi
3813done
3814done
3815IFS=$as_save_IFS
3816
3817fi
3818fi
3819ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3820if test -n "$ac_ct_RANLIB"; then
3821  { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3822echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
3823else
3824  { echo "$as_me:$LINENO: result: no" >&5
3825echo "${ECHO_T}no" >&6; }
3826fi
3827
3828  if test "x$ac_ct_RANLIB" = x; then
3829    RANLIB=":"
3830  else
3831    case $cross_compiling:$ac_tool_warned in
3832yes:)
3833{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3834whose name does not start with the host triplet.  If you think this
3835configuration is useful to you, please write to autoconf@gnu.org." >&5
3836echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3837whose name does not start with the host triplet.  If you think this
3838configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3839ac_tool_warned=yes ;;
3840esac
3841    RANLIB=$ac_ct_RANLIB
3842  fi
3843else
3844  RANLIB="$ac_cv_prog_RANLIB"
3845fi
3846
3847
3848    #--------------------------------------------------------------------
3849    # Determines the correct binary file extension (.o, .obj, .exe etc.)
3850    #--------------------------------------------------------------------
3851
3852
3853
3854
3855
3856
3857{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3858echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3859if test "${ac_cv_path_GREP+set}" = set; then
3860  echo $ECHO_N "(cached) $ECHO_C" >&6
3861else
3862  # Extract the first word of "grep ggrep" to use in msg output
3863if test -z "$GREP"; then
3864set dummy grep ggrep; ac_prog_name=$2
3865if test "${ac_cv_path_GREP+set}" = set; then
3866  echo $ECHO_N "(cached) $ECHO_C" >&6
3867else
3868  ac_path_GREP_found=false
3869# Loop through the user's path and test for each of PROGNAME-LIST
3870as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3871for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3872do
3873  IFS=$as_save_IFS
3874  test -z "$as_dir" && as_dir=.
3875  for ac_prog in grep ggrep; do
3876  for ac_exec_ext in '' $ac_executable_extensions; do
3877    ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3878    { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3879    # Check for GNU ac_path_GREP and select it if it is found.
3880  # Check for GNU $ac_path_GREP
3881case `"$ac_path_GREP" --version 2>&1` in
3882*GNU*)
3883  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3884*)
3885  ac_count=0
3886  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3887  while :
3888  do
3889    cat "conftest.in" "conftest.in" >"conftest.tmp"
3890    mv "conftest.tmp" "conftest.in"
3891    cp "conftest.in" "conftest.nl"
3892    echo 'GREP' >> "conftest.nl"
3893    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3894    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3895    ac_count=`expr $ac_count + 1`
3896    if test $ac_count -gt ${ac_path_GREP_max-0}; then
3897      # Best one so far, save it but keep looking for a better one
3898      ac_cv_path_GREP="$ac_path_GREP"
3899      ac_path_GREP_max=$ac_count
3900    fi
3901    # 10*(2^10) chars as input seems more than enough
3902    test $ac_count -gt 10 && break
3903  done
3904  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3905esac
3906
3907
3908    $ac_path_GREP_found && break 3
3909  done
3910done
3911
3912done
3913IFS=$as_save_IFS
3914
3915
3916fi
3917
3918GREP="$ac_cv_path_GREP"
3919if test -z "$GREP"; then
3920  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3921echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3922   { (exit 1); exit 1; }; }
3923fi
3924
3925else
3926  ac_cv_path_GREP=$GREP
3927fi
3928
3929
3930fi
3931{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3932echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3933 GREP="$ac_cv_path_GREP"
3934
3935
3936{ echo "$as_me:$LINENO: checking for egrep" >&5
3937echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3938if test "${ac_cv_path_EGREP+set}" = set; then
3939  echo $ECHO_N "(cached) $ECHO_C" >&6
3940else
3941  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3942   then ac_cv_path_EGREP="$GREP -E"
3943   else
3944     # Extract the first word of "egrep" to use in msg output
3945if test -z "$EGREP"; then
3946set dummy egrep; ac_prog_name=$2
3947if test "${ac_cv_path_EGREP+set}" = set; then
3948  echo $ECHO_N "(cached) $ECHO_C" >&6
3949else
3950  ac_path_EGREP_found=false
3951# Loop through the user's path and test for each of PROGNAME-LIST
3952as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3953for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3954do
3955  IFS=$as_save_IFS
3956  test -z "$as_dir" && as_dir=.
3957  for ac_prog in egrep; do
3958  for ac_exec_ext in '' $ac_executable_extensions; do
3959    ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3960    { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3961    # Check for GNU ac_path_EGREP and select it if it is found.
3962  # Check for GNU $ac_path_EGREP
3963case `"$ac_path_EGREP" --version 2>&1` in
3964*GNU*)
3965  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3966*)
3967  ac_count=0
3968  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3969  while :
3970  do
3971    cat "conftest.in" "conftest.in" >"conftest.tmp"
3972    mv "conftest.tmp" "conftest.in"
3973    cp "conftest.in" "conftest.nl"
3974    echo 'EGREP' >> "conftest.nl"
3975    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3976    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3977    ac_count=`expr $ac_count + 1`
3978    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3979      # Best one so far, save it but keep looking for a better one
3980      ac_cv_path_EGREP="$ac_path_EGREP"
3981      ac_path_EGREP_max=$ac_count
3982    fi
3983    # 10*(2^10) chars as input seems more than enough
3984    test $ac_count -gt 10 && break
3985  done
3986  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3987esac
3988
3989
3990    $ac_path_EGREP_found && break 3
3991  done
3992done
3993
3994done
3995IFS=$as_save_IFS
3996
3997
3998fi
3999
4000EGREP="$ac_cv_path_EGREP"
4001if test -z "$EGREP"; then
4002  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4003echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4004   { (exit 1); exit 1; }; }
4005fi
4006
4007else
4008  ac_cv_path_EGREP=$EGREP
4009fi
4010
4011
4012   fi
4013fi
4014{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4015echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
4016 EGREP="$ac_cv_path_EGREP"
4017
4018
4019{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4020echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
4021if test "${ac_cv_header_stdc+set}" = set; then
4022  echo $ECHO_N "(cached) $ECHO_C" >&6
4023else
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#include <stdlib.h>
4031#include <stdarg.h>
4032#include <string.h>
4033#include <float.h>
4034
4035int
4036main ()
4037{
4038
4039  ;
4040  return 0;
4041}
4042_ACEOF
4043rm -f conftest.$ac_objext
4044if { (ac_try="$ac_compile"
4045case "(($ac_try" in
4046  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4047  *) ac_try_echo=$ac_try;;
4048esac
4049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4050  (eval "$ac_compile") 2>conftest.er1
4051  ac_status=$?
4052  grep -v '^ *+' conftest.er1 >conftest.err
4053  rm -f conftest.er1
4054  cat conftest.err >&5
4055  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4056  (exit $ac_status); } && {
4057	 test -z "$ac_c_werror_flag" ||
4058	 test ! -s conftest.err
4059       } && test -s conftest.$ac_objext; then
4060  ac_cv_header_stdc=yes
4061else
4062  echo "$as_me: failed program was:" >&5
4063sed 's/^/| /' conftest.$ac_ext >&5
4064
4065	ac_cv_header_stdc=no
4066fi
4067
4068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4069
4070if test $ac_cv_header_stdc = yes; then
4071  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4072  cat >conftest.$ac_ext <<_ACEOF
4073/* confdefs.h.  */
4074_ACEOF
4075cat confdefs.h >>conftest.$ac_ext
4076cat >>conftest.$ac_ext <<_ACEOF
4077/* end confdefs.h.  */
4078#include <string.h>
4079
4080_ACEOF
4081if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4082  $EGREP "memchr" >/dev/null 2>&1; then
4083  :
4084else
4085  ac_cv_header_stdc=no
4086fi
4087rm -f -r conftest*
4088
4089fi
4090
4091if test $ac_cv_header_stdc = yes; then
4092  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4093  cat >conftest.$ac_ext <<_ACEOF
4094/* confdefs.h.  */
4095_ACEOF
4096cat confdefs.h >>conftest.$ac_ext
4097cat >>conftest.$ac_ext <<_ACEOF
4098/* end confdefs.h.  */
4099#include <stdlib.h>
4100
4101_ACEOF
4102if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4103  $EGREP "free" >/dev/null 2>&1; then
4104  :
4105else
4106  ac_cv_header_stdc=no
4107fi
4108rm -f -r conftest*
4109
4110fi
4111
4112if test $ac_cv_header_stdc = yes; then
4113  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4114  if test "$cross_compiling" = yes; then
4115  :
4116else
4117  cat >conftest.$ac_ext <<_ACEOF
4118/* confdefs.h.  */
4119_ACEOF
4120cat confdefs.h >>conftest.$ac_ext
4121cat >>conftest.$ac_ext <<_ACEOF
4122/* end confdefs.h.  */
4123#include <ctype.h>
4124#include <stdlib.h>
4125#if ((' ' & 0x0FF) == 0x020)
4126# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4127# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4128#else
4129# define ISLOWER(c) \
4130		   (('a' <= (c) && (c) <= 'i') \
4131		     || ('j' <= (c) && (c) <= 'r') \
4132		     || ('s' <= (c) && (c) <= 'z'))
4133# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4134#endif
4135
4136#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4137int
4138main ()
4139{
4140  int i;
4141  for (i = 0; i < 256; i++)
4142    if (XOR (islower (i), ISLOWER (i))
4143	|| toupper (i) != TOUPPER (i))
4144      return 2;
4145  return 0;
4146}
4147_ACEOF
4148rm -f conftest$ac_exeext
4149if { (ac_try="$ac_link"
4150case "(($ac_try" in
4151  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4152  *) ac_try_echo=$ac_try;;
4153esac
4154eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4155  (eval "$ac_link") 2>&5
4156  ac_status=$?
4157  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4158  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4159  { (case "(($ac_try" in
4160  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4161  *) ac_try_echo=$ac_try;;
4162esac
4163eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4164  (eval "$ac_try") 2>&5
4165  ac_status=$?
4166  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4167  (exit $ac_status); }; }; then
4168  :
4169else
4170  echo "$as_me: program exited with status $ac_status" >&5
4171echo "$as_me: failed program was:" >&5
4172sed 's/^/| /' conftest.$ac_ext >&5
4173
4174( exit $ac_status )
4175ac_cv_header_stdc=no
4176fi
4177rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4178fi
4179
4180
4181fi
4182fi
4183{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4184echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
4185if test $ac_cv_header_stdc = yes; then
4186
4187cat >>confdefs.h <<\_ACEOF
4188#define STDC_HEADERS 1
4189_ACEOF
4190
4191fi
4192
4193# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4204		  inttypes.h stdint.h unistd.h
4205do
4206as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4207{ echo "$as_me:$LINENO: checking for $ac_header" >&5
4208echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4209if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4210  echo $ECHO_N "(cached) $ECHO_C" >&6
4211else
4212  cat >conftest.$ac_ext <<_ACEOF
4213/* confdefs.h.  */
4214_ACEOF
4215cat confdefs.h >>conftest.$ac_ext
4216cat >>conftest.$ac_ext <<_ACEOF
4217/* end confdefs.h.  */
4218$ac_includes_default
4219
4220#include <$ac_header>
4221_ACEOF
4222rm -f conftest.$ac_objext
4223if { (ac_try="$ac_compile"
4224case "(($ac_try" in
4225  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4226  *) ac_try_echo=$ac_try;;
4227esac
4228eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4229  (eval "$ac_compile") 2>conftest.er1
4230  ac_status=$?
4231  grep -v '^ *+' conftest.er1 >conftest.err
4232  rm -f conftest.er1
4233  cat conftest.err >&5
4234  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4235  (exit $ac_status); } && {
4236	 test -z "$ac_c_werror_flag" ||
4237	 test ! -s conftest.err
4238       } && test -s conftest.$ac_objext; then
4239  eval "$as_ac_Header=yes"
4240else
4241  echo "$as_me: failed program was:" >&5
4242sed 's/^/| /' conftest.$ac_ext >&5
4243
4244	eval "$as_ac_Header=no"
4245fi
4246
4247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4248fi
4249ac_res=`eval echo '${'$as_ac_Header'}'`
4250	       { echo "$as_me:$LINENO: result: $ac_res" >&5
4251echo "${ECHO_T}$ac_res" >&6; }
4252if test `eval echo '${'$as_ac_Header'}'` = yes; then
4253  cat >>confdefs.h <<_ACEOF
4254#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4255_ACEOF
4256
4257fi
4258
4259done
4260
4261
4262
4263    # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here.
4264
4265
4266    #------------------------------------------------------------------------
4267    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
4268    # It makes compiling go faster.  (This is only a performance feature.)
4269    #------------------------------------------------------------------------
4270
4271    if test -z "$no_pipe" -a -n "$GCC"; then
4272	{ echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5
4273echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6; }
4274if test "${tcl_cv_cc_pipe+set}" = set; then
4275  echo $ECHO_N "(cached) $ECHO_C" >&6
4276else
4277
4278	    hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
4279	    cat >conftest.$ac_ext <<_ACEOF
4280/* confdefs.h.  */
4281_ACEOF
4282cat confdefs.h >>conftest.$ac_ext
4283cat >>conftest.$ac_ext <<_ACEOF
4284/* end confdefs.h.  */
4285
4286int
4287main ()
4288{
4289
4290  ;
4291  return 0;
4292}
4293_ACEOF
4294rm -f conftest.$ac_objext
4295if { (ac_try="$ac_compile"
4296case "(($ac_try" in
4297  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4298  *) ac_try_echo=$ac_try;;
4299esac
4300eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4301  (eval "$ac_compile") 2>conftest.er1
4302  ac_status=$?
4303  grep -v '^ *+' conftest.er1 >conftest.err
4304  rm -f conftest.er1
4305  cat conftest.err >&5
4306  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4307  (exit $ac_status); } && {
4308	 test -z "$ac_c_werror_flag" ||
4309	 test ! -s conftest.err
4310       } && test -s conftest.$ac_objext; then
4311  tcl_cv_cc_pipe=yes
4312else
4313  echo "$as_me: failed program was:" >&5
4314sed 's/^/| /' conftest.$ac_ext >&5
4315
4316	tcl_cv_cc_pipe=no
4317fi
4318
4319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4320	    CFLAGS=$hold_cflags
4321fi
4322{ echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5
4323echo "${ECHO_T}$tcl_cv_cc_pipe" >&6; }
4324	if test $tcl_cv_cc_pipe = yes; then
4325	    CFLAGS="$CFLAGS -pipe"
4326	fi
4327    fi
4328
4329    #--------------------------------------------------------------------
4330    # Common compiler flag setup
4331    #--------------------------------------------------------------------
4332
4333    { echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
4334echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
4335if test "${ac_cv_c_bigendian+set}" = set; then
4336  echo $ECHO_N "(cached) $ECHO_C" >&6
4337else
4338  # See if sys/param.h defines the BYTE_ORDER macro.
4339cat >conftest.$ac_ext <<_ACEOF
4340/* confdefs.h.  */
4341_ACEOF
4342cat confdefs.h >>conftest.$ac_ext
4343cat >>conftest.$ac_ext <<_ACEOF
4344/* end confdefs.h.  */
4345#include <sys/types.h>
4346#include <sys/param.h>
4347
4348int
4349main ()
4350{
4351#if  ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
4352	&& BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
4353 bogus endian macros
4354#endif
4355
4356  ;
4357  return 0;
4358}
4359_ACEOF
4360rm -f conftest.$ac_objext
4361if { (ac_try="$ac_compile"
4362case "(($ac_try" in
4363  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4364  *) ac_try_echo=$ac_try;;
4365esac
4366eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4367  (eval "$ac_compile") 2>conftest.er1
4368  ac_status=$?
4369  grep -v '^ *+' conftest.er1 >conftest.err
4370  rm -f conftest.er1
4371  cat conftest.err >&5
4372  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4373  (exit $ac_status); } && {
4374	 test -z "$ac_c_werror_flag" ||
4375	 test ! -s conftest.err
4376       } && test -s conftest.$ac_objext; then
4377  # It does; now see whether it defined to BIG_ENDIAN or not.
4378cat >conftest.$ac_ext <<_ACEOF
4379/* confdefs.h.  */
4380_ACEOF
4381cat confdefs.h >>conftest.$ac_ext
4382cat >>conftest.$ac_ext <<_ACEOF
4383/* end confdefs.h.  */
4384#include <sys/types.h>
4385#include <sys/param.h>
4386
4387int
4388main ()
4389{
4390#if BYTE_ORDER != BIG_ENDIAN
4391 not big endian
4392#endif
4393
4394  ;
4395  return 0;
4396}
4397_ACEOF
4398rm -f conftest.$ac_objext
4399if { (ac_try="$ac_compile"
4400case "(($ac_try" in
4401  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4402  *) ac_try_echo=$ac_try;;
4403esac
4404eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4405  (eval "$ac_compile") 2>conftest.er1
4406  ac_status=$?
4407  grep -v '^ *+' conftest.er1 >conftest.err
4408  rm -f conftest.er1
4409  cat conftest.err >&5
4410  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4411  (exit $ac_status); } && {
4412	 test -z "$ac_c_werror_flag" ||
4413	 test ! -s conftest.err
4414       } && test -s conftest.$ac_objext; then
4415  ac_cv_c_bigendian=yes
4416else
4417  echo "$as_me: failed program was:" >&5
4418sed 's/^/| /' conftest.$ac_ext >&5
4419
4420	ac_cv_c_bigendian=no
4421fi
4422
4423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4424else
4425  echo "$as_me: failed program was:" >&5
4426sed 's/^/| /' conftest.$ac_ext >&5
4427
4428	# It does not; compile a test program.
4429if test "$cross_compiling" = yes; then
4430  # try to guess the endianness by grepping values into an object file
4431  ac_cv_c_bigendian=unknown
4432  cat >conftest.$ac_ext <<_ACEOF
4433/* confdefs.h.  */
4434_ACEOF
4435cat confdefs.h >>conftest.$ac_ext
4436cat >>conftest.$ac_ext <<_ACEOF
4437/* end confdefs.h.  */
4438short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
4439short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
4440void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
4441short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
4442short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
4443void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
4444int
4445main ()
4446{
4447 _ascii (); _ebcdic ();
4448  ;
4449  return 0;
4450}
4451_ACEOF
4452rm -f conftest.$ac_objext
4453if { (ac_try="$ac_compile"
4454case "(($ac_try" in
4455  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4456  *) ac_try_echo=$ac_try;;
4457esac
4458eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4459  (eval "$ac_compile") 2>conftest.er1
4460  ac_status=$?
4461  grep -v '^ *+' conftest.er1 >conftest.err
4462  rm -f conftest.er1
4463  cat conftest.err >&5
4464  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4465  (exit $ac_status); } && {
4466	 test -z "$ac_c_werror_flag" ||
4467	 test ! -s conftest.err
4468       } && test -s conftest.$ac_objext; then
4469  if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
4470  ac_cv_c_bigendian=yes
4471fi
4472if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
4473  if test "$ac_cv_c_bigendian" = unknown; then
4474    ac_cv_c_bigendian=no
4475  else
4476    # finding both strings is unlikely to happen, but who knows?
4477    ac_cv_c_bigendian=unknown
4478  fi
4479fi
4480else
4481  echo "$as_me: failed program was:" >&5
4482sed 's/^/| /' conftest.$ac_ext >&5
4483
4484
4485fi
4486
4487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4488else
4489  cat >conftest.$ac_ext <<_ACEOF
4490/* confdefs.h.  */
4491_ACEOF
4492cat confdefs.h >>conftest.$ac_ext
4493cat >>conftest.$ac_ext <<_ACEOF
4494/* end confdefs.h.  */
4495$ac_includes_default
4496int
4497main ()
4498{
4499
4500  /* Are we little or big endian?  From Harbison&Steele.  */
4501  union
4502  {
4503    long int l;
4504    char c[sizeof (long int)];
4505  } u;
4506  u.l = 1;
4507  return u.c[sizeof (long int) - 1] == 1;
4508
4509  ;
4510  return 0;
4511}
4512_ACEOF
4513rm -f conftest$ac_exeext
4514if { (ac_try="$ac_link"
4515case "(($ac_try" in
4516  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4517  *) ac_try_echo=$ac_try;;
4518esac
4519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4520  (eval "$ac_link") 2>&5
4521  ac_status=$?
4522  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4523  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4524  { (case "(($ac_try" in
4525  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4526  *) ac_try_echo=$ac_try;;
4527esac
4528eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4529  (eval "$ac_try") 2>&5
4530  ac_status=$?
4531  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4532  (exit $ac_status); }; }; then
4533  ac_cv_c_bigendian=no
4534else
4535  echo "$as_me: program exited with status $ac_status" >&5
4536echo "$as_me: failed program was:" >&5
4537sed 's/^/| /' conftest.$ac_ext >&5
4538
4539( exit $ac_status )
4540ac_cv_c_bigendian=yes
4541fi
4542rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4543fi
4544
4545
4546fi
4547
4548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4549fi
4550{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
4551echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
4552case $ac_cv_c_bigendian in
4553  yes)
4554
4555cat >>confdefs.h <<\_ACEOF
4556#define WORDS_BIGENDIAN 1
4557_ACEOF
4558 ;;
4559  no)
4560     ;;
4561  *)
4562    { { echo "$as_me:$LINENO: error: unknown endianness
4563presetting ac_cv_c_bigendian=no (or yes) will help" >&5
4564echo "$as_me: error: unknown endianness
4565presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
4566   { (exit 1); exit 1; }; } ;;
4567esac
4568
4569    if test "${TEA_PLATFORM}" = "unix" ; then
4570
4571    #--------------------------------------------------------------------
4572    # On a few very rare systems, all of the libm.a stuff is
4573    # already in libc.a.  Set compiler flags accordingly.
4574    # Also, Linux requires the "ieee" library for math to work
4575    # right (and it must appear before "-lm").
4576    #--------------------------------------------------------------------
4577
4578    { echo "$as_me:$LINENO: checking for sin" >&5
4579echo $ECHO_N "checking for sin... $ECHO_C" >&6; }
4580if test "${ac_cv_func_sin+set}" = set; then
4581  echo $ECHO_N "(cached) $ECHO_C" >&6
4582else
4583  cat >conftest.$ac_ext <<_ACEOF
4584/* confdefs.h.  */
4585_ACEOF
4586cat confdefs.h >>conftest.$ac_ext
4587cat >>conftest.$ac_ext <<_ACEOF
4588/* end confdefs.h.  */
4589/* Define sin to an innocuous variant, in case <limits.h> declares sin.
4590   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4591#define sin innocuous_sin
4592
4593/* System header to define __stub macros and hopefully few prototypes,
4594    which can conflict with char sin (); below.
4595    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4596    <limits.h> exists even on freestanding compilers.  */
4597
4598#ifdef __STDC__
4599# include <limits.h>
4600#else
4601# include <assert.h>
4602#endif
4603
4604#undef sin
4605
4606/* Override any GCC internal prototype to avoid an error.
4607   Use char because int might match the return type of a GCC
4608   builtin and then its argument prototype would still apply.  */
4609#ifdef __cplusplus
4610extern "C"
4611#endif
4612char sin ();
4613/* The GNU C library defines this for functions which it implements
4614    to always fail with ENOSYS.  Some functions are actually named
4615    something starting with __ and the normal name is an alias.  */
4616#if defined __stub_sin || defined __stub___sin
4617choke me
4618#endif
4619
4620int
4621main ()
4622{
4623return sin ();
4624  ;
4625  return 0;
4626}
4627_ACEOF
4628rm -f conftest.$ac_objext conftest$ac_exeext
4629if { (ac_try="$ac_link"
4630case "(($ac_try" in
4631  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4632  *) ac_try_echo=$ac_try;;
4633esac
4634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4635  (eval "$ac_link") 2>conftest.er1
4636  ac_status=$?
4637  grep -v '^ *+' conftest.er1 >conftest.err
4638  rm -f conftest.er1
4639  cat conftest.err >&5
4640  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4641  (exit $ac_status); } && {
4642	 test -z "$ac_c_werror_flag" ||
4643	 test ! -s conftest.err
4644       } && test -s conftest$ac_exeext &&
4645       $as_test_x conftest$ac_exeext; then
4646  ac_cv_func_sin=yes
4647else
4648  echo "$as_me: failed program was:" >&5
4649sed 's/^/| /' conftest.$ac_ext >&5
4650
4651	ac_cv_func_sin=no
4652fi
4653
4654rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4655      conftest$ac_exeext conftest.$ac_ext
4656fi
4657{ echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5
4658echo "${ECHO_T}$ac_cv_func_sin" >&6; }
4659if test $ac_cv_func_sin = yes; then
4660  MATH_LIBS=""
4661else
4662  MATH_LIBS="-lm"
4663fi
4664
4665    { echo "$as_me:$LINENO: checking for main in -lieee" >&5
4666echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6; }
4667if test "${ac_cv_lib_ieee_main+set}" = set; then
4668  echo $ECHO_N "(cached) $ECHO_C" >&6
4669else
4670  ac_check_lib_save_LIBS=$LIBS
4671LIBS="-lieee  $LIBS"
4672cat >conftest.$ac_ext <<_ACEOF
4673/* confdefs.h.  */
4674_ACEOF
4675cat confdefs.h >>conftest.$ac_ext
4676cat >>conftest.$ac_ext <<_ACEOF
4677/* end confdefs.h.  */
4678
4679
4680int
4681main ()
4682{
4683return main ();
4684  ;
4685  return 0;
4686}
4687_ACEOF
4688rm -f conftest.$ac_objext conftest$ac_exeext
4689if { (ac_try="$ac_link"
4690case "(($ac_try" in
4691  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4692  *) ac_try_echo=$ac_try;;
4693esac
4694eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4695  (eval "$ac_link") 2>conftest.er1
4696  ac_status=$?
4697  grep -v '^ *+' conftest.er1 >conftest.err
4698  rm -f conftest.er1
4699  cat conftest.err >&5
4700  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4701  (exit $ac_status); } && {
4702	 test -z "$ac_c_werror_flag" ||
4703	 test ! -s conftest.err
4704       } && test -s conftest$ac_exeext &&
4705       $as_test_x conftest$ac_exeext; then
4706  ac_cv_lib_ieee_main=yes
4707else
4708  echo "$as_me: failed program was:" >&5
4709sed 's/^/| /' conftest.$ac_ext >&5
4710
4711	ac_cv_lib_ieee_main=no
4712fi
4713
4714rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4715      conftest$ac_exeext conftest.$ac_ext
4716LIBS=$ac_check_lib_save_LIBS
4717fi
4718{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5
4719echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6; }
4720if test $ac_cv_lib_ieee_main = yes; then
4721  MATH_LIBS="-lieee $MATH_LIBS"
4722fi
4723
4724
4725    #--------------------------------------------------------------------
4726    # Interactive UNIX requires -linet instead of -lsocket, plus it
4727    # needs net/errno.h to define the socket-related error codes.
4728    #--------------------------------------------------------------------
4729
4730    { echo "$as_me:$LINENO: checking for main in -linet" >&5
4731echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6; }
4732if test "${ac_cv_lib_inet_main+set}" = set; then
4733  echo $ECHO_N "(cached) $ECHO_C" >&6
4734else
4735  ac_check_lib_save_LIBS=$LIBS
4736LIBS="-linet  $LIBS"
4737cat >conftest.$ac_ext <<_ACEOF
4738/* confdefs.h.  */
4739_ACEOF
4740cat confdefs.h >>conftest.$ac_ext
4741cat >>conftest.$ac_ext <<_ACEOF
4742/* end confdefs.h.  */
4743
4744
4745int
4746main ()
4747{
4748return main ();
4749  ;
4750  return 0;
4751}
4752_ACEOF
4753rm -f conftest.$ac_objext conftest$ac_exeext
4754if { (ac_try="$ac_link"
4755case "(($ac_try" in
4756  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4757  *) ac_try_echo=$ac_try;;
4758esac
4759eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4760  (eval "$ac_link") 2>conftest.er1
4761  ac_status=$?
4762  grep -v '^ *+' conftest.er1 >conftest.err
4763  rm -f conftest.er1
4764  cat conftest.err >&5
4765  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4766  (exit $ac_status); } && {
4767	 test -z "$ac_c_werror_flag" ||
4768	 test ! -s conftest.err
4769       } && test -s conftest$ac_exeext &&
4770       $as_test_x conftest$ac_exeext; then
4771  ac_cv_lib_inet_main=yes
4772else
4773  echo "$as_me: failed program was:" >&5
4774sed 's/^/| /' conftest.$ac_ext >&5
4775
4776	ac_cv_lib_inet_main=no
4777fi
4778
4779rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4780      conftest$ac_exeext conftest.$ac_ext
4781LIBS=$ac_check_lib_save_LIBS
4782fi
4783{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5
4784echo "${ECHO_T}$ac_cv_lib_inet_main" >&6; }
4785if test $ac_cv_lib_inet_main = yes; then
4786  LIBS="$LIBS -linet"
4787fi
4788
4789    if test "${ac_cv_header_net_errno_h+set}" = set; then
4790  { echo "$as_me:$LINENO: checking for net/errno.h" >&5
4791echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; }
4792if test "${ac_cv_header_net_errno_h+set}" = set; then
4793  echo $ECHO_N "(cached) $ECHO_C" >&6
4794fi
4795{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
4796echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; }
4797else
4798  # Is the header compilable?
4799{ echo "$as_me:$LINENO: checking net/errno.h usability" >&5
4800echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6; }
4801cat >conftest.$ac_ext <<_ACEOF
4802/* confdefs.h.  */
4803_ACEOF
4804cat confdefs.h >>conftest.$ac_ext
4805cat >>conftest.$ac_ext <<_ACEOF
4806/* end confdefs.h.  */
4807$ac_includes_default
4808#include <net/errno.h>
4809_ACEOF
4810rm -f conftest.$ac_objext
4811if { (ac_try="$ac_compile"
4812case "(($ac_try" in
4813  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4814  *) ac_try_echo=$ac_try;;
4815esac
4816eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4817  (eval "$ac_compile") 2>conftest.er1
4818  ac_status=$?
4819  grep -v '^ *+' conftest.er1 >conftest.err
4820  rm -f conftest.er1
4821  cat conftest.err >&5
4822  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4823  (exit $ac_status); } && {
4824	 test -z "$ac_c_werror_flag" ||
4825	 test ! -s conftest.err
4826       } && test -s conftest.$ac_objext; then
4827  ac_header_compiler=yes
4828else
4829  echo "$as_me: failed program was:" >&5
4830sed 's/^/| /' conftest.$ac_ext >&5
4831
4832	ac_header_compiler=no
4833fi
4834
4835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4836{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4837echo "${ECHO_T}$ac_header_compiler" >&6; }
4838
4839# Is the header present?
4840{ echo "$as_me:$LINENO: checking net/errno.h presence" >&5
4841echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6; }
4842cat >conftest.$ac_ext <<_ACEOF
4843/* confdefs.h.  */
4844_ACEOF
4845cat confdefs.h >>conftest.$ac_ext
4846cat >>conftest.$ac_ext <<_ACEOF
4847/* end confdefs.h.  */
4848#include <net/errno.h>
4849_ACEOF
4850if { (ac_try="$ac_cpp conftest.$ac_ext"
4851case "(($ac_try" in
4852  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4853  *) ac_try_echo=$ac_try;;
4854esac
4855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4856  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4857  ac_status=$?
4858  grep -v '^ *+' conftest.er1 >conftest.err
4859  rm -f conftest.er1
4860  cat conftest.err >&5
4861  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4862  (exit $ac_status); } >/dev/null && {
4863	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4864	 test ! -s conftest.err
4865       }; then
4866  ac_header_preproc=yes
4867else
4868  echo "$as_me: failed program was:" >&5
4869sed 's/^/| /' conftest.$ac_ext >&5
4870
4871  ac_header_preproc=no
4872fi
4873
4874rm -f conftest.err conftest.$ac_ext
4875{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4876echo "${ECHO_T}$ac_header_preproc" >&6; }
4877
4878# So?  What about this header?
4879case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4880  yes:no: )
4881    { echo "$as_me:$LINENO: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
4882echo "$as_me: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4883    { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the compiler's result" >&5
4884echo "$as_me: WARNING: net/errno.h: proceeding with the compiler's result" >&2;}
4885    ac_header_preproc=yes
4886    ;;
4887  no:yes:* )
4888    { echo "$as_me:$LINENO: WARNING: net/errno.h: present but cannot be compiled" >&5
4889echo "$as_me: WARNING: net/errno.h: present but cannot be compiled" >&2;}
4890    { echo "$as_me:$LINENO: WARNING: net/errno.h:     check for missing prerequisite headers?" >&5
4891echo "$as_me: WARNING: net/errno.h:     check for missing prerequisite headers?" >&2;}
4892    { echo "$as_me:$LINENO: WARNING: net/errno.h: see the Autoconf documentation" >&5
4893echo "$as_me: WARNING: net/errno.h: see the Autoconf documentation" >&2;}
4894    { echo "$as_me:$LINENO: WARNING: net/errno.h:     section \"Present But Cannot Be Compiled\"" >&5
4895echo "$as_me: WARNING: net/errno.h:     section \"Present But Cannot Be Compiled\"" >&2;}
4896    { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the preprocessor's result" >&5
4897echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;}
4898    { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5
4899echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;}
4900
4901    ;;
4902esac
4903{ echo "$as_me:$LINENO: checking for net/errno.h" >&5
4904echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; }
4905if test "${ac_cv_header_net_errno_h+set}" = set; then
4906  echo $ECHO_N "(cached) $ECHO_C" >&6
4907else
4908  ac_cv_header_net_errno_h=$ac_header_preproc
4909fi
4910{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
4911echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; }
4912
4913fi
4914if test $ac_cv_header_net_errno_h = yes; then
4915
4916
4917cat >>confdefs.h <<\_ACEOF
4918#define HAVE_NET_ERRNO_H 1
4919_ACEOF
4920
4921fi
4922
4923
4924
4925    #--------------------------------------------------------------------
4926    #	Check for the existence of the -lsocket and -lnsl libraries.
4927    #	The order here is important, so that they end up in the right
4928    #	order in the command line generated by make.  Here are some
4929    #	special considerations:
4930    #	1. Use "connect" and "accept" to check for -lsocket, and
4931    #	   "gethostbyname" to check for -lnsl.
4932    #	2. Use each function name only once:  can't redo a check because
4933    #	   autoconf caches the results of the last check and won't redo it.
4934    #	3. Use -lnsl and -lsocket only if they supply procedures that
4935    #	   aren't already present in the normal libraries.  This is because
4936    #	   IRIX 5.2 has libraries, but they aren't needed and they're
4937    #	   bogus:  they goof up name resolution if used.
4938    #	4. On some SVR4 systems, can't use -lsocket without -lnsl too.
4939    #	   To get around this problem, check for both libraries together
4940    #	   if -lsocket doesn't work by itself.
4941    #--------------------------------------------------------------------
4942
4943    tcl_checkBoth=0
4944    { echo "$as_me:$LINENO: checking for connect" >&5
4945echo $ECHO_N "checking for connect... $ECHO_C" >&6; }
4946if test "${ac_cv_func_connect+set}" = set; then
4947  echo $ECHO_N "(cached) $ECHO_C" >&6
4948else
4949  cat >conftest.$ac_ext <<_ACEOF
4950/* confdefs.h.  */
4951_ACEOF
4952cat confdefs.h >>conftest.$ac_ext
4953cat >>conftest.$ac_ext <<_ACEOF
4954/* end confdefs.h.  */
4955/* Define connect to an innocuous variant, in case <limits.h> declares connect.
4956   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4957#define connect innocuous_connect
4958
4959/* System header to define __stub macros and hopefully few prototypes,
4960    which can conflict with char connect (); below.
4961    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4962    <limits.h> exists even on freestanding compilers.  */
4963
4964#ifdef __STDC__
4965# include <limits.h>
4966#else
4967# include <assert.h>
4968#endif
4969
4970#undef connect
4971
4972/* Override any GCC internal prototype to avoid an error.
4973   Use char because int might match the return type of a GCC
4974   builtin and then its argument prototype would still apply.  */
4975#ifdef __cplusplus
4976extern "C"
4977#endif
4978char connect ();
4979/* The GNU C library defines this for functions which it implements
4980    to always fail with ENOSYS.  Some functions are actually named
4981    something starting with __ and the normal name is an alias.  */
4982#if defined __stub_connect || defined __stub___connect
4983choke me
4984#endif
4985
4986int
4987main ()
4988{
4989return connect ();
4990  ;
4991  return 0;
4992}
4993_ACEOF
4994rm -f conftest.$ac_objext conftest$ac_exeext
4995if { (ac_try="$ac_link"
4996case "(($ac_try" in
4997  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4998  *) ac_try_echo=$ac_try;;
4999esac
5000eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5001  (eval "$ac_link") 2>conftest.er1
5002  ac_status=$?
5003  grep -v '^ *+' conftest.er1 >conftest.err
5004  rm -f conftest.er1
5005  cat conftest.err >&5
5006  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5007  (exit $ac_status); } && {
5008	 test -z "$ac_c_werror_flag" ||
5009	 test ! -s conftest.err
5010       } && test -s conftest$ac_exeext &&
5011       $as_test_x conftest$ac_exeext; then
5012  ac_cv_func_connect=yes
5013else
5014  echo "$as_me: failed program was:" >&5
5015sed 's/^/| /' conftest.$ac_ext >&5
5016
5017	ac_cv_func_connect=no
5018fi
5019
5020rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5021      conftest$ac_exeext conftest.$ac_ext
5022fi
5023{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
5024echo "${ECHO_T}$ac_cv_func_connect" >&6; }
5025if test $ac_cv_func_connect = yes; then
5026  tcl_checkSocket=0
5027else
5028  tcl_checkSocket=1
5029fi
5030
5031    if test "$tcl_checkSocket" = 1; then
5032	{ echo "$as_me:$LINENO: checking for setsockopt" >&5
5033echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6; }
5034if test "${ac_cv_func_setsockopt+set}" = set; then
5035  echo $ECHO_N "(cached) $ECHO_C" >&6
5036else
5037  cat >conftest.$ac_ext <<_ACEOF
5038/* confdefs.h.  */
5039_ACEOF
5040cat confdefs.h >>conftest.$ac_ext
5041cat >>conftest.$ac_ext <<_ACEOF
5042/* end confdefs.h.  */
5043/* Define setsockopt to an innocuous variant, in case <limits.h> declares setsockopt.
5044   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5045#define setsockopt innocuous_setsockopt
5046
5047/* System header to define __stub macros and hopefully few prototypes,
5048    which can conflict with char setsockopt (); below.
5049    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5050    <limits.h> exists even on freestanding compilers.  */
5051
5052#ifdef __STDC__
5053# include <limits.h>
5054#else
5055# include <assert.h>
5056#endif
5057
5058#undef setsockopt
5059
5060/* Override any GCC internal prototype to avoid an error.
5061   Use char because int might match the return type of a GCC
5062   builtin and then its argument prototype would still apply.  */
5063#ifdef __cplusplus
5064extern "C"
5065#endif
5066char setsockopt ();
5067/* The GNU C library defines this for functions which it implements
5068    to always fail with ENOSYS.  Some functions are actually named
5069    something starting with __ and the normal name is an alias.  */
5070#if defined __stub_setsockopt || defined __stub___setsockopt
5071choke me
5072#endif
5073
5074int
5075main ()
5076{
5077return setsockopt ();
5078  ;
5079  return 0;
5080}
5081_ACEOF
5082rm -f conftest.$ac_objext conftest$ac_exeext
5083if { (ac_try="$ac_link"
5084case "(($ac_try" in
5085  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5086  *) ac_try_echo=$ac_try;;
5087esac
5088eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5089  (eval "$ac_link") 2>conftest.er1
5090  ac_status=$?
5091  grep -v '^ *+' conftest.er1 >conftest.err
5092  rm -f conftest.er1
5093  cat conftest.err >&5
5094  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5095  (exit $ac_status); } && {
5096	 test -z "$ac_c_werror_flag" ||
5097	 test ! -s conftest.err
5098       } && test -s conftest$ac_exeext &&
5099       $as_test_x conftest$ac_exeext; then
5100  ac_cv_func_setsockopt=yes
5101else
5102  echo "$as_me: failed program was:" >&5
5103sed 's/^/| /' conftest.$ac_ext >&5
5104
5105	ac_cv_func_setsockopt=no
5106fi
5107
5108rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5109      conftest$ac_exeext conftest.$ac_ext
5110fi
5111{ echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5
5112echo "${ECHO_T}$ac_cv_func_setsockopt" >&6; }
5113if test $ac_cv_func_setsockopt = yes; then
5114  :
5115else
5116  { echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5
5117echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6; }
5118if test "${ac_cv_lib_socket_setsockopt+set}" = set; then
5119  echo $ECHO_N "(cached) $ECHO_C" >&6
5120else
5121  ac_check_lib_save_LIBS=$LIBS
5122LIBS="-lsocket  $LIBS"
5123cat >conftest.$ac_ext <<_ACEOF
5124/* confdefs.h.  */
5125_ACEOF
5126cat confdefs.h >>conftest.$ac_ext
5127cat >>conftest.$ac_ext <<_ACEOF
5128/* end confdefs.h.  */
5129
5130/* Override any GCC internal prototype to avoid an error.
5131   Use char because int might match the return type of a GCC
5132   builtin and then its argument prototype would still apply.  */
5133#ifdef __cplusplus
5134extern "C"
5135#endif
5136char setsockopt ();
5137int
5138main ()
5139{
5140return setsockopt ();
5141  ;
5142  return 0;
5143}
5144_ACEOF
5145rm -f conftest.$ac_objext conftest$ac_exeext
5146if { (ac_try="$ac_link"
5147case "(($ac_try" in
5148  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5149  *) ac_try_echo=$ac_try;;
5150esac
5151eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5152  (eval "$ac_link") 2>conftest.er1
5153  ac_status=$?
5154  grep -v '^ *+' conftest.er1 >conftest.err
5155  rm -f conftest.er1
5156  cat conftest.err >&5
5157  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5158  (exit $ac_status); } && {
5159	 test -z "$ac_c_werror_flag" ||
5160	 test ! -s conftest.err
5161       } && test -s conftest$ac_exeext &&
5162       $as_test_x conftest$ac_exeext; then
5163  ac_cv_lib_socket_setsockopt=yes
5164else
5165  echo "$as_me: failed program was:" >&5
5166sed 's/^/| /' conftest.$ac_ext >&5
5167
5168	ac_cv_lib_socket_setsockopt=no
5169fi
5170
5171rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5172      conftest$ac_exeext conftest.$ac_ext
5173LIBS=$ac_check_lib_save_LIBS
5174fi
5175{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5
5176echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6; }
5177if test $ac_cv_lib_socket_setsockopt = yes; then
5178  LIBS="$LIBS -lsocket"
5179else
5180  tcl_checkBoth=1
5181fi
5182
5183fi
5184
5185    fi
5186    if test "$tcl_checkBoth" = 1; then
5187	tk_oldLibs=$LIBS
5188	LIBS="$LIBS -lsocket -lnsl"
5189	{ echo "$as_me:$LINENO: checking for accept" >&5
5190echo $ECHO_N "checking for accept... $ECHO_C" >&6; }
5191if test "${ac_cv_func_accept+set}" = set; then
5192  echo $ECHO_N "(cached) $ECHO_C" >&6
5193else
5194  cat >conftest.$ac_ext <<_ACEOF
5195/* confdefs.h.  */
5196_ACEOF
5197cat confdefs.h >>conftest.$ac_ext
5198cat >>conftest.$ac_ext <<_ACEOF
5199/* end confdefs.h.  */
5200/* Define accept to an innocuous variant, in case <limits.h> declares accept.
5201   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5202#define accept innocuous_accept
5203
5204/* System header to define __stub macros and hopefully few prototypes,
5205    which can conflict with char accept (); below.
5206    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5207    <limits.h> exists even on freestanding compilers.  */
5208
5209#ifdef __STDC__
5210# include <limits.h>
5211#else
5212# include <assert.h>
5213#endif
5214
5215#undef accept
5216
5217/* Override any GCC internal prototype to avoid an error.
5218   Use char because int might match the return type of a GCC
5219   builtin and then its argument prototype would still apply.  */
5220#ifdef __cplusplus
5221extern "C"
5222#endif
5223char accept ();
5224/* The GNU C library defines this for functions which it implements
5225    to always fail with ENOSYS.  Some functions are actually named
5226    something starting with __ and the normal name is an alias.  */
5227#if defined __stub_accept || defined __stub___accept
5228choke me
5229#endif
5230
5231int
5232main ()
5233{
5234return accept ();
5235  ;
5236  return 0;
5237}
5238_ACEOF
5239rm -f conftest.$ac_objext conftest$ac_exeext
5240if { (ac_try="$ac_link"
5241case "(($ac_try" in
5242  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5243  *) ac_try_echo=$ac_try;;
5244esac
5245eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5246  (eval "$ac_link") 2>conftest.er1
5247  ac_status=$?
5248  grep -v '^ *+' conftest.er1 >conftest.err
5249  rm -f conftest.er1
5250  cat conftest.err >&5
5251  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5252  (exit $ac_status); } && {
5253	 test -z "$ac_c_werror_flag" ||
5254	 test ! -s conftest.err
5255       } && test -s conftest$ac_exeext &&
5256       $as_test_x conftest$ac_exeext; then
5257  ac_cv_func_accept=yes
5258else
5259  echo "$as_me: failed program was:" >&5
5260sed 's/^/| /' conftest.$ac_ext >&5
5261
5262	ac_cv_func_accept=no
5263fi
5264
5265rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5266      conftest$ac_exeext conftest.$ac_ext
5267fi
5268{ echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5
5269echo "${ECHO_T}$ac_cv_func_accept" >&6; }
5270if test $ac_cv_func_accept = yes; then
5271  tcl_checkNsl=0
5272else
5273  LIBS=$tk_oldLibs
5274fi
5275
5276    fi
5277    { echo "$as_me:$LINENO: checking for gethostbyname" >&5
5278echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; }
5279if test "${ac_cv_func_gethostbyname+set}" = set; then
5280  echo $ECHO_N "(cached) $ECHO_C" >&6
5281else
5282  cat >conftest.$ac_ext <<_ACEOF
5283/* confdefs.h.  */
5284_ACEOF
5285cat confdefs.h >>conftest.$ac_ext
5286cat >>conftest.$ac_ext <<_ACEOF
5287/* end confdefs.h.  */
5288/* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
5289   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5290#define gethostbyname innocuous_gethostbyname
5291
5292/* System header to define __stub macros and hopefully few prototypes,
5293    which can conflict with char gethostbyname (); below.
5294    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5295    <limits.h> exists even on freestanding compilers.  */
5296
5297#ifdef __STDC__
5298# include <limits.h>
5299#else
5300# include <assert.h>
5301#endif
5302
5303#undef gethostbyname
5304
5305/* Override any GCC internal prototype to avoid an error.
5306   Use char because int might match the return type of a GCC
5307   builtin and then its argument prototype would still apply.  */
5308#ifdef __cplusplus
5309extern "C"
5310#endif
5311char gethostbyname ();
5312/* The GNU C library defines this for functions which it implements
5313    to always fail with ENOSYS.  Some functions are actually named
5314    something starting with __ and the normal name is an alias.  */
5315#if defined __stub_gethostbyname || defined __stub___gethostbyname
5316choke me
5317#endif
5318
5319int
5320main ()
5321{
5322return gethostbyname ();
5323  ;
5324  return 0;
5325}
5326_ACEOF
5327rm -f conftest.$ac_objext conftest$ac_exeext
5328if { (ac_try="$ac_link"
5329case "(($ac_try" in
5330  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5331  *) ac_try_echo=$ac_try;;
5332esac
5333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5334  (eval "$ac_link") 2>conftest.er1
5335  ac_status=$?
5336  grep -v '^ *+' conftest.er1 >conftest.err
5337  rm -f conftest.er1
5338  cat conftest.err >&5
5339  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5340  (exit $ac_status); } && {
5341	 test -z "$ac_c_werror_flag" ||
5342	 test ! -s conftest.err
5343       } && test -s conftest$ac_exeext &&
5344       $as_test_x conftest$ac_exeext; then
5345  ac_cv_func_gethostbyname=yes
5346else
5347  echo "$as_me: failed program was:" >&5
5348sed 's/^/| /' conftest.$ac_ext >&5
5349
5350	ac_cv_func_gethostbyname=no
5351fi
5352
5353rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5354      conftest$ac_exeext conftest.$ac_ext
5355fi
5356{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
5357echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; }
5358if test $ac_cv_func_gethostbyname = yes; then
5359  :
5360else
5361  { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
5362echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; }
5363if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
5364  echo $ECHO_N "(cached) $ECHO_C" >&6
5365else
5366  ac_check_lib_save_LIBS=$LIBS
5367LIBS="-lnsl  $LIBS"
5368cat >conftest.$ac_ext <<_ACEOF
5369/* confdefs.h.  */
5370_ACEOF
5371cat confdefs.h >>conftest.$ac_ext
5372cat >>conftest.$ac_ext <<_ACEOF
5373/* end confdefs.h.  */
5374
5375/* Override any GCC internal prototype to avoid an error.
5376   Use char because int might match the return type of a GCC
5377   builtin and then its argument prototype would still apply.  */
5378#ifdef __cplusplus
5379extern "C"
5380#endif
5381char gethostbyname ();
5382int
5383main ()
5384{
5385return gethostbyname ();
5386  ;
5387  return 0;
5388}
5389_ACEOF
5390rm -f conftest.$ac_objext conftest$ac_exeext
5391if { (ac_try="$ac_link"
5392case "(($ac_try" in
5393  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5394  *) ac_try_echo=$ac_try;;
5395esac
5396eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5397  (eval "$ac_link") 2>conftest.er1
5398  ac_status=$?
5399  grep -v '^ *+' conftest.er1 >conftest.err
5400  rm -f conftest.er1
5401  cat conftest.err >&5
5402  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5403  (exit $ac_status); } && {
5404	 test -z "$ac_c_werror_flag" ||
5405	 test ! -s conftest.err
5406       } && test -s conftest$ac_exeext &&
5407       $as_test_x conftest$ac_exeext; then
5408  ac_cv_lib_nsl_gethostbyname=yes
5409else
5410  echo "$as_me: failed program was:" >&5
5411sed 's/^/| /' conftest.$ac_ext >&5
5412
5413	ac_cv_lib_nsl_gethostbyname=no
5414fi
5415
5416rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5417      conftest$ac_exeext conftest.$ac_ext
5418LIBS=$ac_check_lib_save_LIBS
5419fi
5420{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
5421echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; }
5422if test $ac_cv_lib_nsl_gethostbyname = yes; then
5423  LIBS="$LIBS -lnsl"
5424fi
5425
5426fi
5427
5428
5429    # TEA specific: Don't perform the eval of the libraries here because
5430    # DL_LIBS won't be set until we call TEA_CONFIG_CFLAGS
5431
5432    TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}'
5433
5434
5435
5436
5437    { echo "$as_me:$LINENO: checking dirent.h" >&5
5438echo $ECHO_N "checking dirent.h... $ECHO_C" >&6; }
5439if test "${tcl_cv_dirent_h+set}" = set; then
5440  echo $ECHO_N "(cached) $ECHO_C" >&6
5441else
5442
5443    cat >conftest.$ac_ext <<_ACEOF
5444/* confdefs.h.  */
5445_ACEOF
5446cat confdefs.h >>conftest.$ac_ext
5447cat >>conftest.$ac_ext <<_ACEOF
5448/* end confdefs.h.  */
5449#include <sys/types.h>
5450#include <dirent.h>
5451int
5452main ()
5453{
5454
5455#ifndef _POSIX_SOURCE
5456#   ifdef __Lynx__
5457	/*
5458	 * Generate compilation error to make the test fail:  Lynx headers
5459	 * are only valid if really in the POSIX environment.
5460	 */
5461
5462	missing_procedure();
5463#   endif
5464#endif
5465DIR *d;
5466struct dirent *entryPtr;
5467char *p;
5468d = opendir("foobar");
5469entryPtr = readdir(d);
5470p = entryPtr->d_name;
5471closedir(d);
5472
5473  ;
5474  return 0;
5475}
5476_ACEOF
5477rm -f conftest.$ac_objext conftest$ac_exeext
5478if { (ac_try="$ac_link"
5479case "(($ac_try" in
5480  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5481  *) ac_try_echo=$ac_try;;
5482esac
5483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5484  (eval "$ac_link") 2>conftest.er1
5485  ac_status=$?
5486  grep -v '^ *+' conftest.er1 >conftest.err
5487  rm -f conftest.er1
5488  cat conftest.err >&5
5489  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5490  (exit $ac_status); } && {
5491	 test -z "$ac_c_werror_flag" ||
5492	 test ! -s conftest.err
5493       } && test -s conftest$ac_exeext &&
5494       $as_test_x conftest$ac_exeext; then
5495  tcl_cv_dirent_h=yes
5496else
5497  echo "$as_me: failed program was:" >&5
5498sed 's/^/| /' conftest.$ac_ext >&5
5499
5500	tcl_cv_dirent_h=no
5501fi
5502
5503rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5504      conftest$ac_exeext conftest.$ac_ext
5505fi
5506{ echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5
5507echo "${ECHO_T}$tcl_cv_dirent_h" >&6; }
5508
5509    if test $tcl_cv_dirent_h = no; then
5510
5511cat >>confdefs.h <<\_ACEOF
5512#define NO_DIRENT_H 1
5513_ACEOF
5514
5515    fi
5516
5517    # TEA specific:
5518    if test "${ac_cv_header_errno_h+set}" = set; then
5519  { echo "$as_me:$LINENO: checking for errno.h" >&5
5520echo $ECHO_N "checking for errno.h... $ECHO_C" >&6; }
5521if test "${ac_cv_header_errno_h+set}" = set; then
5522  echo $ECHO_N "(cached) $ECHO_C" >&6
5523fi
5524{ echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
5525echo "${ECHO_T}$ac_cv_header_errno_h" >&6; }
5526else
5527  # Is the header compilable?
5528{ echo "$as_me:$LINENO: checking errno.h usability" >&5
5529echo $ECHO_N "checking errno.h usability... $ECHO_C" >&6; }
5530cat >conftest.$ac_ext <<_ACEOF
5531/* confdefs.h.  */
5532_ACEOF
5533cat confdefs.h >>conftest.$ac_ext
5534cat >>conftest.$ac_ext <<_ACEOF
5535/* end confdefs.h.  */
5536$ac_includes_default
5537#include <errno.h>
5538_ACEOF
5539rm -f conftest.$ac_objext
5540if { (ac_try="$ac_compile"
5541case "(($ac_try" in
5542  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5543  *) ac_try_echo=$ac_try;;
5544esac
5545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5546  (eval "$ac_compile") 2>conftest.er1
5547  ac_status=$?
5548  grep -v '^ *+' conftest.er1 >conftest.err
5549  rm -f conftest.er1
5550  cat conftest.err >&5
5551  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5552  (exit $ac_status); } && {
5553	 test -z "$ac_c_werror_flag" ||
5554	 test ! -s conftest.err
5555       } && test -s conftest.$ac_objext; then
5556  ac_header_compiler=yes
5557else
5558  echo "$as_me: failed program was:" >&5
5559sed 's/^/| /' conftest.$ac_ext >&5
5560
5561	ac_header_compiler=no
5562fi
5563
5564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5565{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5566echo "${ECHO_T}$ac_header_compiler" >&6; }
5567
5568# Is the header present?
5569{ echo "$as_me:$LINENO: checking errno.h presence" >&5
5570echo $ECHO_N "checking errno.h presence... $ECHO_C" >&6; }
5571cat >conftest.$ac_ext <<_ACEOF
5572/* confdefs.h.  */
5573_ACEOF
5574cat confdefs.h >>conftest.$ac_ext
5575cat >>conftest.$ac_ext <<_ACEOF
5576/* end confdefs.h.  */
5577#include <errno.h>
5578_ACEOF
5579if { (ac_try="$ac_cpp conftest.$ac_ext"
5580case "(($ac_try" in
5581  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5582  *) ac_try_echo=$ac_try;;
5583esac
5584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5585  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5586  ac_status=$?
5587  grep -v '^ *+' conftest.er1 >conftest.err
5588  rm -f conftest.er1
5589  cat conftest.err >&5
5590  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5591  (exit $ac_status); } >/dev/null && {
5592	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5593	 test ! -s conftest.err
5594       }; then
5595  ac_header_preproc=yes
5596else
5597  echo "$as_me: failed program was:" >&5
5598sed 's/^/| /' conftest.$ac_ext >&5
5599
5600  ac_header_preproc=no
5601fi
5602
5603rm -f conftest.err conftest.$ac_ext
5604{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5605echo "${ECHO_T}$ac_header_preproc" >&6; }
5606
5607# So?  What about this header?
5608case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5609  yes:no: )
5610    { echo "$as_me:$LINENO: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
5611echo "$as_me: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5612    { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the compiler's result" >&5
5613echo "$as_me: WARNING: errno.h: proceeding with the compiler's result" >&2;}
5614    ac_header_preproc=yes
5615    ;;
5616  no:yes:* )
5617    { echo "$as_me:$LINENO: WARNING: errno.h: present but cannot be compiled" >&5
5618echo "$as_me: WARNING: errno.h: present but cannot be compiled" >&2;}
5619    { echo "$as_me:$LINENO: WARNING: errno.h:     check for missing prerequisite headers?" >&5
5620echo "$as_me: WARNING: errno.h:     check for missing prerequisite headers?" >&2;}
5621    { echo "$as_me:$LINENO: WARNING: errno.h: see the Autoconf documentation" >&5
5622echo "$as_me: WARNING: errno.h: see the Autoconf documentation" >&2;}
5623    { echo "$as_me:$LINENO: WARNING: errno.h:     section \"Present But Cannot Be Compiled\"" >&5
5624echo "$as_me: WARNING: errno.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5625    { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the preprocessor's result" >&5
5626echo "$as_me: WARNING: errno.h: proceeding with the preprocessor's result" >&2;}
5627    { echo "$as_me:$LINENO: WARNING: errno.h: in the future, the compiler will take precedence" >&5
5628echo "$as_me: WARNING: errno.h: in the future, the compiler will take precedence" >&2;}
5629
5630    ;;
5631esac
5632{ echo "$as_me:$LINENO: checking for errno.h" >&5
5633echo $ECHO_N "checking for errno.h... $ECHO_C" >&6; }
5634if test "${ac_cv_header_errno_h+set}" = set; then
5635  echo $ECHO_N "(cached) $ECHO_C" >&6
5636else
5637  ac_cv_header_errno_h=$ac_header_preproc
5638fi
5639{ echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
5640echo "${ECHO_T}$ac_cv_header_errno_h" >&6; }
5641
5642fi
5643if test $ac_cv_header_errno_h = yes; then
5644  :
5645else
5646
5647cat >>confdefs.h <<\_ACEOF
5648#define NO_ERRNO_H 1
5649_ACEOF
5650
5651fi
5652
5653
5654    if test "${ac_cv_header_float_h+set}" = set; then
5655  { echo "$as_me:$LINENO: checking for float.h" >&5
5656echo $ECHO_N "checking for float.h... $ECHO_C" >&6; }
5657if test "${ac_cv_header_float_h+set}" = set; then
5658  echo $ECHO_N "(cached) $ECHO_C" >&6
5659fi
5660{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
5661echo "${ECHO_T}$ac_cv_header_float_h" >&6; }
5662else
5663  # Is the header compilable?
5664{ echo "$as_me:$LINENO: checking float.h usability" >&5
5665echo $ECHO_N "checking float.h usability... $ECHO_C" >&6; }
5666cat >conftest.$ac_ext <<_ACEOF
5667/* confdefs.h.  */
5668_ACEOF
5669cat confdefs.h >>conftest.$ac_ext
5670cat >>conftest.$ac_ext <<_ACEOF
5671/* end confdefs.h.  */
5672$ac_includes_default
5673#include <float.h>
5674_ACEOF
5675rm -f conftest.$ac_objext
5676if { (ac_try="$ac_compile"
5677case "(($ac_try" in
5678  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5679  *) ac_try_echo=$ac_try;;
5680esac
5681eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5682  (eval "$ac_compile") 2>conftest.er1
5683  ac_status=$?
5684  grep -v '^ *+' conftest.er1 >conftest.err
5685  rm -f conftest.er1
5686  cat conftest.err >&5
5687  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5688  (exit $ac_status); } && {
5689	 test -z "$ac_c_werror_flag" ||
5690	 test ! -s conftest.err
5691       } && test -s conftest.$ac_objext; then
5692  ac_header_compiler=yes
5693else
5694  echo "$as_me: failed program was:" >&5
5695sed 's/^/| /' conftest.$ac_ext >&5
5696
5697	ac_header_compiler=no
5698fi
5699
5700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5701{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5702echo "${ECHO_T}$ac_header_compiler" >&6; }
5703
5704# Is the header present?
5705{ echo "$as_me:$LINENO: checking float.h presence" >&5
5706echo $ECHO_N "checking float.h presence... $ECHO_C" >&6; }
5707cat >conftest.$ac_ext <<_ACEOF
5708/* confdefs.h.  */
5709_ACEOF
5710cat confdefs.h >>conftest.$ac_ext
5711cat >>conftest.$ac_ext <<_ACEOF
5712/* end confdefs.h.  */
5713#include <float.h>
5714_ACEOF
5715if { (ac_try="$ac_cpp conftest.$ac_ext"
5716case "(($ac_try" in
5717  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5718  *) ac_try_echo=$ac_try;;
5719esac
5720eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5721  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5722  ac_status=$?
5723  grep -v '^ *+' conftest.er1 >conftest.err
5724  rm -f conftest.er1
5725  cat conftest.err >&5
5726  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5727  (exit $ac_status); } >/dev/null && {
5728	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5729	 test ! -s conftest.err
5730       }; then
5731  ac_header_preproc=yes
5732else
5733  echo "$as_me: failed program was:" >&5
5734sed 's/^/| /' conftest.$ac_ext >&5
5735
5736  ac_header_preproc=no
5737fi
5738
5739rm -f conftest.err conftest.$ac_ext
5740{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5741echo "${ECHO_T}$ac_header_preproc" >&6; }
5742
5743# So?  What about this header?
5744case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5745  yes:no: )
5746    { echo "$as_me:$LINENO: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&5
5747echo "$as_me: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5748    { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the compiler's result" >&5
5749echo "$as_me: WARNING: float.h: proceeding with the compiler's result" >&2;}
5750    ac_header_preproc=yes
5751    ;;
5752  no:yes:* )
5753    { echo "$as_me:$LINENO: WARNING: float.h: present but cannot be compiled" >&5
5754echo "$as_me: WARNING: float.h: present but cannot be compiled" >&2;}
5755    { echo "$as_me:$LINENO: WARNING: float.h:     check for missing prerequisite headers?" >&5
5756echo "$as_me: WARNING: float.h:     check for missing prerequisite headers?" >&2;}
5757    { echo "$as_me:$LINENO: WARNING: float.h: see the Autoconf documentation" >&5
5758echo "$as_me: WARNING: float.h: see the Autoconf documentation" >&2;}
5759    { echo "$as_me:$LINENO: WARNING: float.h:     section \"Present But Cannot Be Compiled\"" >&5
5760echo "$as_me: WARNING: float.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5761    { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the preprocessor's result" >&5
5762echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;}
5763    { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5
5764echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;}
5765
5766    ;;
5767esac
5768{ echo "$as_me:$LINENO: checking for float.h" >&5
5769echo $ECHO_N "checking for float.h... $ECHO_C" >&6; }
5770if test "${ac_cv_header_float_h+set}" = set; then
5771  echo $ECHO_N "(cached) $ECHO_C" >&6
5772else
5773  ac_cv_header_float_h=$ac_header_preproc
5774fi
5775{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
5776echo "${ECHO_T}$ac_cv_header_float_h" >&6; }
5777
5778fi
5779if test $ac_cv_header_float_h = yes; then
5780  :
5781else
5782
5783cat >>confdefs.h <<\_ACEOF
5784#define NO_FLOAT_H 1
5785_ACEOF
5786
5787fi
5788
5789
5790    if test "${ac_cv_header_values_h+set}" = set; then
5791  { echo "$as_me:$LINENO: checking for values.h" >&5
5792echo $ECHO_N "checking for values.h... $ECHO_C" >&6; }
5793if test "${ac_cv_header_values_h+set}" = set; then
5794  echo $ECHO_N "(cached) $ECHO_C" >&6
5795fi
5796{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
5797echo "${ECHO_T}$ac_cv_header_values_h" >&6; }
5798else
5799  # Is the header compilable?
5800{ echo "$as_me:$LINENO: checking values.h usability" >&5
5801echo $ECHO_N "checking values.h usability... $ECHO_C" >&6; }
5802cat >conftest.$ac_ext <<_ACEOF
5803/* confdefs.h.  */
5804_ACEOF
5805cat confdefs.h >>conftest.$ac_ext
5806cat >>conftest.$ac_ext <<_ACEOF
5807/* end confdefs.h.  */
5808$ac_includes_default
5809#include <values.h>
5810_ACEOF
5811rm -f conftest.$ac_objext
5812if { (ac_try="$ac_compile"
5813case "(($ac_try" in
5814  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5815  *) ac_try_echo=$ac_try;;
5816esac
5817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5818  (eval "$ac_compile") 2>conftest.er1
5819  ac_status=$?
5820  grep -v '^ *+' conftest.er1 >conftest.err
5821  rm -f conftest.er1
5822  cat conftest.err >&5
5823  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5824  (exit $ac_status); } && {
5825	 test -z "$ac_c_werror_flag" ||
5826	 test ! -s conftest.err
5827       } && test -s conftest.$ac_objext; then
5828  ac_header_compiler=yes
5829else
5830  echo "$as_me: failed program was:" >&5
5831sed 's/^/| /' conftest.$ac_ext >&5
5832
5833	ac_header_compiler=no
5834fi
5835
5836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5837{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5838echo "${ECHO_T}$ac_header_compiler" >&6; }
5839
5840# Is the header present?
5841{ echo "$as_me:$LINENO: checking values.h presence" >&5
5842echo $ECHO_N "checking values.h presence... $ECHO_C" >&6; }
5843cat >conftest.$ac_ext <<_ACEOF
5844/* confdefs.h.  */
5845_ACEOF
5846cat confdefs.h >>conftest.$ac_ext
5847cat >>conftest.$ac_ext <<_ACEOF
5848/* end confdefs.h.  */
5849#include <values.h>
5850_ACEOF
5851if { (ac_try="$ac_cpp conftest.$ac_ext"
5852case "(($ac_try" in
5853  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5854  *) ac_try_echo=$ac_try;;
5855esac
5856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5857  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5858  ac_status=$?
5859  grep -v '^ *+' conftest.er1 >conftest.err
5860  rm -f conftest.er1
5861  cat conftest.err >&5
5862  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5863  (exit $ac_status); } >/dev/null && {
5864	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5865	 test ! -s conftest.err
5866       }; then
5867  ac_header_preproc=yes
5868else
5869  echo "$as_me: failed program was:" >&5
5870sed 's/^/| /' conftest.$ac_ext >&5
5871
5872  ac_header_preproc=no
5873fi
5874
5875rm -f conftest.err conftest.$ac_ext
5876{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5877echo "${ECHO_T}$ac_header_preproc" >&6; }
5878
5879# So?  What about this header?
5880case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5881  yes:no: )
5882    { echo "$as_me:$LINENO: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&5
5883echo "$as_me: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5884    { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the compiler's result" >&5
5885echo "$as_me: WARNING: values.h: proceeding with the compiler's result" >&2;}
5886    ac_header_preproc=yes
5887    ;;
5888  no:yes:* )
5889    { echo "$as_me:$LINENO: WARNING: values.h: present but cannot be compiled" >&5
5890echo "$as_me: WARNING: values.h: present but cannot be compiled" >&2;}
5891    { echo "$as_me:$LINENO: WARNING: values.h:     check for missing prerequisite headers?" >&5
5892echo "$as_me: WARNING: values.h:     check for missing prerequisite headers?" >&2;}
5893    { echo "$as_me:$LINENO: WARNING: values.h: see the Autoconf documentation" >&5
5894echo "$as_me: WARNING: values.h: see the Autoconf documentation" >&2;}
5895    { echo "$as_me:$LINENO: WARNING: values.h:     section \"Present But Cannot Be Compiled\"" >&5
5896echo "$as_me: WARNING: values.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5897    { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the preprocessor's result" >&5
5898echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;}
5899    { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5
5900echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;}
5901
5902    ;;
5903esac
5904{ echo "$as_me:$LINENO: checking for values.h" >&5
5905echo $ECHO_N "checking for values.h... $ECHO_C" >&6; }
5906if test "${ac_cv_header_values_h+set}" = set; then
5907  echo $ECHO_N "(cached) $ECHO_C" >&6
5908else
5909  ac_cv_header_values_h=$ac_header_preproc
5910fi
5911{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
5912echo "${ECHO_T}$ac_cv_header_values_h" >&6; }
5913
5914fi
5915if test $ac_cv_header_values_h = yes; then
5916  :
5917else
5918
5919cat >>confdefs.h <<\_ACEOF
5920#define NO_VALUES_H 1
5921_ACEOF
5922
5923fi
5924
5925
5926    if test "${ac_cv_header_limits_h+set}" = set; then
5927  { echo "$as_me:$LINENO: checking for limits.h" >&5
5928echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; }
5929if test "${ac_cv_header_limits_h+set}" = set; then
5930  echo $ECHO_N "(cached) $ECHO_C" >&6
5931fi
5932{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
5933echo "${ECHO_T}$ac_cv_header_limits_h" >&6; }
5934else
5935  # Is the header compilable?
5936{ echo "$as_me:$LINENO: checking limits.h usability" >&5
5937echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6; }
5938cat >conftest.$ac_ext <<_ACEOF
5939/* confdefs.h.  */
5940_ACEOF
5941cat confdefs.h >>conftest.$ac_ext
5942cat >>conftest.$ac_ext <<_ACEOF
5943/* end confdefs.h.  */
5944$ac_includes_default
5945#include <limits.h>
5946_ACEOF
5947rm -f conftest.$ac_objext
5948if { (ac_try="$ac_compile"
5949case "(($ac_try" in
5950  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5951  *) ac_try_echo=$ac_try;;
5952esac
5953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5954  (eval "$ac_compile") 2>conftest.er1
5955  ac_status=$?
5956  grep -v '^ *+' conftest.er1 >conftest.err
5957  rm -f conftest.er1
5958  cat conftest.err >&5
5959  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5960  (exit $ac_status); } && {
5961	 test -z "$ac_c_werror_flag" ||
5962	 test ! -s conftest.err
5963       } && test -s conftest.$ac_objext; then
5964  ac_header_compiler=yes
5965else
5966  echo "$as_me: failed program was:" >&5
5967sed 's/^/| /' conftest.$ac_ext >&5
5968
5969	ac_header_compiler=no
5970fi
5971
5972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5973{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5974echo "${ECHO_T}$ac_header_compiler" >&6; }
5975
5976# Is the header present?
5977{ echo "$as_me:$LINENO: checking limits.h presence" >&5
5978echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6; }
5979cat >conftest.$ac_ext <<_ACEOF
5980/* confdefs.h.  */
5981_ACEOF
5982cat confdefs.h >>conftest.$ac_ext
5983cat >>conftest.$ac_ext <<_ACEOF
5984/* end confdefs.h.  */
5985#include <limits.h>
5986_ACEOF
5987if { (ac_try="$ac_cpp conftest.$ac_ext"
5988case "(($ac_try" in
5989  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5990  *) ac_try_echo=$ac_try;;
5991esac
5992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5993  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5994  ac_status=$?
5995  grep -v '^ *+' conftest.er1 >conftest.err
5996  rm -f conftest.er1
5997  cat conftest.err >&5
5998  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5999  (exit $ac_status); } >/dev/null && {
6000	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6001	 test ! -s conftest.err
6002       }; then
6003  ac_header_preproc=yes
6004else
6005  echo "$as_me: failed program was:" >&5
6006sed 's/^/| /' conftest.$ac_ext >&5
6007
6008  ac_header_preproc=no
6009fi
6010
6011rm -f conftest.err conftest.$ac_ext
6012{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6013echo "${ECHO_T}$ac_header_preproc" >&6; }
6014
6015# So?  What about this header?
6016case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6017  yes:no: )
6018    { echo "$as_me:$LINENO: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&5
6019echo "$as_me: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6020    { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the compiler's result" >&5
6021echo "$as_me: WARNING: limits.h: proceeding with the compiler's result" >&2;}
6022    ac_header_preproc=yes
6023    ;;
6024  no:yes:* )
6025    { echo "$as_me:$LINENO: WARNING: limits.h: present but cannot be compiled" >&5
6026echo "$as_me: WARNING: limits.h: present but cannot be compiled" >&2;}
6027    { echo "$as_me:$LINENO: WARNING: limits.h:     check for missing prerequisite headers?" >&5
6028echo "$as_me: WARNING: limits.h:     check for missing prerequisite headers?" >&2;}
6029    { echo "$as_me:$LINENO: WARNING: limits.h: see the Autoconf documentation" >&5
6030echo "$as_me: WARNING: limits.h: see the Autoconf documentation" >&2;}
6031    { echo "$as_me:$LINENO: WARNING: limits.h:     section \"Present But Cannot Be Compiled\"" >&5
6032echo "$as_me: WARNING: limits.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6033    { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the preprocessor's result" >&5
6034echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;}
6035    { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5
6036echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;}
6037
6038    ;;
6039esac
6040{ echo "$as_me:$LINENO: checking for limits.h" >&5
6041echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; }
6042if test "${ac_cv_header_limits_h+set}" = set; then
6043  echo $ECHO_N "(cached) $ECHO_C" >&6
6044else
6045  ac_cv_header_limits_h=$ac_header_preproc
6046fi
6047{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
6048echo "${ECHO_T}$ac_cv_header_limits_h" >&6; }
6049
6050fi
6051if test $ac_cv_header_limits_h = yes; then
6052
6053cat >>confdefs.h <<\_ACEOF
6054#define HAVE_LIMITS_H 1
6055_ACEOF
6056
6057else
6058
6059cat >>confdefs.h <<\_ACEOF
6060#define NO_LIMITS_H 1
6061_ACEOF
6062
6063fi
6064
6065
6066    if test "${ac_cv_header_stdlib_h+set}" = set; then
6067  { echo "$as_me:$LINENO: checking for stdlib.h" >&5
6068echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; }
6069if test "${ac_cv_header_stdlib_h+set}" = set; then
6070  echo $ECHO_N "(cached) $ECHO_C" >&6
6071fi
6072{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
6073echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; }
6074else
6075  # Is the header compilable?
6076{ echo "$as_me:$LINENO: checking stdlib.h usability" >&5
6077echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6; }
6078cat >conftest.$ac_ext <<_ACEOF
6079/* confdefs.h.  */
6080_ACEOF
6081cat confdefs.h >>conftest.$ac_ext
6082cat >>conftest.$ac_ext <<_ACEOF
6083/* end confdefs.h.  */
6084$ac_includes_default
6085#include <stdlib.h>
6086_ACEOF
6087rm -f conftest.$ac_objext
6088if { (ac_try="$ac_compile"
6089case "(($ac_try" in
6090  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6091  *) ac_try_echo=$ac_try;;
6092esac
6093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6094  (eval "$ac_compile") 2>conftest.er1
6095  ac_status=$?
6096  grep -v '^ *+' conftest.er1 >conftest.err
6097  rm -f conftest.er1
6098  cat conftest.err >&5
6099  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6100  (exit $ac_status); } && {
6101	 test -z "$ac_c_werror_flag" ||
6102	 test ! -s conftest.err
6103       } && test -s conftest.$ac_objext; then
6104  ac_header_compiler=yes
6105else
6106  echo "$as_me: failed program was:" >&5
6107sed 's/^/| /' conftest.$ac_ext >&5
6108
6109	ac_header_compiler=no
6110fi
6111
6112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6113{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6114echo "${ECHO_T}$ac_header_compiler" >&6; }
6115
6116# Is the header present?
6117{ echo "$as_me:$LINENO: checking stdlib.h presence" >&5
6118echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6; }
6119cat >conftest.$ac_ext <<_ACEOF
6120/* confdefs.h.  */
6121_ACEOF
6122cat confdefs.h >>conftest.$ac_ext
6123cat >>conftest.$ac_ext <<_ACEOF
6124/* end confdefs.h.  */
6125#include <stdlib.h>
6126_ACEOF
6127if { (ac_try="$ac_cpp conftest.$ac_ext"
6128case "(($ac_try" in
6129  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6130  *) ac_try_echo=$ac_try;;
6131esac
6132eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6133  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6134  ac_status=$?
6135  grep -v '^ *+' conftest.er1 >conftest.err
6136  rm -f conftest.er1
6137  cat conftest.err >&5
6138  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6139  (exit $ac_status); } >/dev/null && {
6140	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6141	 test ! -s conftest.err
6142       }; then
6143  ac_header_preproc=yes
6144else
6145  echo "$as_me: failed program was:" >&5
6146sed 's/^/| /' conftest.$ac_ext >&5
6147
6148  ac_header_preproc=no
6149fi
6150
6151rm -f conftest.err conftest.$ac_ext
6152{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6153echo "${ECHO_T}$ac_header_preproc" >&6; }
6154
6155# So?  What about this header?
6156case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6157  yes:no: )
6158    { echo "$as_me:$LINENO: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
6159echo "$as_me: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6160    { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the compiler's result" >&5
6161echo "$as_me: WARNING: stdlib.h: proceeding with the compiler's result" >&2;}
6162    ac_header_preproc=yes
6163    ;;
6164  no:yes:* )
6165    { echo "$as_me:$LINENO: WARNING: stdlib.h: present but cannot be compiled" >&5
6166echo "$as_me: WARNING: stdlib.h: present but cannot be compiled" >&2;}
6167    { echo "$as_me:$LINENO: WARNING: stdlib.h:     check for missing prerequisite headers?" >&5
6168echo "$as_me: WARNING: stdlib.h:     check for missing prerequisite headers?" >&2;}
6169    { echo "$as_me:$LINENO: WARNING: stdlib.h: see the Autoconf documentation" >&5
6170echo "$as_me: WARNING: stdlib.h: see the Autoconf documentation" >&2;}
6171    { echo "$as_me:$LINENO: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&5
6172echo "$as_me: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6173    { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the preprocessor's result" >&5
6174echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;}
6175    { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5
6176echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;}
6177
6178    ;;
6179esac
6180{ echo "$as_me:$LINENO: checking for stdlib.h" >&5
6181echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; }
6182if test "${ac_cv_header_stdlib_h+set}" = set; then
6183  echo $ECHO_N "(cached) $ECHO_C" >&6
6184else
6185  ac_cv_header_stdlib_h=$ac_header_preproc
6186fi
6187{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
6188echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; }
6189
6190fi
6191if test $ac_cv_header_stdlib_h = yes; then
6192  tcl_ok=1
6193else
6194  tcl_ok=0
6195fi
6196
6197
6198    cat >conftest.$ac_ext <<_ACEOF
6199/* confdefs.h.  */
6200_ACEOF
6201cat confdefs.h >>conftest.$ac_ext
6202cat >>conftest.$ac_ext <<_ACEOF
6203/* end confdefs.h.  */
6204#include <stdlib.h>
6205
6206_ACEOF
6207if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6208  $EGREP "strtol" >/dev/null 2>&1; then
6209  :
6210else
6211  tcl_ok=0
6212fi
6213rm -f -r conftest*
6214
6215    cat >conftest.$ac_ext <<_ACEOF
6216/* confdefs.h.  */
6217_ACEOF
6218cat confdefs.h >>conftest.$ac_ext
6219cat >>conftest.$ac_ext <<_ACEOF
6220/* end confdefs.h.  */
6221#include <stdlib.h>
6222
6223_ACEOF
6224if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6225  $EGREP "strtoul" >/dev/null 2>&1; then
6226  :
6227else
6228  tcl_ok=0
6229fi
6230rm -f -r conftest*
6231
6232    cat >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 <stdlib.h>
6239
6240_ACEOF
6241if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6242  $EGREP "strtod" >/dev/null 2>&1; then
6243  :
6244else
6245  tcl_ok=0
6246fi
6247rm -f -r conftest*
6248
6249    if test $tcl_ok = 0; then
6250
6251cat >>confdefs.h <<\_ACEOF
6252#define NO_STDLIB_H 1
6253_ACEOF
6254
6255    fi
6256    if test "${ac_cv_header_string_h+set}" = set; then
6257  { echo "$as_me:$LINENO: checking for string.h" >&5
6258echo $ECHO_N "checking for string.h... $ECHO_C" >&6; }
6259if test "${ac_cv_header_string_h+set}" = set; then
6260  echo $ECHO_N "(cached) $ECHO_C" >&6
6261fi
6262{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
6263echo "${ECHO_T}$ac_cv_header_string_h" >&6; }
6264else
6265  # Is the header compilable?
6266{ echo "$as_me:$LINENO: checking string.h usability" >&5
6267echo $ECHO_N "checking string.h usability... $ECHO_C" >&6; }
6268cat >conftest.$ac_ext <<_ACEOF
6269/* confdefs.h.  */
6270_ACEOF
6271cat confdefs.h >>conftest.$ac_ext
6272cat >>conftest.$ac_ext <<_ACEOF
6273/* end confdefs.h.  */
6274$ac_includes_default
6275#include <string.h>
6276_ACEOF
6277rm -f conftest.$ac_objext
6278if { (ac_try="$ac_compile"
6279case "(($ac_try" in
6280  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6281  *) ac_try_echo=$ac_try;;
6282esac
6283eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6284  (eval "$ac_compile") 2>conftest.er1
6285  ac_status=$?
6286  grep -v '^ *+' conftest.er1 >conftest.err
6287  rm -f conftest.er1
6288  cat conftest.err >&5
6289  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6290  (exit $ac_status); } && {
6291	 test -z "$ac_c_werror_flag" ||
6292	 test ! -s conftest.err
6293       } && test -s conftest.$ac_objext; then
6294  ac_header_compiler=yes
6295else
6296  echo "$as_me: failed program was:" >&5
6297sed 's/^/| /' conftest.$ac_ext >&5
6298
6299	ac_header_compiler=no
6300fi
6301
6302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6303{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6304echo "${ECHO_T}$ac_header_compiler" >&6; }
6305
6306# Is the header present?
6307{ echo "$as_me:$LINENO: checking string.h presence" >&5
6308echo $ECHO_N "checking string.h presence... $ECHO_C" >&6; }
6309cat >conftest.$ac_ext <<_ACEOF
6310/* confdefs.h.  */
6311_ACEOF
6312cat confdefs.h >>conftest.$ac_ext
6313cat >>conftest.$ac_ext <<_ACEOF
6314/* end confdefs.h.  */
6315#include <string.h>
6316_ACEOF
6317if { (ac_try="$ac_cpp conftest.$ac_ext"
6318case "(($ac_try" in
6319  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6320  *) ac_try_echo=$ac_try;;
6321esac
6322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6323  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6324  ac_status=$?
6325  grep -v '^ *+' conftest.er1 >conftest.err
6326  rm -f conftest.er1
6327  cat conftest.err >&5
6328  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6329  (exit $ac_status); } >/dev/null && {
6330	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6331	 test ! -s conftest.err
6332       }; then
6333  ac_header_preproc=yes
6334else
6335  echo "$as_me: failed program was:" >&5
6336sed 's/^/| /' conftest.$ac_ext >&5
6337
6338  ac_header_preproc=no
6339fi
6340
6341rm -f conftest.err conftest.$ac_ext
6342{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6343echo "${ECHO_T}$ac_header_preproc" >&6; }
6344
6345# So?  What about this header?
6346case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6347  yes:no: )
6348    { echo "$as_me:$LINENO: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&5
6349echo "$as_me: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6350    { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the compiler's result" >&5
6351echo "$as_me: WARNING: string.h: proceeding with the compiler's result" >&2;}
6352    ac_header_preproc=yes
6353    ;;
6354  no:yes:* )
6355    { echo "$as_me:$LINENO: WARNING: string.h: present but cannot be compiled" >&5
6356echo "$as_me: WARNING: string.h: present but cannot be compiled" >&2;}
6357    { echo "$as_me:$LINENO: WARNING: string.h:     check for missing prerequisite headers?" >&5
6358echo "$as_me: WARNING: string.h:     check for missing prerequisite headers?" >&2;}
6359    { echo "$as_me:$LINENO: WARNING: string.h: see the Autoconf documentation" >&5
6360echo "$as_me: WARNING: string.h: see the Autoconf documentation" >&2;}
6361    { echo "$as_me:$LINENO: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&5
6362echo "$as_me: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6363    { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the preprocessor's result" >&5
6364echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;}
6365    { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5
6366echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;}
6367
6368    ;;
6369esac
6370{ echo "$as_me:$LINENO: checking for string.h" >&5
6371echo $ECHO_N "checking for string.h... $ECHO_C" >&6; }
6372if test "${ac_cv_header_string_h+set}" = set; then
6373  echo $ECHO_N "(cached) $ECHO_C" >&6
6374else
6375  ac_cv_header_string_h=$ac_header_preproc
6376fi
6377{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
6378echo "${ECHO_T}$ac_cv_header_string_h" >&6; }
6379
6380fi
6381if test $ac_cv_header_string_h = yes; then
6382  tcl_ok=1
6383else
6384  tcl_ok=0
6385fi
6386
6387
6388    cat >conftest.$ac_ext <<_ACEOF
6389/* confdefs.h.  */
6390_ACEOF
6391cat confdefs.h >>conftest.$ac_ext
6392cat >>conftest.$ac_ext <<_ACEOF
6393/* end confdefs.h.  */
6394#include <string.h>
6395
6396_ACEOF
6397if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6398  $EGREP "strstr" >/dev/null 2>&1; then
6399  :
6400else
6401  tcl_ok=0
6402fi
6403rm -f -r conftest*
6404
6405    cat >conftest.$ac_ext <<_ACEOF
6406/* confdefs.h.  */
6407_ACEOF
6408cat confdefs.h >>conftest.$ac_ext
6409cat >>conftest.$ac_ext <<_ACEOF
6410/* end confdefs.h.  */
6411#include <string.h>
6412
6413_ACEOF
6414if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6415  $EGREP "strerror" >/dev/null 2>&1; then
6416  :
6417else
6418  tcl_ok=0
6419fi
6420rm -f -r conftest*
6421
6422
6423    # See also memmove check below for a place where NO_STRING_H can be
6424    # set and why.
6425
6426    if test $tcl_ok = 0; then
6427
6428cat >>confdefs.h <<\_ACEOF
6429#define NO_STRING_H 1
6430_ACEOF
6431
6432    fi
6433
6434    if test "${ac_cv_header_sys_wait_h+set}" = set; then
6435  { echo "$as_me:$LINENO: checking for sys/wait.h" >&5
6436echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; }
6437if test "${ac_cv_header_sys_wait_h+set}" = set; then
6438  echo $ECHO_N "(cached) $ECHO_C" >&6
6439fi
6440{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
6441echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
6442else
6443  # Is the header compilable?
6444{ echo "$as_me:$LINENO: checking sys/wait.h usability" >&5
6445echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6; }
6446cat >conftest.$ac_ext <<_ACEOF
6447/* confdefs.h.  */
6448_ACEOF
6449cat confdefs.h >>conftest.$ac_ext
6450cat >>conftest.$ac_ext <<_ACEOF
6451/* end confdefs.h.  */
6452$ac_includes_default
6453#include <sys/wait.h>
6454_ACEOF
6455rm -f conftest.$ac_objext
6456if { (ac_try="$ac_compile"
6457case "(($ac_try" in
6458  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6459  *) ac_try_echo=$ac_try;;
6460esac
6461eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6462  (eval "$ac_compile") 2>conftest.er1
6463  ac_status=$?
6464  grep -v '^ *+' conftest.er1 >conftest.err
6465  rm -f conftest.er1
6466  cat conftest.err >&5
6467  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6468  (exit $ac_status); } && {
6469	 test -z "$ac_c_werror_flag" ||
6470	 test ! -s conftest.err
6471       } && test -s conftest.$ac_objext; then
6472  ac_header_compiler=yes
6473else
6474  echo "$as_me: failed program was:" >&5
6475sed 's/^/| /' conftest.$ac_ext >&5
6476
6477	ac_header_compiler=no
6478fi
6479
6480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6481{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6482echo "${ECHO_T}$ac_header_compiler" >&6; }
6483
6484# Is the header present?
6485{ echo "$as_me:$LINENO: checking sys/wait.h presence" >&5
6486echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6; }
6487cat >conftest.$ac_ext <<_ACEOF
6488/* confdefs.h.  */
6489_ACEOF
6490cat confdefs.h >>conftest.$ac_ext
6491cat >>conftest.$ac_ext <<_ACEOF
6492/* end confdefs.h.  */
6493#include <sys/wait.h>
6494_ACEOF
6495if { (ac_try="$ac_cpp conftest.$ac_ext"
6496case "(($ac_try" in
6497  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6498  *) ac_try_echo=$ac_try;;
6499esac
6500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6501  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6502  ac_status=$?
6503  grep -v '^ *+' conftest.er1 >conftest.err
6504  rm -f conftest.er1
6505  cat conftest.err >&5
6506  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6507  (exit $ac_status); } >/dev/null && {
6508	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6509	 test ! -s conftest.err
6510       }; then
6511  ac_header_preproc=yes
6512else
6513  echo "$as_me: failed program was:" >&5
6514sed 's/^/| /' conftest.$ac_ext >&5
6515
6516  ac_header_preproc=no
6517fi
6518
6519rm -f conftest.err conftest.$ac_ext
6520{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6521echo "${ECHO_T}$ac_header_preproc" >&6; }
6522
6523# So?  What about this header?
6524case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6525  yes:no: )
6526    { echo "$as_me:$LINENO: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&5
6527echo "$as_me: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6528    { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the compiler's result" >&5
6529echo "$as_me: WARNING: sys/wait.h: proceeding with the compiler's result" >&2;}
6530    ac_header_preproc=yes
6531    ;;
6532  no:yes:* )
6533    { echo "$as_me:$LINENO: WARNING: sys/wait.h: present but cannot be compiled" >&5
6534echo "$as_me: WARNING: sys/wait.h: present but cannot be compiled" >&2;}
6535    { echo "$as_me:$LINENO: WARNING: sys/wait.h:     check for missing prerequisite headers?" >&5
6536echo "$as_me: WARNING: sys/wait.h:     check for missing prerequisite headers?" >&2;}
6537    { echo "$as_me:$LINENO: WARNING: sys/wait.h: see the Autoconf documentation" >&5
6538echo "$as_me: WARNING: sys/wait.h: see the Autoconf documentation" >&2;}
6539    { echo "$as_me:$LINENO: WARNING: sys/wait.h:     section \"Present But Cannot Be Compiled\"" >&5
6540echo "$as_me: WARNING: sys/wait.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6541    { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&5
6542echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;}
6543    { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5
6544echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;}
6545
6546    ;;
6547esac
6548{ echo "$as_me:$LINENO: checking for sys/wait.h" >&5
6549echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; }
6550if test "${ac_cv_header_sys_wait_h+set}" = set; then
6551  echo $ECHO_N "(cached) $ECHO_C" >&6
6552else
6553  ac_cv_header_sys_wait_h=$ac_header_preproc
6554fi
6555{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
6556echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
6557
6558fi
6559if test $ac_cv_header_sys_wait_h = yes; then
6560  :
6561else
6562
6563cat >>confdefs.h <<\_ACEOF
6564#define NO_SYS_WAIT_H 1
6565_ACEOF
6566
6567fi
6568
6569
6570    if test "${ac_cv_header_dlfcn_h+set}" = set; then
6571  { echo "$as_me:$LINENO: checking for dlfcn.h" >&5
6572echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; }
6573if test "${ac_cv_header_dlfcn_h+set}" = set; then
6574  echo $ECHO_N "(cached) $ECHO_C" >&6
6575fi
6576{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
6577echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; }
6578else
6579  # Is the header compilable?
6580{ echo "$as_me:$LINENO: checking dlfcn.h usability" >&5
6581echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6; }
6582cat >conftest.$ac_ext <<_ACEOF
6583/* confdefs.h.  */
6584_ACEOF
6585cat confdefs.h >>conftest.$ac_ext
6586cat >>conftest.$ac_ext <<_ACEOF
6587/* end confdefs.h.  */
6588$ac_includes_default
6589#include <dlfcn.h>
6590_ACEOF
6591rm -f conftest.$ac_objext
6592if { (ac_try="$ac_compile"
6593case "(($ac_try" in
6594  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6595  *) ac_try_echo=$ac_try;;
6596esac
6597eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6598  (eval "$ac_compile") 2>conftest.er1
6599  ac_status=$?
6600  grep -v '^ *+' conftest.er1 >conftest.err
6601  rm -f conftest.er1
6602  cat conftest.err >&5
6603  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6604  (exit $ac_status); } && {
6605	 test -z "$ac_c_werror_flag" ||
6606	 test ! -s conftest.err
6607       } && test -s conftest.$ac_objext; then
6608  ac_header_compiler=yes
6609else
6610  echo "$as_me: failed program was:" >&5
6611sed 's/^/| /' conftest.$ac_ext >&5
6612
6613	ac_header_compiler=no
6614fi
6615
6616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6617{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6618echo "${ECHO_T}$ac_header_compiler" >&6; }
6619
6620# Is the header present?
6621{ echo "$as_me:$LINENO: checking dlfcn.h presence" >&5
6622echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6; }
6623cat >conftest.$ac_ext <<_ACEOF
6624/* confdefs.h.  */
6625_ACEOF
6626cat confdefs.h >>conftest.$ac_ext
6627cat >>conftest.$ac_ext <<_ACEOF
6628/* end confdefs.h.  */
6629#include <dlfcn.h>
6630_ACEOF
6631if { (ac_try="$ac_cpp conftest.$ac_ext"
6632case "(($ac_try" in
6633  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6634  *) ac_try_echo=$ac_try;;
6635esac
6636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6637  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6638  ac_status=$?
6639  grep -v '^ *+' conftest.er1 >conftest.err
6640  rm -f conftest.er1
6641  cat conftest.err >&5
6642  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6643  (exit $ac_status); } >/dev/null && {
6644	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6645	 test ! -s conftest.err
6646       }; then
6647  ac_header_preproc=yes
6648else
6649  echo "$as_me: failed program was:" >&5
6650sed 's/^/| /' conftest.$ac_ext >&5
6651
6652  ac_header_preproc=no
6653fi
6654
6655rm -f conftest.err conftest.$ac_ext
6656{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6657echo "${ECHO_T}$ac_header_preproc" >&6; }
6658
6659# So?  What about this header?
6660case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6661  yes:no: )
6662    { echo "$as_me:$LINENO: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&5
6663echo "$as_me: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6664    { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the compiler's result" >&5
6665echo "$as_me: WARNING: dlfcn.h: proceeding with the compiler's result" >&2;}
6666    ac_header_preproc=yes
6667    ;;
6668  no:yes:* )
6669    { echo "$as_me:$LINENO: WARNING: dlfcn.h: present but cannot be compiled" >&5
6670echo "$as_me: WARNING: dlfcn.h: present but cannot be compiled" >&2;}
6671    { echo "$as_me:$LINENO: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&5
6672echo "$as_me: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&2;}
6673    { echo "$as_me:$LINENO: WARNING: dlfcn.h: see the Autoconf documentation" >&5
6674echo "$as_me: WARNING: dlfcn.h: see the Autoconf documentation" >&2;}
6675    { echo "$as_me:$LINENO: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&5
6676echo "$as_me: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6677    { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5
6678echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;}
6679    { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5
6680echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;}
6681
6682    ;;
6683esac
6684{ echo "$as_me:$LINENO: checking for dlfcn.h" >&5
6685echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; }
6686if test "${ac_cv_header_dlfcn_h+set}" = set; then
6687  echo $ECHO_N "(cached) $ECHO_C" >&6
6688else
6689  ac_cv_header_dlfcn_h=$ac_header_preproc
6690fi
6691{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
6692echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; }
6693
6694fi
6695if test $ac_cv_header_dlfcn_h = yes; then
6696  :
6697else
6698
6699cat >>confdefs.h <<\_ACEOF
6700#define NO_DLFCN_H 1
6701_ACEOF
6702
6703fi
6704
6705
6706
6707    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
6708
6709for ac_header in sys/param.h
6710do
6711as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6712if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6713  { echo "$as_me:$LINENO: checking for $ac_header" >&5
6714echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6715if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6716  echo $ECHO_N "(cached) $ECHO_C" >&6
6717fi
6718ac_res=`eval echo '${'$as_ac_Header'}'`
6719	       { echo "$as_me:$LINENO: result: $ac_res" >&5
6720echo "${ECHO_T}$ac_res" >&6; }
6721else
6722  # Is the header compilable?
6723{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6724echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
6725cat >conftest.$ac_ext <<_ACEOF
6726/* confdefs.h.  */
6727_ACEOF
6728cat confdefs.h >>conftest.$ac_ext
6729cat >>conftest.$ac_ext <<_ACEOF
6730/* end confdefs.h.  */
6731$ac_includes_default
6732#include <$ac_header>
6733_ACEOF
6734rm -f conftest.$ac_objext
6735if { (ac_try="$ac_compile"
6736case "(($ac_try" in
6737  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6738  *) ac_try_echo=$ac_try;;
6739esac
6740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6741  (eval "$ac_compile") 2>conftest.er1
6742  ac_status=$?
6743  grep -v '^ *+' conftest.er1 >conftest.err
6744  rm -f conftest.er1
6745  cat conftest.err >&5
6746  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6747  (exit $ac_status); } && {
6748	 test -z "$ac_c_werror_flag" ||
6749	 test ! -s conftest.err
6750       } && test -s conftest.$ac_objext; then
6751  ac_header_compiler=yes
6752else
6753  echo "$as_me: failed program was:" >&5
6754sed 's/^/| /' conftest.$ac_ext >&5
6755
6756	ac_header_compiler=no
6757fi
6758
6759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6760{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6761echo "${ECHO_T}$ac_header_compiler" >&6; }
6762
6763# Is the header present?
6764{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6765echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
6766cat >conftest.$ac_ext <<_ACEOF
6767/* confdefs.h.  */
6768_ACEOF
6769cat confdefs.h >>conftest.$ac_ext
6770cat >>conftest.$ac_ext <<_ACEOF
6771/* end confdefs.h.  */
6772#include <$ac_header>
6773_ACEOF
6774if { (ac_try="$ac_cpp conftest.$ac_ext"
6775case "(($ac_try" in
6776  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6777  *) ac_try_echo=$ac_try;;
6778esac
6779eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6780  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6781  ac_status=$?
6782  grep -v '^ *+' conftest.er1 >conftest.err
6783  rm -f conftest.er1
6784  cat conftest.err >&5
6785  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6786  (exit $ac_status); } >/dev/null && {
6787	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6788	 test ! -s conftest.err
6789       }; then
6790  ac_header_preproc=yes
6791else
6792  echo "$as_me: failed program was:" >&5
6793sed 's/^/| /' conftest.$ac_ext >&5
6794
6795  ac_header_preproc=no
6796fi
6797
6798rm -f conftest.err conftest.$ac_ext
6799{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6800echo "${ECHO_T}$ac_header_preproc" >&6; }
6801
6802# So?  What about this header?
6803case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6804  yes:no: )
6805    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6806echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6807    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6808echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6809    ac_header_preproc=yes
6810    ;;
6811  no:yes:* )
6812    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6813echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6814    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
6815echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
6816    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6817echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6818    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
6819echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
6820    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6821echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6822    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6823echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6824
6825    ;;
6826esac
6827{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6828echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6829if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6830  echo $ECHO_N "(cached) $ECHO_C" >&6
6831else
6832  eval "$as_ac_Header=\$ac_header_preproc"
6833fi
6834ac_res=`eval echo '${'$as_ac_Header'}'`
6835	       { echo "$as_me:$LINENO: result: $ac_res" >&5
6836echo "${ECHO_T}$ac_res" >&6; }
6837
6838fi
6839if test `eval echo '${'$as_ac_Header'}'` = yes; then
6840  cat >>confdefs.h <<_ACEOF
6841#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6842_ACEOF
6843
6844fi
6845
6846done
6847
6848
6849	# Let the user call this, because if it triggers, they will
6850	# need a compat/strtod.c that is correct.  Users can also
6851	# use Tcl_GetDouble(FromObj) instead.
6852	#TEA_BUGGY_STRTOD
6853    fi
6854
6855
6856#-----------------------------------------------------------------------
6857# __CHANGE__
6858# Specify the C source files to compile in TEA_ADD_SOURCES,
6859# public headers that need to be installed in TEA_ADD_HEADERS,
6860# stub library C source files to compile in TEA_ADD_STUB_SOURCES,
6861# and runtime Tcl library files in TEA_ADD_TCL_SOURCES.
6862# This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS
6863# and PKG_TCL_SOURCES.
6864#-----------------------------------------------------------------------
6865
6866
6867    vars="snack.c jkSound.c jkSoundEngine.c jkSoundEdit.c jkSoundFile.c
6868	jkCanvSpeg.c jkCanvWave.c jkCanvSect.c ffa.c g711.c
6869	jkFormatMP3.c jkSoundProc.c jkPitchCmd.c snackStubInit.c
6870	jkAudio.c jkMixer.c shape.c jkFilter.c jkSynthesis.c jkFilterIIR.c
6871	jkGetF0.c sigproc.c jkFormant.c sigproc2.c"
6872    for i in $vars; do
6873	case $i in
6874	    \$*)
6875		# allow $-var names
6876		PKG_SOURCES="$PKG_SOURCES $i"
6877		PKG_OBJECTS="$PKG_OBJECTS $i"
6878		;;
6879	    *)
6880		# check for existence - allows for generic/win/unix VPATH
6881		# To add more dirs here (like 'src'), you have to update VPATH
6882		# in Makefile.in as well
6883		if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
6884		    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
6885		    -a ! -f "${srcdir}/macosx/$i" \
6886		    ; then
6887		    { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
6888echo "$as_me: error: could not find source file '$i'" >&2;}
6889   { (exit 1); exit 1; }; }
6890		fi
6891		PKG_SOURCES="$PKG_SOURCES $i"
6892		# this assumes it is in a VPATH dir
6893		i=`basename $i`
6894		# handle user calling this before or after TEA_SETUP_COMPILER
6895		if test x"${OBJEXT}" != x ; then
6896		    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
6897		else
6898		    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
6899		fi
6900		PKG_OBJECTS="$PKG_OBJECTS $j"
6901		;;
6902	esac
6903    done
6904
6905
6906
6907
6908    vars="-I\$(srcdir)/generic"
6909    for i in $vars; do
6910	PKG_INCLUDES="$PKG_INCLUDES $i"
6911    done
6912
6913
6914
6915    vars="snackStubLib.c"
6916    for i in $vars; do
6917	# check for existence - allows for generic/win/unix VPATH
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 stub source file '$i'" >&5
6923echo "$as_me: error: could not find stub source file '$i'" >&2;}
6924   { (exit 1); exit 1; }; }
6925	fi
6926	PKG_STUB_SOURCES="$PKG_STUB_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_STUB_OBJECTS="$PKG_STUB_OBJECTS $j"
6936    done
6937
6938
6939
6940
6941    vars="unix/snack.tcl"
6942    for i in $vars; do
6943	# check for existence, be strict because it is installed
6944	if test ! -f "${srcdir}/$i" ; then
6945	    { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
6946echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
6947   { (exit 1); exit 1; }; }
6948	fi
6949	PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
6950    done
6951
6952
6953
6954
6955
6956#--------------------------------------------------------------------
6957# __CHANGE__
6958# Choose which headers you need.  Extension authors should try very
6959# hard to only rely on the Tcl public header files.  Internal headers
6960# contain private data structures and are subject to change without
6961# notice.
6962# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
6963#--------------------------------------------------------------------
6964
6965
6966    { echo "$as_me:$LINENO: checking for Tcl public headers" >&5
6967echo $ECHO_N "checking for Tcl public headers... $ECHO_C" >&6; }
6968
6969
6970# Check whether --with-tclinclude was given.
6971if test "${with_tclinclude+set}" = set; then
6972  withval=$with_tclinclude; with_tclinclude=${withval}
6973fi
6974
6975
6976    if test "${ac_cv_c_tclh+set}" = set; then
6977  echo $ECHO_N "(cached) $ECHO_C" >&6
6978else
6979
6980	# Use the value from --with-tclinclude, if it was given
6981
6982	if test x"${with_tclinclude}" != x ; then
6983	    if test -f "${with_tclinclude}/tcl.h" ; then
6984		ac_cv_c_tclh=${with_tclinclude}
6985	    else
6986		{ { echo "$as_me:$LINENO: error: ${with_tclinclude} directory does not contain tcl.h" >&5
6987echo "$as_me: error: ${with_tclinclude} directory does not contain tcl.h" >&2;}
6988   { (exit 1); exit 1; }; }
6989	    fi
6990	else
6991	    list=""
6992	    if test "`uname -s`" = "Darwin"; then
6993		# If Tcl was built as a framework, attempt to use
6994		# the framework's Headers directory
6995		case ${TCL_DEFS} in
6996		    *TCL_FRAMEWORK*)
6997			list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
6998			;;
6999		esac
7000	    fi
7001
7002	    # Look in the source dir only if Tcl is not installed,
7003	    # and in that situation, look there before installed locations.
7004	    if test -f "${TCL_BIN_DIR}/Makefile" ; then
7005		list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
7006	    fi
7007
7008	    # Check order: pkg --prefix location, Tcl's --prefix location,
7009	    # relative to directory of tclConfig.sh.
7010
7011	    eval "temp_includedir=${includedir}"
7012	    list="$list \
7013		`ls -d ${temp_includedir}        2>/dev/null` \
7014		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
7015		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
7016	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
7017		list="$list /usr/local/include /usr/include"
7018		if test x"${TCL_INCLUDE_SPEC}" != x ; then
7019		    d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
7020		    list="$list `ls -d ${d} 2>/dev/null`"
7021		fi
7022	    fi
7023	    for i in $list ; do
7024		if test -f "$i/tcl.h" ; then
7025		    ac_cv_c_tclh=$i
7026		    break
7027		fi
7028	    done
7029	fi
7030
7031fi
7032
7033
7034    # Print a message based on how we determined the include path
7035
7036    if test x"${ac_cv_c_tclh}" = x ; then
7037	{ { echo "$as_me:$LINENO: error: tcl.h not found.  Please specify its location with --with-tclinclude" >&5
7038echo "$as_me: error: tcl.h not found.  Please specify its location with --with-tclinclude" >&2;}
7039   { (exit 1); exit 1; }; }
7040    else
7041	{ echo "$as_me:$LINENO: result: ${ac_cv_c_tclh}" >&5
7042echo "${ECHO_T}${ac_cv_c_tclh}" >&6; }
7043    fi
7044
7045    # Convert to a native path and substitute into the output files.
7046
7047    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
7048
7049    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
7050
7051
7052
7053#TEA_PRIVATE_TCL_HEADERS
7054
7055
7056    { echo "$as_me:$LINENO: checking for Tk public headers" >&5
7057echo $ECHO_N "checking for Tk public headers... $ECHO_C" >&6; }
7058
7059
7060# Check whether --with-tkinclude was given.
7061if test "${with_tkinclude+set}" = set; then
7062  withval=$with_tkinclude; with_tkinclude=${withval}
7063fi
7064
7065
7066    if test "${ac_cv_c_tkh+set}" = set; then
7067  echo $ECHO_N "(cached) $ECHO_C" >&6
7068else
7069
7070	# Use the value from --with-tkinclude, if it was given
7071
7072	if test x"${with_tkinclude}" != x ; then
7073	    if test -f "${with_tkinclude}/tk.h" ; then
7074		ac_cv_c_tkh=${with_tkinclude}
7075	    else
7076		{ { echo "$as_me:$LINENO: error: ${with_tkinclude} directory does not contain tk.h" >&5
7077echo "$as_me: error: ${with_tkinclude} directory does not contain tk.h" >&2;}
7078   { (exit 1); exit 1; }; }
7079	    fi
7080	else
7081	    list=""
7082	    if test "`uname -s`" = "Darwin"; then
7083		# If Tk was built as a framework, attempt to use
7084		# the framework's Headers directory.
7085		case ${TK_DEFS} in
7086		    *TK_FRAMEWORK*)
7087			list="`ls -d ${TK_BIN_DIR}/Headers 2>/dev/null`"
7088			;;
7089		esac
7090	    fi
7091
7092	    # Look in the source dir only if Tk is not installed,
7093	    # and in that situation, look there before installed locations.
7094	    if test -f "${TK_BIN_DIR}/Makefile" ; then
7095		list="$list `ls -d ${TK_SRC_DIR}/generic 2>/dev/null`"
7096	    fi
7097
7098	    # Check order: pkg --prefix location, Tk's --prefix location,
7099	    # relative to directory of tkConfig.sh, Tcl's --prefix location,
7100	    # relative to directory of tclConfig.sh.
7101
7102	    eval "temp_includedir=${includedir}"
7103	    list="$list \
7104		`ls -d ${temp_includedir}        2>/dev/null` \
7105		`ls -d ${TK_PREFIX}/include      2>/dev/null` \
7106		`ls -d ${TK_BIN_DIR}/../include  2>/dev/null` \
7107		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
7108		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
7109	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
7110		list="$list /usr/local/include /usr/include"
7111		if test x"${TK_INCLUDE_SPEC}" != x ; then
7112		    d=`echo "${TK_INCLUDE_SPEC}" | sed -e 's/^-I//'`
7113		    list="$list `ls -d ${d} 2>/dev/null`"
7114		fi
7115	    fi
7116	    for i in $list ; do
7117		if test -f "$i/tk.h" ; then
7118		    ac_cv_c_tkh=$i
7119		    break
7120		fi
7121	    done
7122	fi
7123
7124fi
7125
7126
7127    # Print a message based on how we determined the include path
7128
7129    if test x"${ac_cv_c_tkh}" = x ; then
7130	{ { echo "$as_me:$LINENO: error: tk.h not found.  Please specify its location with --with-tkinclude" >&5
7131echo "$as_me: error: tk.h not found.  Please specify its location with --with-tkinclude" >&2;}
7132   { (exit 1); exit 1; }; }
7133    else
7134	{ echo "$as_me:$LINENO: result: ${ac_cv_c_tkh}" >&5
7135echo "${ECHO_T}${ac_cv_c_tkh}" >&6; }
7136    fi
7137
7138    # Convert to a native path and substitute into the output files.
7139
7140    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}`
7141
7142    TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
7143
7144
7145
7146    if test "${TEA_WINDOWINGSYSTEM}" != "x11"; then
7147	# On Windows and Aqua, we need the X compat headers
7148	{ echo "$as_me:$LINENO: checking for X11 header files" >&5
7149echo $ECHO_N "checking for X11 header files... $ECHO_C" >&6; }
7150	if test ! -r "${INCLUDE_DIR_NATIVE}/X11/Xlib.h"; then
7151	    INCLUDE_DIR_NATIVE="`${CYGPATH} ${TK_SRC_DIR}/xlib`"
7152	    TK_XINCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
7153
7154	fi
7155	{ echo "$as_me:$LINENO: result: ${INCLUDE_DIR_NATIVE}" >&5
7156echo "${ECHO_T}${INCLUDE_DIR_NATIVE}" >&6; }
7157    fi
7158
7159#TEA_PRIVATE_TK_HEADERS
7160#TEA_PATH_X
7161
7162#--------------------------------------------------------------------
7163# Check whether --enable-threads or --disable-threads was given.
7164# This auto-enables if Tcl was compiled threaded.
7165#--------------------------------------------------------------------
7166
7167
7168    # Check whether --enable-threads was given.
7169if test "${enable_threads+set}" = set; then
7170  enableval=$enable_threads; tcl_ok=$enableval
7171else
7172  tcl_ok=yes
7173fi
7174
7175
7176    if test "${enable_threads+set}" = set; then
7177	enableval="$enable_threads"
7178	tcl_ok=$enableval
7179    else
7180	tcl_ok=yes
7181    fi
7182
7183    if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
7184	TCL_THREADS=1
7185
7186	if test "${TEA_PLATFORM}" != "windows" ; then
7187	    # We are always OK on Windows, so check what this platform wants:
7188
7189	    # USE_THREAD_ALLOC tells us to try the special thread-based
7190	    # allocator that significantly reduces lock contention
7191
7192cat >>confdefs.h <<\_ACEOF
7193#define USE_THREAD_ALLOC 1
7194_ACEOF
7195
7196
7197cat >>confdefs.h <<\_ACEOF
7198#define _REENTRANT 1
7199_ACEOF
7200
7201	    if test "`uname -s`" = "SunOS" ; then
7202
7203cat >>confdefs.h <<\_ACEOF
7204#define _POSIX_PTHREAD_SEMANTICS 1
7205_ACEOF
7206
7207	    fi
7208
7209cat >>confdefs.h <<\_ACEOF
7210#define _THREAD_SAFE 1
7211_ACEOF
7212
7213	    { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5
7214echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6; }
7215if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then
7216  echo $ECHO_N "(cached) $ECHO_C" >&6
7217else
7218  ac_check_lib_save_LIBS=$LIBS
7219LIBS="-lpthread  $LIBS"
7220cat >conftest.$ac_ext <<_ACEOF
7221/* confdefs.h.  */
7222_ACEOF
7223cat confdefs.h >>conftest.$ac_ext
7224cat >>conftest.$ac_ext <<_ACEOF
7225/* end confdefs.h.  */
7226
7227/* Override any GCC internal prototype to avoid an error.
7228   Use char because int might match the return type of a GCC
7229   builtin and then its argument prototype would still apply.  */
7230#ifdef __cplusplus
7231extern "C"
7232#endif
7233char pthread_mutex_init ();
7234int
7235main ()
7236{
7237return pthread_mutex_init ();
7238  ;
7239  return 0;
7240}
7241_ACEOF
7242rm -f conftest.$ac_objext conftest$ac_exeext
7243if { (ac_try="$ac_link"
7244case "(($ac_try" in
7245  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7246  *) ac_try_echo=$ac_try;;
7247esac
7248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7249  (eval "$ac_link") 2>conftest.er1
7250  ac_status=$?
7251  grep -v '^ *+' conftest.er1 >conftest.err
7252  rm -f conftest.er1
7253  cat conftest.err >&5
7254  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7255  (exit $ac_status); } && {
7256	 test -z "$ac_c_werror_flag" ||
7257	 test ! -s conftest.err
7258       } && test -s conftest$ac_exeext &&
7259       $as_test_x conftest$ac_exeext; then
7260  ac_cv_lib_pthread_pthread_mutex_init=yes
7261else
7262  echo "$as_me: failed program was:" >&5
7263sed 's/^/| /' conftest.$ac_ext >&5
7264
7265	ac_cv_lib_pthread_pthread_mutex_init=no
7266fi
7267
7268rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7269      conftest$ac_exeext conftest.$ac_ext
7270LIBS=$ac_check_lib_save_LIBS
7271fi
7272{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5
7273echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6; }
7274if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then
7275  tcl_ok=yes
7276else
7277  tcl_ok=no
7278fi
7279
7280	    if test "$tcl_ok" = "no"; then
7281		# Check a little harder for __pthread_mutex_init in the same
7282		# library, as some systems hide it there until pthread.h is
7283		# defined.  We could alternatively do an AC_TRY_COMPILE with
7284		# pthread.h, but that will work with libpthread really doesn't
7285		# exist, like AIX 4.2.  [Bug: 4359]
7286		{ echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5
7287echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6; }
7288if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then
7289  echo $ECHO_N "(cached) $ECHO_C" >&6
7290else
7291  ac_check_lib_save_LIBS=$LIBS
7292LIBS="-lpthread  $LIBS"
7293cat >conftest.$ac_ext <<_ACEOF
7294/* confdefs.h.  */
7295_ACEOF
7296cat confdefs.h >>conftest.$ac_ext
7297cat >>conftest.$ac_ext <<_ACEOF
7298/* end confdefs.h.  */
7299
7300/* Override any GCC internal prototype to avoid an error.
7301   Use char because int might match the return type of a GCC
7302   builtin and then its argument prototype would still apply.  */
7303#ifdef __cplusplus
7304extern "C"
7305#endif
7306char __pthread_mutex_init ();
7307int
7308main ()
7309{
7310return __pthread_mutex_init ();
7311  ;
7312  return 0;
7313}
7314_ACEOF
7315rm -f conftest.$ac_objext conftest$ac_exeext
7316if { (ac_try="$ac_link"
7317case "(($ac_try" in
7318  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7319  *) ac_try_echo=$ac_try;;
7320esac
7321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7322  (eval "$ac_link") 2>conftest.er1
7323  ac_status=$?
7324  grep -v '^ *+' conftest.er1 >conftest.err
7325  rm -f conftest.er1
7326  cat conftest.err >&5
7327  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7328  (exit $ac_status); } && {
7329	 test -z "$ac_c_werror_flag" ||
7330	 test ! -s conftest.err
7331       } && test -s conftest$ac_exeext &&
7332       $as_test_x conftest$ac_exeext; then
7333  ac_cv_lib_pthread___pthread_mutex_init=yes
7334else
7335  echo "$as_me: failed program was:" >&5
7336sed 's/^/| /' conftest.$ac_ext >&5
7337
7338	ac_cv_lib_pthread___pthread_mutex_init=no
7339fi
7340
7341rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7342      conftest$ac_exeext conftest.$ac_ext
7343LIBS=$ac_check_lib_save_LIBS
7344fi
7345{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5
7346echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6; }
7347if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then
7348  tcl_ok=yes
7349else
7350  tcl_ok=no
7351fi
7352
7353	    fi
7354
7355	    if test "$tcl_ok" = "yes"; then
7356		# The space is needed
7357		THREADS_LIBS=" -lpthread"
7358	    else
7359		{ echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5
7360echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6; }
7361if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then
7362  echo $ECHO_N "(cached) $ECHO_C" >&6
7363else
7364  ac_check_lib_save_LIBS=$LIBS
7365LIBS="-lpthreads  $LIBS"
7366cat >conftest.$ac_ext <<_ACEOF
7367/* confdefs.h.  */
7368_ACEOF
7369cat confdefs.h >>conftest.$ac_ext
7370cat >>conftest.$ac_ext <<_ACEOF
7371/* end confdefs.h.  */
7372
7373/* Override any GCC internal prototype to avoid an error.
7374   Use char because int might match the return type of a GCC
7375   builtin and then its argument prototype would still apply.  */
7376#ifdef __cplusplus
7377extern "C"
7378#endif
7379char pthread_mutex_init ();
7380int
7381main ()
7382{
7383return pthread_mutex_init ();
7384  ;
7385  return 0;
7386}
7387_ACEOF
7388rm -f conftest.$ac_objext conftest$ac_exeext
7389if { (ac_try="$ac_link"
7390case "(($ac_try" in
7391  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7392  *) ac_try_echo=$ac_try;;
7393esac
7394eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7395  (eval "$ac_link") 2>conftest.er1
7396  ac_status=$?
7397  grep -v '^ *+' conftest.er1 >conftest.err
7398  rm -f conftest.er1
7399  cat conftest.err >&5
7400  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7401  (exit $ac_status); } && {
7402	 test -z "$ac_c_werror_flag" ||
7403	 test ! -s conftest.err
7404       } && test -s conftest$ac_exeext &&
7405       $as_test_x conftest$ac_exeext; then
7406  ac_cv_lib_pthreads_pthread_mutex_init=yes
7407else
7408  echo "$as_me: failed program was:" >&5
7409sed 's/^/| /' conftest.$ac_ext >&5
7410
7411	ac_cv_lib_pthreads_pthread_mutex_init=no
7412fi
7413
7414rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7415      conftest$ac_exeext conftest.$ac_ext
7416LIBS=$ac_check_lib_save_LIBS
7417fi
7418{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5
7419echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6; }
7420if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then
7421  tcl_ok=yes
7422else
7423  tcl_ok=no
7424fi
7425
7426		if test "$tcl_ok" = "yes"; then
7427		    # The space is needed
7428		    THREADS_LIBS=" -lpthreads"
7429		else
7430		    { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5
7431echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6; }
7432if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then
7433  echo $ECHO_N "(cached) $ECHO_C" >&6
7434else
7435  ac_check_lib_save_LIBS=$LIBS
7436LIBS="-lc  $LIBS"
7437cat >conftest.$ac_ext <<_ACEOF
7438/* confdefs.h.  */
7439_ACEOF
7440cat confdefs.h >>conftest.$ac_ext
7441cat >>conftest.$ac_ext <<_ACEOF
7442/* end confdefs.h.  */
7443
7444/* Override any GCC internal prototype to avoid an error.
7445   Use char because int might match the return type of a GCC
7446   builtin and then its argument prototype would still apply.  */
7447#ifdef __cplusplus
7448extern "C"
7449#endif
7450char pthread_mutex_init ();
7451int
7452main ()
7453{
7454return pthread_mutex_init ();
7455  ;
7456  return 0;
7457}
7458_ACEOF
7459rm -f conftest.$ac_objext conftest$ac_exeext
7460if { (ac_try="$ac_link"
7461case "(($ac_try" in
7462  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7463  *) ac_try_echo=$ac_try;;
7464esac
7465eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7466  (eval "$ac_link") 2>conftest.er1
7467  ac_status=$?
7468  grep -v '^ *+' conftest.er1 >conftest.err
7469  rm -f conftest.er1
7470  cat conftest.err >&5
7471  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7472  (exit $ac_status); } && {
7473	 test -z "$ac_c_werror_flag" ||
7474	 test ! -s conftest.err
7475       } && test -s conftest$ac_exeext &&
7476       $as_test_x conftest$ac_exeext; then
7477  ac_cv_lib_c_pthread_mutex_init=yes
7478else
7479  echo "$as_me: failed program was:" >&5
7480sed 's/^/| /' conftest.$ac_ext >&5
7481
7482	ac_cv_lib_c_pthread_mutex_init=no
7483fi
7484
7485rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7486      conftest$ac_exeext conftest.$ac_ext
7487LIBS=$ac_check_lib_save_LIBS
7488fi
7489{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5
7490echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6; }
7491if test $ac_cv_lib_c_pthread_mutex_init = yes; then
7492  tcl_ok=yes
7493else
7494  tcl_ok=no
7495fi
7496
7497		    if test "$tcl_ok" = "no"; then
7498			{ echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5
7499echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6; }
7500if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then
7501  echo $ECHO_N "(cached) $ECHO_C" >&6
7502else
7503  ac_check_lib_save_LIBS=$LIBS
7504LIBS="-lc_r  $LIBS"
7505cat >conftest.$ac_ext <<_ACEOF
7506/* confdefs.h.  */
7507_ACEOF
7508cat confdefs.h >>conftest.$ac_ext
7509cat >>conftest.$ac_ext <<_ACEOF
7510/* end confdefs.h.  */
7511
7512/* Override any GCC internal prototype to avoid an error.
7513   Use char because int might match the return type of a GCC
7514   builtin and then its argument prototype would still apply.  */
7515#ifdef __cplusplus
7516extern "C"
7517#endif
7518char pthread_mutex_init ();
7519int
7520main ()
7521{
7522return pthread_mutex_init ();
7523  ;
7524  return 0;
7525}
7526_ACEOF
7527rm -f conftest.$ac_objext conftest$ac_exeext
7528if { (ac_try="$ac_link"
7529case "(($ac_try" in
7530  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7531  *) ac_try_echo=$ac_try;;
7532esac
7533eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7534  (eval "$ac_link") 2>conftest.er1
7535  ac_status=$?
7536  grep -v '^ *+' conftest.er1 >conftest.err
7537  rm -f conftest.er1
7538  cat conftest.err >&5
7539  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7540  (exit $ac_status); } && {
7541	 test -z "$ac_c_werror_flag" ||
7542	 test ! -s conftest.err
7543       } && test -s conftest$ac_exeext &&
7544       $as_test_x conftest$ac_exeext; then
7545  ac_cv_lib_c_r_pthread_mutex_init=yes
7546else
7547  echo "$as_me: failed program was:" >&5
7548sed 's/^/| /' conftest.$ac_ext >&5
7549
7550	ac_cv_lib_c_r_pthread_mutex_init=no
7551fi
7552
7553rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7554      conftest$ac_exeext conftest.$ac_ext
7555LIBS=$ac_check_lib_save_LIBS
7556fi
7557{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5
7558echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6; }
7559if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then
7560  tcl_ok=yes
7561else
7562  tcl_ok=no
7563fi
7564
7565			if test "$tcl_ok" = "yes"; then
7566			    # The space is needed
7567			    THREADS_LIBS=" -pthread"
7568			else
7569			    TCL_THREADS=0
7570			    { echo "$as_me:$LINENO: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&5
7571echo "$as_me: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&2;}
7572			fi
7573		    fi
7574		fi
7575	    fi
7576	fi
7577    else
7578	TCL_THREADS=0
7579    fi
7580    # Do checking message here to not mess up interleaved configure output
7581    { echo "$as_me:$LINENO: checking for building with threads" >&5
7582echo $ECHO_N "checking for building with threads... $ECHO_C" >&6; }
7583    if test "${TCL_THREADS}" = 1; then
7584
7585cat >>confdefs.h <<\_ACEOF
7586#define TCL_THREADS 1
7587_ACEOF
7588
7589	{ echo "$as_me:$LINENO: result: yes (default)" >&5
7590echo "${ECHO_T}yes (default)" >&6; }
7591    else
7592	{ echo "$as_me:$LINENO: result: no" >&5
7593echo "${ECHO_T}no" >&6; }
7594    fi
7595    # TCL_THREADS sanity checking.  See if our request for building with
7596    # threads is the same as the way Tcl was built.  If not, warn the user.
7597    case ${TCL_DEFS} in
7598	*THREADS=1*)
7599	    if test "${TCL_THREADS}" = "0"; then
7600		{ echo "$as_me:$LINENO: WARNING:
7601    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
7602    that IS thread-enabled.  It is recommended to use --enable-threads." >&5
7603echo "$as_me: WARNING:
7604    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
7605    that IS thread-enabled.  It is recommended to use --enable-threads." >&2;}
7606	    fi
7607	    ;;
7608	*)
7609	    if test "${TCL_THREADS}" = "1"; then
7610		{ echo "$as_me:$LINENO: WARNING:
7611    --enable-threads requested, but building against a Tcl that is NOT
7612    thread-enabled.  This is an OK configuration that will also run in
7613    a thread-enabled core." >&5
7614echo "$as_me: WARNING:
7615    --enable-threads requested, but building against a Tcl that is NOT
7616    thread-enabled.  This is an OK configuration that will also run in
7617    a thread-enabled core." >&2;}
7618	    fi
7619	    ;;
7620    esac
7621
7622
7623
7624#--------------------------------------------------------------------
7625# The statement below defines a collection of symbols related to
7626# building as a shared library instead of a static library.
7627#--------------------------------------------------------------------
7628
7629
7630    { echo "$as_me:$LINENO: checking how to build libraries" >&5
7631echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6; }
7632    # Check whether --enable-shared was given.
7633if test "${enable_shared+set}" = set; then
7634  enableval=$enable_shared; tcl_ok=$enableval
7635else
7636  tcl_ok=yes
7637fi
7638
7639
7640    if test "${enable_shared+set}" = set; then
7641	enableval="$enable_shared"
7642	tcl_ok=$enableval
7643    else
7644	tcl_ok=yes
7645    fi
7646
7647    if test "$tcl_ok" = "yes" ; then
7648	{ echo "$as_me:$LINENO: result: shared" >&5
7649echo "${ECHO_T}shared" >&6; }
7650	SHARED_BUILD=1
7651    else
7652	{ echo "$as_me:$LINENO: result: static" >&5
7653echo "${ECHO_T}static" >&6; }
7654	SHARED_BUILD=0
7655
7656cat >>confdefs.h <<\_ACEOF
7657#define STATIC_BUILD 1
7658_ACEOF
7659
7660    fi
7661
7662
7663
7664#--------------------------------------------------------------------
7665# This macro figures out what flags to use with the compiler/linker
7666# when building shared/static debug/optimized objects.  This information
7667# can be taken from the tclConfig.sh file, but this figures it all out.
7668#--------------------------------------------------------------------
7669
7670
7671
7672
7673    # Step 0.a: Enable 64 bit support?
7674
7675    { echo "$as_me:$LINENO: checking if 64bit support is requested" >&5
7676echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6; }
7677    # Check whether --enable-64bit was given.
7678if test "${enable_64bit+set}" = set; then
7679  enableval=$enable_64bit; do64bit=$enableval
7680else
7681  do64bit=no
7682fi
7683
7684    { echo "$as_me:$LINENO: result: $do64bit" >&5
7685echo "${ECHO_T}$do64bit" >&6; }
7686
7687    # Step 0.b: Enable Solaris 64 bit VIS support?
7688
7689    { echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5
7690echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6; }
7691    # Check whether --enable-64bit-vis was given.
7692if test "${enable_64bit_vis+set}" = set; then
7693  enableval=$enable_64bit_vis; do64bitVIS=$enableval
7694else
7695  do64bitVIS=no
7696fi
7697
7698    { echo "$as_me:$LINENO: result: $do64bitVIS" >&5
7699echo "${ECHO_T}$do64bitVIS" >&6; }
7700    # Force 64bit on with VIS
7701    if test "$do64bitVIS" = "yes"; then
7702  do64bit=yes
7703fi
7704
7705
7706    # Step 0.c: Check if visibility support is available. Do this here so
7707    # that platform specific alternatives can be used below if this fails.
7708
7709    { echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5
7710echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6; }
7711if test "${tcl_cv_cc_visibility_hidden+set}" = set; then
7712  echo $ECHO_N "(cached) $ECHO_C" >&6
7713else
7714
7715	hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
7716	cat >conftest.$ac_ext <<_ACEOF
7717/* confdefs.h.  */
7718_ACEOF
7719cat confdefs.h >>conftest.$ac_ext
7720cat >>conftest.$ac_ext <<_ACEOF
7721/* end confdefs.h.  */
7722
7723	    extern __attribute__((__visibility__("hidden"))) void f(void);
7724	    void f(void) {}
7725int
7726main ()
7727{
7728f();
7729  ;
7730  return 0;
7731}
7732_ACEOF
7733rm -f conftest.$ac_objext conftest$ac_exeext
7734if { (ac_try="$ac_link"
7735case "(($ac_try" in
7736  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7737  *) ac_try_echo=$ac_try;;
7738esac
7739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7740  (eval "$ac_link") 2>conftest.er1
7741  ac_status=$?
7742  grep -v '^ *+' conftest.er1 >conftest.err
7743  rm -f conftest.er1
7744  cat conftest.err >&5
7745  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7746  (exit $ac_status); } && {
7747	 test -z "$ac_c_werror_flag" ||
7748	 test ! -s conftest.err
7749       } && test -s conftest$ac_exeext &&
7750       $as_test_x conftest$ac_exeext; then
7751  tcl_cv_cc_visibility_hidden=yes
7752else
7753  echo "$as_me: failed program was:" >&5
7754sed 's/^/| /' conftest.$ac_ext >&5
7755
7756	tcl_cv_cc_visibility_hidden=no
7757fi
7758
7759rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7760      conftest$ac_exeext conftest.$ac_ext
7761	CFLAGS=$hold_cflags
7762fi
7763{ echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5
7764echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6; }
7765    if test $tcl_cv_cc_visibility_hidden = yes; then
7766
7767
7768cat >>confdefs.h <<\_ACEOF
7769#define MODULE_SCOPE extern __attribute__((__visibility__("hidden")))
7770_ACEOF
7771
7772
7773fi
7774
7775
7776    # Step 0.d: Disable -rpath support?
7777
7778    { echo "$as_me:$LINENO: checking if rpath support is requested" >&5
7779echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6; }
7780    # Check whether --enable-rpath was given.
7781if test "${enable_rpath+set}" = set; then
7782  enableval=$enable_rpath; doRpath=$enableval
7783else
7784  doRpath=yes
7785fi
7786
7787    { echo "$as_me:$LINENO: result: $doRpath" >&5
7788echo "${ECHO_T}$doRpath" >&6; }
7789
7790    # TEA specific: Cross-compiling options for Windows/CE builds?
7791
7792    if test "${TEA_PLATFORM}" = windows; then
7793
7794	{ echo "$as_me:$LINENO: checking if Windows/CE build is requested" >&5
7795echo $ECHO_N "checking if Windows/CE build is requested... $ECHO_C" >&6; }
7796	# Check whether --enable-wince was given.
7797if test "${enable_wince+set}" = set; then
7798  enableval=$enable_wince; doWince=$enableval
7799else
7800  doWince=no
7801fi
7802
7803	{ echo "$as_me:$LINENO: result: $doWince" >&5
7804echo "${ECHO_T}$doWince" >&6; }
7805
7806fi
7807
7808
7809    # Set the variable "system" to hold the name and version number
7810    # for the system.
7811
7812
7813    { echo "$as_me:$LINENO: checking system version" >&5
7814echo $ECHO_N "checking system version... $ECHO_C" >&6; }
7815if test "${tcl_cv_sys_version+set}" = set; then
7816  echo $ECHO_N "(cached) $ECHO_C" >&6
7817else
7818
7819	# TEA specific:
7820	if test "${TEA_PLATFORM}" = "windows" ; then
7821	    tcl_cv_sys_version=windows
7822	else
7823	    tcl_cv_sys_version=`uname -s`-`uname -r`
7824	    if test "$?" -ne 0 ; then
7825		{ echo "$as_me:$LINENO: WARNING: can't find uname command" >&5
7826echo "$as_me: WARNING: can't find uname command" >&2;}
7827		tcl_cv_sys_version=unknown
7828	    else
7829		if test "`uname -s`" = "AIX" ; then
7830		    tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
7831		fi
7832	    fi
7833	fi
7834
7835fi
7836{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5
7837echo "${ECHO_T}$tcl_cv_sys_version" >&6; }
7838    system=$tcl_cv_sys_version
7839
7840
7841    # Require ranlib early so we can override it in special cases below.
7842
7843
7844
7845    # Set configuration options based on system name and version.
7846    # This is similar to Tcl's unix/tcl.m4 except that we've added a
7847    # "windows" case and removed some core-only vars.
7848
7849    do64bit_ok=no
7850    # default to '{$LIBS}' and set to "" on per-platform necessary basis
7851    SHLIB_LD_LIBS='${LIBS}'
7852    # When ld needs options to work in 64-bit mode, put them in
7853    # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
7854    # is disabled by the user. [Bug 1016796]
7855    LDFLAGS_ARCH=""
7856    UNSHARED_LIB_SUFFIX=""
7857    # TEA specific: use PACKAGE_VERSION instead of VERSION
7858    TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
7859    ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
7860    TCL_LIB_VERSIONS_OK=ok
7861    CFLAGS_DEBUG=-g
7862    CFLAGS_OPTIMIZE=-O
7863    if test "$GCC" = yes; then
7864
7865	# TEA specific:
7866	CFLAGS_OPTIMIZE=-O2
7867	CFLAGS_WARNING="-Wall"
7868
7869else
7870  CFLAGS_WARNING=""
7871fi
7872
7873    # Extract the first word of "ar", so it can be a program name with args.
7874set dummy ar; ac_word=$2
7875{ echo "$as_me:$LINENO: checking for $ac_word" >&5
7876echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7877if test "${ac_cv_prog_AR+set}" = set; then
7878  echo $ECHO_N "(cached) $ECHO_C" >&6
7879else
7880  if test -n "$AR"; then
7881  ac_cv_prog_AR="$AR" # Let the user override the test.
7882else
7883as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7884for as_dir in $PATH
7885do
7886  IFS=$as_save_IFS
7887  test -z "$as_dir" && as_dir=.
7888  for ac_exec_ext in '' $ac_executable_extensions; do
7889  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7890    ac_cv_prog_AR="ar"
7891    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7892    break 2
7893  fi
7894done
7895done
7896IFS=$as_save_IFS
7897
7898fi
7899fi
7900AR=$ac_cv_prog_AR
7901if test -n "$AR"; then
7902  { echo "$as_me:$LINENO: result: $AR" >&5
7903echo "${ECHO_T}$AR" >&6; }
7904else
7905  { echo "$as_me:$LINENO: result: no" >&5
7906echo "${ECHO_T}no" >&6; }
7907fi
7908
7909
7910    STLIB_LD='${AR} cr'
7911    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
7912    if test "x$SHLIB_VERSION" = x; then
7913  SHLIB_VERSION="1.0"
7914fi
7915
7916    case $system in
7917	# TEA specific:
7918	windows)
7919	    # This is a 2-stage check to make sure we have the 64-bit SDK
7920	    # We have to know where the SDK is installed.
7921	    # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
7922	    # MACHINE is IX86 for LINK, but this is used by the manifest,
7923	    # which requires x86|amd64|ia64.
7924	    MACHINE="X86"
7925	    if test "$do64bit" != "no" ; then
7926		if test "x${MSSDK}x" = "xx" ; then
7927		    MSSDK="C:/Progra~1/Microsoft Platform SDK"
7928		fi
7929		MSSDK=`echo "$MSSDK" | sed -e  's!\\\!/!g'`
7930		PATH64=""
7931		case "$do64bit" in
7932		    amd64|x64|yes)
7933			MACHINE="AMD64" ; # default to AMD64 64-bit build
7934			PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
7935			;;
7936		    ia64)
7937			MACHINE="IA64"
7938			PATH64="${MSSDK}/Bin/Win64"
7939			;;
7940		esac
7941		if test ! -d "${PATH64}" ; then
7942		    { echo "$as_me:$LINENO: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&5
7943echo "$as_me: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&2;}
7944		    { echo "$as_me:$LINENO: WARNING: Ensure latest Platform SDK is installed" >&5
7945echo "$as_me: WARNING: Ensure latest Platform SDK is installed" >&2;}
7946		    do64bit="no"
7947		else
7948		    { echo "$as_me:$LINENO: result:    Using 64-bit $MACHINE mode" >&5
7949echo "${ECHO_T}   Using 64-bit $MACHINE mode" >&6; }
7950		    do64bit_ok="yes"
7951		fi
7952	    fi
7953
7954	    if test "$doWince" != "no" ; then
7955		if test "$do64bit" != "no" ; then
7956		    { { echo "$as_me:$LINENO: error: Windows/CE and 64-bit builds incompatible" >&5
7957echo "$as_me: error: Windows/CE and 64-bit builds incompatible" >&2;}
7958   { (exit 1); exit 1; }; }
7959		fi
7960		if test "$GCC" = "yes" ; then
7961		    { { echo "$as_me:$LINENO: error: Windows/CE and GCC builds incompatible" >&5
7962echo "$as_me: error: Windows/CE and GCC builds incompatible" >&2;}
7963   { (exit 1); exit 1; }; }
7964		fi
7965
7966    # First, look for one uninstalled.
7967    # the alternative search directory is invoked by --with-celib
7968
7969    if test x"${no_celib}" = x ; then
7970	# we reset no_celib in case something fails here
7971	no_celib=true
7972
7973# Check whether --with-celib was given.
7974if test "${with_celib+set}" = set; then
7975  withval=$with_celib; with_celibconfig=${withval}
7976fi
7977
7978	{ echo "$as_me:$LINENO: checking for Windows/CE celib directory" >&5
7979echo $ECHO_N "checking for Windows/CE celib directory... $ECHO_C" >&6; }
7980	if test "${ac_cv_c_celibconfig+set}" = set; then
7981  echo $ECHO_N "(cached) $ECHO_C" >&6
7982else
7983
7984	    # First check to see if --with-celibconfig was specified.
7985	    if test x"${with_celibconfig}" != x ; then
7986		if test -d "${with_celibconfig}/inc" ; then
7987		    ac_cv_c_celibconfig=`(cd ${with_celibconfig}; pwd)`
7988		else
7989		    { { echo "$as_me:$LINENO: error: ${with_celibconfig} directory doesn't contain inc directory" >&5
7990echo "$as_me: error: ${with_celibconfig} directory doesn't contain inc directory" >&2;}
7991   { (exit 1); exit 1; }; }
7992		fi
7993	    fi
7994
7995	    # then check for a celib library
7996	    if test x"${ac_cv_c_celibconfig}" = x ; then
7997		for i in \
7998			../celib-palm-3.0 \
7999			../celib \
8000			../../celib-palm-3.0 \
8001			../../celib \
8002			`ls -dr ../celib-*3.[0-9]* 2>/dev/null` \
8003			${srcdir}/../celib-palm-3.0 \
8004			${srcdir}/../celib \
8005			`ls -dr ${srcdir}/../celib-*3.[0-9]* 2>/dev/null` \
8006			; do
8007		    if test -d "$i/inc" ; then
8008			ac_cv_c_celibconfig=`(cd $i; pwd)`
8009			break
8010		    fi
8011		done
8012	    fi
8013
8014fi
8015
8016	if test x"${ac_cv_c_celibconfig}" = x ; then
8017	    { { echo "$as_me:$LINENO: error: Cannot find celib support library directory" >&5
8018echo "$as_me: error: Cannot find celib support library directory" >&2;}
8019   { (exit 1); exit 1; }; }
8020	else
8021	    no_celib=
8022	    CELIB_DIR=${ac_cv_c_celibconfig}
8023	    CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
8024	    { echo "$as_me:$LINENO: result: found $CELIB_DIR" >&5
8025echo "${ECHO_T}found $CELIB_DIR" >&6; }
8026	fi
8027    fi
8028
8029		# Set defaults for common evc4/PPC2003 setup
8030		# Currently Tcl requires 300+, possibly 420+ for sockets
8031		CEVERSION=420; 		# could be 211 300 301 400 420 ...
8032		TARGETCPU=ARMV4;	# could be ARMV4 ARM MIPS SH3 X86 ...
8033		ARCH=ARM;		# could be ARM MIPS X86EM ...
8034		PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002"
8035		if test "$doWince" != "yes"; then
8036		    # If !yes then the user specified something
8037		    # Reset ARCH to allow user to skip specifying it
8038		    ARCH=
8039		    eval `echo $doWince | awk -F, '{ \
8040	    if (length($1)) { printf "CEVERSION=\"%s\"\n", $1; \
8041	    if ($1 < 400)   { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \
8042	    if (length($2)) { printf "TARGETCPU=\"%s\"\n", toupper($2) }; \
8043	    if (length($3)) { printf "ARCH=\"%s\"\n", toupper($3) }; \
8044	    if (length($4)) { printf "PLATFORM=\"%s\"\n", $4 }; \
8045		    }'`
8046		    if test "x${ARCH}" = "x" ; then
8047			ARCH=$TARGETCPU;
8048		    fi
8049		fi
8050		OSVERSION=WCE$CEVERSION;
8051	    	if test "x${WCEROOT}" = "x" ; then
8052			WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0"
8053		    if test ! -d "${WCEROOT}" ; then
8054			WCEROOT="C:/Program Files/Microsoft eMbedded Tools"
8055		    fi
8056		fi
8057		if test "x${SDKROOT}" = "x" ; then
8058		    SDKROOT="C:/Program Files/Windows CE Tools"
8059		    if test ! -d "${SDKROOT}" ; then
8060			SDKROOT="C:/Windows CE Tools"
8061		    fi
8062		fi
8063		WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'`
8064		SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
8065		if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \
8066		    -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then
8067		    { { echo "$as_me:$LINENO: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&5
8068echo "$as_me: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&2;}
8069   { (exit 1); exit 1; }; }
8070		    doWince="no"
8071		else
8072		    # We could PATH_NOSPACE these, but that's not important,
8073		    # as long as we quote them when used.
8074		    CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include"
8075		    if test -d "${CEINCLUDE}/${TARGETCPU}" ; then
8076			CEINCLUDE="${CEINCLUDE}/${TARGETCPU}"
8077		    fi
8078		    CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}"
8079    		fi
8080	    fi
8081
8082	    if test "$GCC" != "yes" ; then
8083	        if test "${SHARED_BUILD}" = "0" ; then
8084		    runtime=-MT
8085	        else
8086		    runtime=-MD
8087	        fi
8088
8089                if test "$do64bit" != "no" ; then
8090		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
8091		    CC="\"${PATH64}/cl.exe\""
8092		    CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
8093		    RC="\"${MSSDK}/bin/rc.exe\""
8094		    lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
8095		    LINKBIN="\"${PATH64}/link.exe\""
8096		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
8097		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
8098		    # Avoid 'unresolved external symbol __security_cookie'
8099		    # errors, c.f. http://support.microsoft.com/?id=894573
8100
8101    vars="bufferoverflowU.lib"
8102    for i in $vars; do
8103	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
8104	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
8105	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
8106	fi
8107	PKG_LIBS="$PKG_LIBS $i"
8108    done
8109
8110
8111		elif test "$doWince" != "no" ; then
8112		    CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin"
8113		    if test "${TARGETCPU}" = "X86"; then
8114			CC="\"${CEBINROOT}/cl.exe\""
8115		    else
8116			CC="\"${CEBINROOT}/cl${ARCH}.exe\""
8117		    fi
8118		    CFLAGS="$CFLAGS -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\""
8119		    RC="\"${WCEROOT}/Common/EVC/bin/rc.exe\""
8120		    arch=`echo ${ARCH} | awk '{print tolower($0)}'`
8121		    defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _WINDOWS"
8122		    if test "${SHARED_BUILD}" = "1" ; then
8123			# Static CE builds require static celib as well
8124		    	defs="${defs} _DLL"
8125		    fi
8126		    for i in $defs ; do
8127
8128cat >>confdefs.h <<_ACEOF
8129#define $i 1
8130_ACEOF
8131
8132		    done
8133
8134cat >>confdefs.h <<_ACEOF
8135#define _WIN32_WCE $CEVERSION
8136_ACEOF
8137
8138
8139cat >>confdefs.h <<_ACEOF
8140#define UNDER_CE $CEVERSION
8141_ACEOF
8142
8143		    CFLAGS_DEBUG="-nologo -Zi -Od"
8144		    CFLAGS_OPTIMIZE="-nologo -Ox"
8145		    lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'`
8146		    lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
8147		    LINKBIN="\"${CEBINROOT}/link.exe\""
8148
8149		else
8150		    RC="rc"
8151		    lflags="-nologo"
8152    		    LINKBIN="link"
8153		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
8154		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
8155		fi
8156	    fi
8157
8158	    if test "$GCC" = "yes"; then
8159		# mingw gcc mode
8160		RC="windres"
8161		CFLAGS_DEBUG="-g"
8162		CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
8163		SHLIB_LD="$CC -shared"
8164		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
8165		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
8166		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
8167	    else
8168		SHLIB_LD="${LINKBIN} -dll ${lflags}"
8169		# link -lib only works when -lib is the first arg
8170		STLIB_LD="${LINKBIN} -lib ${lflags}"
8171		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib'
8172		PATHTYPE=-w
8173		# For information on what debugtype is most useful, see:
8174		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
8175		# and also
8176		# http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx
8177		# This essentially turns it all on.
8178		LDFLAGS_DEBUG="-debug -debugtype:cv"
8179		LDFLAGS_OPTIMIZE="-release"
8180		if test "$doWince" != "no" ; then
8181		    LDFLAGS_CONSOLE="-link ${lflags}"
8182		    LDFLAGS_WINDOW=${LDFLAGS_CONSOLE}
8183		else
8184		    LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
8185		    LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
8186		fi
8187	    fi
8188
8189	    SHLIB_SUFFIX=".dll"
8190	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
8191
8192	    TCL_LIB_VERSIONS_OK=nodots
8193    	    ;;
8194	AIX-*)
8195	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"; then
8196
8197		# AIX requires the _r compiler when gcc isn't being used
8198		case "${CC}" in
8199		    *_r|*_r\ *)
8200			# ok ...
8201			;;
8202		    *)
8203			# Make sure only first arg gets _r
8204		    	CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'`
8205			;;
8206		esac
8207		{ echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5
8208echo "${ECHO_T}Using $CC for compiling with threads" >&6; }
8209
8210fi
8211
8212	    LIBS="$LIBS -lc"
8213	    SHLIB_CFLAGS=""
8214	    SHLIB_SUFFIX=".so"
8215
8216	    LD_LIBRARY_PATH_VAR="LIBPATH"
8217
8218	    # Check to enable 64-bit flags for compiler/linker
8219	    if test "$do64bit" = yes; then
8220
8221		if test "$GCC" = yes; then
8222
8223		    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
8224echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
8225
8226else
8227
8228		    do64bit_ok=yes
8229		    CFLAGS="$CFLAGS -q64"
8230		    LDFLAGS_ARCH="-q64"
8231		    RANLIB="${RANLIB} -X64"
8232		    AR="${AR} -X64"
8233		    SHLIB_LD_FLAGS="-b64"
8234
8235fi
8236
8237
8238fi
8239
8240
8241	    if test "`uname -m`" = ia64; then
8242
8243		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
8244		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
8245		if test "$GCC" = yes; then
8246
8247		    CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
8248
8249else
8250
8251		    CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
8252
8253fi
8254
8255		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
8256
8257else
8258
8259		if test "$GCC" = yes; then
8260
8261		    SHLIB_LD='${CC} -shared -Wl,-bexpall'
8262
8263else
8264
8265		    SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bexpall -H512 -T512 -bnoentry"
8266		    LDFLAGS="$LDFLAGS -brtl"
8267
8268fi
8269
8270		SHLIB_LD="${SHLIB_LD} ${SHLIB_LD_FLAGS}"
8271		CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
8272		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8273
8274fi
8275
8276	    ;;
8277	BeOS*)
8278	    SHLIB_CFLAGS="-fPIC"
8279	    SHLIB_LD='${CC} -nostart'
8280	    SHLIB_SUFFIX=".so"
8281
8282	    #-----------------------------------------------------------
8283	    # Check for inet_ntoa in -lbind, for BeOS (which also needs
8284	    # -lsocket, even if the network functions are in -lnet which
8285	    # is always linked to, for compatibility.
8286	    #-----------------------------------------------------------
8287	    { echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5
8288echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6; }
8289if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then
8290  echo $ECHO_N "(cached) $ECHO_C" >&6
8291else
8292  ac_check_lib_save_LIBS=$LIBS
8293LIBS="-lbind  $LIBS"
8294cat >conftest.$ac_ext <<_ACEOF
8295/* confdefs.h.  */
8296_ACEOF
8297cat confdefs.h >>conftest.$ac_ext
8298cat >>conftest.$ac_ext <<_ACEOF
8299/* end confdefs.h.  */
8300
8301/* Override any GCC internal prototype to avoid an error.
8302   Use char because int might match the return type of a GCC
8303   builtin and then its argument prototype would still apply.  */
8304#ifdef __cplusplus
8305extern "C"
8306#endif
8307char inet_ntoa ();
8308int
8309main ()
8310{
8311return inet_ntoa ();
8312  ;
8313  return 0;
8314}
8315_ACEOF
8316rm -f conftest.$ac_objext conftest$ac_exeext
8317if { (ac_try="$ac_link"
8318case "(($ac_try" in
8319  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8320  *) ac_try_echo=$ac_try;;
8321esac
8322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8323  (eval "$ac_link") 2>conftest.er1
8324  ac_status=$?
8325  grep -v '^ *+' conftest.er1 >conftest.err
8326  rm -f conftest.er1
8327  cat conftest.err >&5
8328  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8329  (exit $ac_status); } && {
8330	 test -z "$ac_c_werror_flag" ||
8331	 test ! -s conftest.err
8332       } && test -s conftest$ac_exeext &&
8333       $as_test_x conftest$ac_exeext; then
8334  ac_cv_lib_bind_inet_ntoa=yes
8335else
8336  echo "$as_me: failed program was:" >&5
8337sed 's/^/| /' conftest.$ac_ext >&5
8338
8339	ac_cv_lib_bind_inet_ntoa=no
8340fi
8341
8342rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8343      conftest$ac_exeext conftest.$ac_ext
8344LIBS=$ac_check_lib_save_LIBS
8345fi
8346{ echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5
8347echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6; }
8348if test $ac_cv_lib_bind_inet_ntoa = yes; then
8349  LIBS="$LIBS -lbind -lsocket"
8350fi
8351
8352	    ;;
8353	BSD/OS-4.*)
8354	    SHLIB_CFLAGS="-export-dynamic -fPIC"
8355	    SHLIB_LD='${CC} -shared'
8356	    SHLIB_SUFFIX=".so"
8357	    LDFLAGS="$LDFLAGS -export-dynamic"
8358	    CC_SEARCH_FLAGS=""
8359	    LD_SEARCH_FLAGS=""
8360	    ;;
8361	CYGWIN_*)
8362	    SHLIB_CFLAGS=""
8363	    SHLIB_LD='${CC} -shared'
8364	    SHLIB_SUFFIX=".dll"
8365	    EXE_SUFFIX=".exe"
8366	    CC_SEARCH_FLAGS=""
8367	    LD_SEARCH_FLAGS=""
8368	    ;;
8369	Haiku*)
8370	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
8371	    SHLIB_CFLAGS="-fPIC"
8372	    SHLIB_SUFFIX=".so"
8373	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
8374	    { echo "$as_me:$LINENO: checking for inet_ntoa in -lnetwork" >&5
8375echo $ECHO_N "checking for inet_ntoa in -lnetwork... $ECHO_C" >&6; }
8376if test "${ac_cv_lib_network_inet_ntoa+set}" = set; then
8377  echo $ECHO_N "(cached) $ECHO_C" >&6
8378else
8379  ac_check_lib_save_LIBS=$LIBS
8380LIBS="-lnetwork  $LIBS"
8381cat >conftest.$ac_ext <<_ACEOF
8382/* confdefs.h.  */
8383_ACEOF
8384cat confdefs.h >>conftest.$ac_ext
8385cat >>conftest.$ac_ext <<_ACEOF
8386/* end confdefs.h.  */
8387
8388/* Override any GCC internal prototype to avoid an error.
8389   Use char because int might match the return type of a GCC
8390   builtin and then its argument prototype would still apply.  */
8391#ifdef __cplusplus
8392extern "C"
8393#endif
8394char inet_ntoa ();
8395int
8396main ()
8397{
8398return inet_ntoa ();
8399  ;
8400  return 0;
8401}
8402_ACEOF
8403rm -f conftest.$ac_objext conftest$ac_exeext
8404if { (ac_try="$ac_link"
8405case "(($ac_try" in
8406  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8407  *) ac_try_echo=$ac_try;;
8408esac
8409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8410  (eval "$ac_link") 2>conftest.er1
8411  ac_status=$?
8412  grep -v '^ *+' conftest.er1 >conftest.err
8413  rm -f conftest.er1
8414  cat conftest.err >&5
8415  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8416  (exit $ac_status); } && {
8417	 test -z "$ac_c_werror_flag" ||
8418	 test ! -s conftest.err
8419       } && test -s conftest$ac_exeext &&
8420       $as_test_x conftest$ac_exeext; then
8421  ac_cv_lib_network_inet_ntoa=yes
8422else
8423  echo "$as_me: failed program was:" >&5
8424sed 's/^/| /' conftest.$ac_ext >&5
8425
8426	ac_cv_lib_network_inet_ntoa=no
8427fi
8428
8429rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8430      conftest$ac_exeext conftest.$ac_ext
8431LIBS=$ac_check_lib_save_LIBS
8432fi
8433{ echo "$as_me:$LINENO: result: $ac_cv_lib_network_inet_ntoa" >&5
8434echo "${ECHO_T}$ac_cv_lib_network_inet_ntoa" >&6; }
8435if test $ac_cv_lib_network_inet_ntoa = yes; then
8436  LIBS="$LIBS -lnetwork"
8437fi
8438
8439	    ;;
8440	HP-UX-*.11.*)
8441	    # Use updated header definitions where possible
8442
8443cat >>confdefs.h <<\_ACEOF
8444#define _XOPEN_SOURCE_EXTENDED 1
8445_ACEOF
8446
8447	    # TEA specific: Needed by Tcl, but not most extensions
8448	    #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
8449	    #LIBS="$LIBS -lxnet"               # Use the XOPEN network library
8450
8451	    if test "`uname -m`" = ia64; then
8452
8453		SHLIB_SUFFIX=".so"
8454		# Use newer C++ library for C++ extensions
8455		#if test "$GCC" != "yes" ; then
8456		#   CPPFLAGS="-AA"
8457		#fi
8458
8459else
8460
8461		SHLIB_SUFFIX=".sl"
8462
8463fi
8464
8465	    { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
8466echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
8467if test "${ac_cv_lib_dld_shl_load+set}" = set; then
8468  echo $ECHO_N "(cached) $ECHO_C" >&6
8469else
8470  ac_check_lib_save_LIBS=$LIBS
8471LIBS="-ldld  $LIBS"
8472cat >conftest.$ac_ext <<_ACEOF
8473/* confdefs.h.  */
8474_ACEOF
8475cat confdefs.h >>conftest.$ac_ext
8476cat >>conftest.$ac_ext <<_ACEOF
8477/* end confdefs.h.  */
8478
8479/* Override any GCC internal prototype to avoid an error.
8480   Use char because int might match the return type of a GCC
8481   builtin and then its argument prototype would still apply.  */
8482#ifdef __cplusplus
8483extern "C"
8484#endif
8485char shl_load ();
8486int
8487main ()
8488{
8489return shl_load ();
8490  ;
8491  return 0;
8492}
8493_ACEOF
8494rm -f conftest.$ac_objext conftest$ac_exeext
8495if { (ac_try="$ac_link"
8496case "(($ac_try" in
8497  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8498  *) ac_try_echo=$ac_try;;
8499esac
8500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8501  (eval "$ac_link") 2>conftest.er1
8502  ac_status=$?
8503  grep -v '^ *+' conftest.er1 >conftest.err
8504  rm -f conftest.er1
8505  cat conftest.err >&5
8506  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8507  (exit $ac_status); } && {
8508	 test -z "$ac_c_werror_flag" ||
8509	 test ! -s conftest.err
8510       } && test -s conftest$ac_exeext &&
8511       $as_test_x conftest$ac_exeext; then
8512  ac_cv_lib_dld_shl_load=yes
8513else
8514  echo "$as_me: failed program was:" >&5
8515sed 's/^/| /' conftest.$ac_ext >&5
8516
8517	ac_cv_lib_dld_shl_load=no
8518fi
8519
8520rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8521      conftest$ac_exeext conftest.$ac_ext
8522LIBS=$ac_check_lib_save_LIBS
8523fi
8524{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
8525echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
8526if test $ac_cv_lib_dld_shl_load = yes; then
8527  tcl_ok=yes
8528else
8529  tcl_ok=no
8530fi
8531
8532	    if test "$tcl_ok" = yes; then
8533
8534		LDFLAGS="$LDFLAGS -E"
8535		CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
8536		LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
8537		LD_LIBRARY_PATH_VAR="SHLIB_PATH"
8538
8539fi
8540
8541	    if test "$GCC" = yes; then
8542
8543		SHLIB_LD='${CC} -shared'
8544		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8545
8546else
8547
8548		CFLAGS="$CFLAGS -z"
8549		# Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
8550		#CFLAGS="$CFLAGS +DAportable"
8551		SHLIB_CFLAGS="+z"
8552		SHLIB_LD="ld -b"
8553
8554fi
8555
8556
8557	    # Check to enable 64-bit flags for compiler/linker
8558	    if test "$do64bit" = "yes"; then
8559
8560		if test "$GCC" = yes; then
8561
8562		    case `${CC} -dumpmachine` in
8563			hppa64*)
8564			    # 64-bit gcc in use.  Fix flags for GNU ld.
8565			    do64bit_ok=yes
8566			    SHLIB_LD='${CC} -shared'
8567			    if test $doRpath = yes; then
8568
8569				CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8570fi
8571
8572			    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8573			    ;;
8574			*)
8575			    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
8576echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
8577			    ;;
8578		    esac
8579
8580else
8581
8582		    do64bit_ok=yes
8583		    CFLAGS="$CFLAGS +DD64"
8584		    LDFLAGS_ARCH="+DD64"
8585
8586fi
8587
8588
8589fi
8590 ;;
8591	IRIX-6.*)
8592	    SHLIB_CFLAGS=""
8593	    SHLIB_LD="ld -n32 -shared -rdata_shared"
8594	    SHLIB_SUFFIX=".so"
8595	    if test $doRpath = yes; then
8596
8597		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8598		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
8599fi
8600
8601	    if test "$GCC" = yes; then
8602
8603		CFLAGS="$CFLAGS -mabi=n32"
8604		LDFLAGS="$LDFLAGS -mabi=n32"
8605
8606else
8607
8608		case $system in
8609		    IRIX-6.3)
8610			# Use to build 6.2 compatible binaries on 6.3.
8611			CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
8612			;;
8613		    *)
8614			CFLAGS="$CFLAGS -n32"
8615			;;
8616		esac
8617		LDFLAGS="$LDFLAGS -n32"
8618
8619fi
8620
8621	    ;;
8622	IRIX64-6.*)
8623	    SHLIB_CFLAGS=""
8624	    SHLIB_LD="ld -n32 -shared -rdata_shared"
8625	    SHLIB_SUFFIX=".so"
8626	    if test $doRpath = yes; then
8627
8628		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8629		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
8630fi
8631
8632
8633	    # Check to enable 64-bit flags for compiler/linker
8634
8635	    if test "$do64bit" = yes; then
8636
8637	        if test "$GCC" = yes; then
8638
8639	            { echo "$as_me:$LINENO: WARNING: 64bit mode not supported by gcc" >&5
8640echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;}
8641
8642else
8643
8644	            do64bit_ok=yes
8645	            SHLIB_LD="ld -64 -shared -rdata_shared"
8646	            CFLAGS="$CFLAGS -64"
8647	            LDFLAGS_ARCH="-64"
8648
8649fi
8650
8651
8652fi
8653
8654	    ;;
8655	Linux*)
8656	    SHLIB_CFLAGS="-fPIC"
8657	    SHLIB_SUFFIX=".so"
8658
8659	    # TEA specific:
8660	    CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
8661
8662	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
8663	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}'
8664	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
8665	    if test $doRpath = yes; then
8666
8667		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8668fi
8669
8670	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8671	    if test "`uname -m`" = "alpha"; then
8672  CFLAGS="$CFLAGS -mieee"
8673fi
8674
8675	    if test $do64bit = yes; then
8676
8677		{ echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5
8678echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6; }
8679if test "${tcl_cv_cc_m64+set}" = set; then
8680  echo $ECHO_N "(cached) $ECHO_C" >&6
8681else
8682
8683		    hold_cflags=$CFLAGS
8684		    CFLAGS="$CFLAGS -m64"
8685		    cat >conftest.$ac_ext <<_ACEOF
8686/* confdefs.h.  */
8687_ACEOF
8688cat confdefs.h >>conftest.$ac_ext
8689cat >>conftest.$ac_ext <<_ACEOF
8690/* end confdefs.h.  */
8691
8692int
8693main ()
8694{
8695
8696  ;
8697  return 0;
8698}
8699_ACEOF
8700rm -f conftest.$ac_objext conftest$ac_exeext
8701if { (ac_try="$ac_link"
8702case "(($ac_try" in
8703  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8704  *) ac_try_echo=$ac_try;;
8705esac
8706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8707  (eval "$ac_link") 2>conftest.er1
8708  ac_status=$?
8709  grep -v '^ *+' conftest.er1 >conftest.err
8710  rm -f conftest.er1
8711  cat conftest.err >&5
8712  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8713  (exit $ac_status); } && {
8714	 test -z "$ac_c_werror_flag" ||
8715	 test ! -s conftest.err
8716       } && test -s conftest$ac_exeext &&
8717       $as_test_x conftest$ac_exeext; then
8718  tcl_cv_cc_m64=yes
8719else
8720  echo "$as_me: failed program was:" >&5
8721sed 's/^/| /' conftest.$ac_ext >&5
8722
8723	tcl_cv_cc_m64=no
8724fi
8725
8726rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8727      conftest$ac_exeext conftest.$ac_ext
8728		    CFLAGS=$hold_cflags
8729fi
8730{ echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5
8731echo "${ECHO_T}$tcl_cv_cc_m64" >&6; }
8732		if test $tcl_cv_cc_m64 = yes; then
8733
8734		    CFLAGS="$CFLAGS -m64"
8735		    do64bit_ok=yes
8736
8737fi
8738
8739
8740fi
8741
8742
8743	    # The combo of gcc + glibc has a bug related to inlining of
8744	    # functions like strtod(). The -fno-builtin flag should address
8745	    # this problem but it does not work. The -fno-inline flag is kind
8746	    # of overkill but it works. Disable inlining only when one of the
8747	    # files in compat/*.c is being linked in.
8748
8749	    if test x"${USE_COMPAT}" != x; then
8750  CFLAGS="$CFLAGS -fno-inline"
8751fi
8752
8753
8754	    ;;
8755	GNU*)
8756	    SHLIB_CFLAGS="-fPIC"
8757	    SHLIB_SUFFIX=".so"
8758
8759	    SHLIB_LD='${CC} -shared'
8760	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
8761	    CC_SEARCH_FLAGS=""
8762	    LD_SEARCH_FLAGS=""
8763	    if test "`uname -m`" = "alpha"; then
8764  CFLAGS="$CFLAGS -mieee"
8765fi
8766
8767	    ;;
8768	Lynx*)
8769	    SHLIB_CFLAGS="-fPIC"
8770	    SHLIB_SUFFIX=".so"
8771	    CFLAGS_OPTIMIZE=-02
8772	    SHLIB_LD='${CC} -shared'
8773	    LD_FLAGS="-Wl,--export-dynamic"
8774	    if test $doRpath = yes; then
8775
8776		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8777		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8778fi
8779
8780	    ;;
8781	OpenBSD-*)
8782	    SHLIB_CFLAGS="-fPIC"
8783	    SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
8784	    SHLIB_SUFFIX=".so"
8785	    if test $doRpath = yes; then
8786
8787		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8788fi
8789
8790	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8791	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
8792	    { echo "$as_me:$LINENO: checking for ELF" >&5
8793echo $ECHO_N "checking for ELF... $ECHO_C" >&6; }
8794if test "${tcl_cv_ld_elf+set}" = set; then
8795  echo $ECHO_N "(cached) $ECHO_C" >&6
8796else
8797
8798		cat >conftest.$ac_ext <<_ACEOF
8799/* confdefs.h.  */
8800_ACEOF
8801cat confdefs.h >>conftest.$ac_ext
8802cat >>conftest.$ac_ext <<_ACEOF
8803/* end confdefs.h.  */
8804
8805#ifdef __ELF__
8806	yes
8807#endif
8808
8809_ACEOF
8810if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8811  $EGREP "yes" >/dev/null 2>&1; then
8812  tcl_cv_ld_elf=yes
8813else
8814  tcl_cv_ld_elf=no
8815fi
8816rm -f -r conftest*
8817
8818fi
8819{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5
8820echo "${ECHO_T}$tcl_cv_ld_elf" >&6; }
8821	    if test $tcl_cv_ld_elf = yes; then
8822
8823		LDFLAGS=-Wl,-export-dynamic
8824
8825else
8826  LDFLAGS=""
8827fi
8828
8829	    if test "${TCL_THREADS}" = "1"; then
8830
8831		# OpenBSD builds and links with -pthread, never -lpthread.
8832		LIBS=`echo $LIBS | sed s/-lpthread//`
8833		CFLAGS="$CFLAGS -pthread"
8834		SHLIB_CFLAGS="$SHLIB_CFLAGS -pthread"
8835
8836fi
8837
8838	    # OpenBSD doesn't do version numbers with dots.
8839	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
8840	    TCL_LIB_VERSIONS_OK=nodots
8841	    ;;
8842	NetBSD-*|FreeBSD-[3-4].*)
8843	    # FreeBSD 3.* and greater have ELF.
8844	    # NetBSD 2.* has ELF and can use 'cc -shared' to build shared libs
8845	    SHLIB_CFLAGS="-fPIC"
8846	    SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
8847	    SHLIB_SUFFIX=".so"
8848	    LDFLAGS="$LDFLAGS -export-dynamic"
8849	    if test $doRpath = yes; then
8850
8851		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8852fi
8853
8854	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8855	    if test "${TCL_THREADS}" = "1"; then
8856
8857		# The -pthread needs to go in the CFLAGS, not LIBS
8858		LIBS=`echo $LIBS | sed s/-pthread//`
8859		CFLAGS="$CFLAGS -pthread"
8860	    	LDFLAGS="$LDFLAGS -pthread"
8861
8862fi
8863
8864	    case $system in
8865	    FreeBSD-3.*)
8866	    	# FreeBSD-3 doesn't handle version numbers with dots.
8867	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
8868	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
8869	    	TCL_LIB_VERSIONS_OK=nodots
8870		;;
8871	    esac
8872	    ;;
8873	FreeBSD-*)
8874	    # This configuration from FreeBSD Ports.
8875	    SHLIB_CFLAGS="-fPIC"
8876	    SHLIB_LD="${CC} -shared"
8877	    TCL_SHLIB_LD_EXTRAS="-soname \$@"
8878	    SHLIB_SUFFIX=".so"
8879	    LDFLAGS=""
8880	    if test $doRpath = yes; then
8881
8882		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8883		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
8884fi
8885
8886	    if test "${TCL_THREADS}" = "1"; then
8887
8888		# The -pthread needs to go in the LDFLAGS, not LIBS
8889		LIBS=`echo $LIBS | sed s/-pthread//`
8890		CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8891		LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
8892fi
8893
8894	    # Version numbers are dot-stripped by system policy.
8895	    TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .`
8896	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
8897	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
8898	    TCL_LIB_VERSIONS_OK=nodots
8899	    ;;
8900	Darwin-*)
8901	    CFLAGS_OPTIMIZE="-Os"
8902	    SHLIB_CFLAGS="-fno-common"
8903	    # To avoid discrepancies between what headers configure sees during
8904	    # preprocessing tests and compiling tests, move any -isysroot and
8905	    # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
8906	    CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
8907		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
8908		if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`"
8909	    CFLAGS="`echo " ${CFLAGS}" | \
8910		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
8911		if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`"
8912	    if test $do64bit = yes; then
8913
8914		case `arch` in
8915		    ppc)
8916			{ echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5
8917echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6; }
8918if test "${tcl_cv_cc_arch_ppc64+set}" = set; then
8919  echo $ECHO_N "(cached) $ECHO_C" >&6
8920else
8921
8922			    hold_cflags=$CFLAGS
8923			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
8924			    cat >conftest.$ac_ext <<_ACEOF
8925/* confdefs.h.  */
8926_ACEOF
8927cat confdefs.h >>conftest.$ac_ext
8928cat >>conftest.$ac_ext <<_ACEOF
8929/* end confdefs.h.  */
8930
8931int
8932main ()
8933{
8934
8935  ;
8936  return 0;
8937}
8938_ACEOF
8939rm -f conftest.$ac_objext conftest$ac_exeext
8940if { (ac_try="$ac_link"
8941case "(($ac_try" in
8942  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8943  *) ac_try_echo=$ac_try;;
8944esac
8945eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8946  (eval "$ac_link") 2>conftest.er1
8947  ac_status=$?
8948  grep -v '^ *+' conftest.er1 >conftest.err
8949  rm -f conftest.er1
8950  cat conftest.err >&5
8951  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8952  (exit $ac_status); } && {
8953	 test -z "$ac_c_werror_flag" ||
8954	 test ! -s conftest.err
8955       } && test -s conftest$ac_exeext &&
8956       $as_test_x conftest$ac_exeext; then
8957  tcl_cv_cc_arch_ppc64=yes
8958else
8959  echo "$as_me: failed program was:" >&5
8960sed 's/^/| /' conftest.$ac_ext >&5
8961
8962	tcl_cv_cc_arch_ppc64=no
8963fi
8964
8965rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8966      conftest$ac_exeext conftest.$ac_ext
8967			    CFLAGS=$hold_cflags
8968fi
8969{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5
8970echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6; }
8971			if test $tcl_cv_cc_arch_ppc64 = yes; then
8972
8973			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
8974			    do64bit_ok=yes
8975
8976fi
8977;;
8978		    i386)
8979			{ echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5
8980echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6; }
8981if test "${tcl_cv_cc_arch_x86_64+set}" = set; then
8982  echo $ECHO_N "(cached) $ECHO_C" >&6
8983else
8984
8985			    hold_cflags=$CFLAGS
8986			    CFLAGS="$CFLAGS -arch x86_64"
8987			    cat >conftest.$ac_ext <<_ACEOF
8988/* confdefs.h.  */
8989_ACEOF
8990cat confdefs.h >>conftest.$ac_ext
8991cat >>conftest.$ac_ext <<_ACEOF
8992/* end confdefs.h.  */
8993
8994int
8995main ()
8996{
8997
8998  ;
8999  return 0;
9000}
9001_ACEOF
9002rm -f conftest.$ac_objext conftest$ac_exeext
9003if { (ac_try="$ac_link"
9004case "(($ac_try" in
9005  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9006  *) ac_try_echo=$ac_try;;
9007esac
9008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9009  (eval "$ac_link") 2>conftest.er1
9010  ac_status=$?
9011  grep -v '^ *+' conftest.er1 >conftest.err
9012  rm -f conftest.er1
9013  cat conftest.err >&5
9014  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9015  (exit $ac_status); } && {
9016	 test -z "$ac_c_werror_flag" ||
9017	 test ! -s conftest.err
9018       } && test -s conftest$ac_exeext &&
9019       $as_test_x conftest$ac_exeext; then
9020  tcl_cv_cc_arch_x86_64=yes
9021else
9022  echo "$as_me: failed program was:" >&5
9023sed 's/^/| /' conftest.$ac_ext >&5
9024
9025	tcl_cv_cc_arch_x86_64=no
9026fi
9027
9028rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9029      conftest$ac_exeext conftest.$ac_ext
9030			    CFLAGS=$hold_cflags
9031fi
9032{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5
9033echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6; }
9034			if test $tcl_cv_cc_arch_x86_64 = yes; then
9035
9036			    CFLAGS="$CFLAGS -arch x86_64"
9037			    do64bit_ok=yes
9038
9039fi
9040;;
9041		    *)
9042			{ echo "$as_me:$LINENO: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5
9043echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};;
9044		esac
9045
9046else
9047
9048		# Check for combined 32-bit and 64-bit fat build
9049		if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
9050		    && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '; then
9051
9052		    fat_32_64=yes
9053fi
9054
9055
9056fi
9057
9058	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
9059	    SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
9060	    { echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5
9061echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6; }
9062if test "${tcl_cv_ld_single_module+set}" = set; then
9063  echo $ECHO_N "(cached) $ECHO_C" >&6
9064else
9065
9066		hold_ldflags=$LDFLAGS
9067		LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
9068		cat >conftest.$ac_ext <<_ACEOF
9069/* confdefs.h.  */
9070_ACEOF
9071cat confdefs.h >>conftest.$ac_ext
9072cat >>conftest.$ac_ext <<_ACEOF
9073/* end confdefs.h.  */
9074
9075int
9076main ()
9077{
9078int i;
9079  ;
9080  return 0;
9081}
9082_ACEOF
9083rm -f conftest.$ac_objext conftest$ac_exeext
9084if { (ac_try="$ac_link"
9085case "(($ac_try" in
9086  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9087  *) ac_try_echo=$ac_try;;
9088esac
9089eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9090  (eval "$ac_link") 2>conftest.er1
9091  ac_status=$?
9092  grep -v '^ *+' conftest.er1 >conftest.err
9093  rm -f conftest.er1
9094  cat conftest.err >&5
9095  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9096  (exit $ac_status); } && {
9097	 test -z "$ac_c_werror_flag" ||
9098	 test ! -s conftest.err
9099       } && test -s conftest$ac_exeext &&
9100       $as_test_x conftest$ac_exeext; then
9101  tcl_cv_ld_single_module=yes
9102else
9103  echo "$as_me: failed program was:" >&5
9104sed 's/^/| /' conftest.$ac_ext >&5
9105
9106	tcl_cv_ld_single_module=no
9107fi
9108
9109rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9110      conftest$ac_exeext conftest.$ac_ext
9111		LDFLAGS=$hold_ldflags
9112fi
9113{ echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5
9114echo "${ECHO_T}$tcl_cv_ld_single_module" >&6; }
9115	    if test $tcl_cv_ld_single_module = yes; then
9116
9117		SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
9118
9119fi
9120
9121	    # TEA specific: link shlib with current and compatiblity version flags
9122	    vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([0-9]\{1,5\}\)\(\(\.[0-9]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d`
9123	    SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}"
9124	    SHLIB_SUFFIX=".dylib"
9125	    # Don't use -prebind when building for Mac OS X 10.4 or later only:
9126	    if test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \
9127		"`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4; then
9128
9129		LDFLAGS="$LDFLAGS -prebind"
9130fi
9131
9132	    LDFLAGS="$LDFLAGS -headerpad_max_install_names"
9133	    { echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5
9134echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6; }
9135if test "${tcl_cv_ld_search_paths_first+set}" = set; then
9136  echo $ECHO_N "(cached) $ECHO_C" >&6
9137else
9138
9139		hold_ldflags=$LDFLAGS
9140		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
9141		cat >conftest.$ac_ext <<_ACEOF
9142/* confdefs.h.  */
9143_ACEOF
9144cat confdefs.h >>conftest.$ac_ext
9145cat >>conftest.$ac_ext <<_ACEOF
9146/* end confdefs.h.  */
9147
9148int
9149main ()
9150{
9151int i;
9152  ;
9153  return 0;
9154}
9155_ACEOF
9156rm -f conftest.$ac_objext conftest$ac_exeext
9157if { (ac_try="$ac_link"
9158case "(($ac_try" in
9159  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9160  *) ac_try_echo=$ac_try;;
9161esac
9162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9163  (eval "$ac_link") 2>conftest.er1
9164  ac_status=$?
9165  grep -v '^ *+' conftest.er1 >conftest.err
9166  rm -f conftest.er1
9167  cat conftest.err >&5
9168  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9169  (exit $ac_status); } && {
9170	 test -z "$ac_c_werror_flag" ||
9171	 test ! -s conftest.err
9172       } && test -s conftest$ac_exeext &&
9173       $as_test_x conftest$ac_exeext; then
9174  tcl_cv_ld_search_paths_first=yes
9175else
9176  echo "$as_me: failed program was:" >&5
9177sed 's/^/| /' conftest.$ac_ext >&5
9178
9179	tcl_cv_ld_search_paths_first=no
9180fi
9181
9182rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9183      conftest$ac_exeext conftest.$ac_ext
9184		LDFLAGS=$hold_ldflags
9185fi
9186{ echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5
9187echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6; }
9188	    if test $tcl_cv_ld_search_paths_first = yes; then
9189
9190		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
9191
9192fi
9193
9194	    if test "$tcl_cv_cc_visibility_hidden" != yes; then
9195
9196
9197cat >>confdefs.h <<\_ACEOF
9198#define MODULE_SCOPE __private_extern__
9199_ACEOF
9200
9201		tcl_cv_cc_visibility_hidden=yes
9202
9203fi
9204
9205	    CC_SEARCH_FLAGS=""
9206	    LD_SEARCH_FLAGS=""
9207	    LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
9208	    # TEA specific: for combined 32 & 64 bit fat builds of Tk
9209	    # extensions, verify that 64-bit build is possible.
9210	    if test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"; then
9211
9212		if test "${TEA_WINDOWINGSYSTEM}" = x11; then
9213
9214		    { echo "$as_me:$LINENO: checking for 64-bit X11" >&5
9215echo $ECHO_N "checking for 64-bit X11... $ECHO_C" >&6; }
9216if test "${tcl_cv_lib_x11_64+set}" = set; then
9217  echo $ECHO_N "(cached) $ECHO_C" >&6
9218else
9219
9220			for v in CFLAGS CPPFLAGS LDFLAGS; do
9221			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
9222			done
9223			CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
9224			LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
9225			cat >conftest.$ac_ext <<_ACEOF
9226/* confdefs.h.  */
9227_ACEOF
9228cat confdefs.h >>conftest.$ac_ext
9229cat >>conftest.$ac_ext <<_ACEOF
9230/* end confdefs.h.  */
9231#include <X11/Xlib.h>
9232int
9233main ()
9234{
9235XrmInitialize();
9236  ;
9237  return 0;
9238}
9239_ACEOF
9240rm -f conftest.$ac_objext conftest$ac_exeext
9241if { (ac_try="$ac_link"
9242case "(($ac_try" in
9243  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9244  *) ac_try_echo=$ac_try;;
9245esac
9246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9247  (eval "$ac_link") 2>conftest.er1
9248  ac_status=$?
9249  grep -v '^ *+' conftest.er1 >conftest.err
9250  rm -f conftest.er1
9251  cat conftest.err >&5
9252  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9253  (exit $ac_status); } && {
9254	 test -z "$ac_c_werror_flag" ||
9255	 test ! -s conftest.err
9256       } && test -s conftest$ac_exeext &&
9257       $as_test_x conftest$ac_exeext; then
9258  tcl_cv_lib_x11_64=yes
9259else
9260  echo "$as_me: failed program was:" >&5
9261sed 's/^/| /' conftest.$ac_ext >&5
9262
9263	tcl_cv_lib_x11_64=no
9264fi
9265
9266rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9267      conftest$ac_exeext conftest.$ac_ext
9268			for v in CFLAGS CPPFLAGS LDFLAGS; do
9269			    eval $v'="$hold_'$v'"'
9270			done
9271fi
9272{ echo "$as_me:$LINENO: result: $tcl_cv_lib_x11_64" >&5
9273echo "${ECHO_T}$tcl_cv_lib_x11_64" >&6; }
9274
9275fi
9276
9277		if test "${TEA_WINDOWINGSYSTEM}" = aqua; then
9278
9279		    { echo "$as_me:$LINENO: checking for 64-bit Tk" >&5
9280echo $ECHO_N "checking for 64-bit Tk... $ECHO_C" >&6; }
9281if test "${tcl_cv_lib_tk_64+set}" = set; then
9282  echo $ECHO_N "(cached) $ECHO_C" >&6
9283else
9284
9285			for v in CFLAGS CPPFLAGS LDFLAGS; do
9286			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
9287			done
9288			CPPFLAGS="$CPPFLAGS -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 `eval "echo ${TCL_INCLUDES} ${TK_INCLUDES}"`"
9289			LDFLAGS="$LDFLAGS ${TCL_STUB_LIB_SPEC} ${TK_STUB_LIB_SPEC}"
9290			cat >conftest.$ac_ext <<_ACEOF
9291/* confdefs.h.  */
9292_ACEOF
9293cat confdefs.h >>conftest.$ac_ext
9294cat >>conftest.$ac_ext <<_ACEOF
9295/* end confdefs.h.  */
9296#include <tk.h>
9297int
9298main ()
9299{
9300Tk_InitStubs(NULL, "", 0);
9301  ;
9302  return 0;
9303}
9304_ACEOF
9305rm -f conftest.$ac_objext conftest$ac_exeext
9306if { (ac_try="$ac_link"
9307case "(($ac_try" in
9308  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9309  *) ac_try_echo=$ac_try;;
9310esac
9311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9312  (eval "$ac_link") 2>conftest.er1
9313  ac_status=$?
9314  grep -v '^ *+' conftest.er1 >conftest.err
9315  rm -f conftest.er1
9316  cat conftest.err >&5
9317  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9318  (exit $ac_status); } && {
9319	 test -z "$ac_c_werror_flag" ||
9320	 test ! -s conftest.err
9321       } && test -s conftest$ac_exeext &&
9322       $as_test_x conftest$ac_exeext; then
9323  tcl_cv_lib_tk_64=yes
9324else
9325  echo "$as_me: failed program was:" >&5
9326sed 's/^/| /' conftest.$ac_ext >&5
9327
9328	tcl_cv_lib_tk_64=no
9329fi
9330
9331rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9332      conftest$ac_exeext conftest.$ac_ext
9333			for v in CFLAGS CPPFLAGS LDFLAGS; do
9334			    eval $v'="$hold_'$v'"'
9335			done
9336fi
9337{ echo "$as_me:$LINENO: result: $tcl_cv_lib_tk_64" >&5
9338echo "${ECHO_T}$tcl_cv_lib_tk_64" >&6; }
9339
9340fi
9341
9342		# remove 64-bit arch flags from CFLAGS et al. if configuration
9343		# does not support 64-bit.
9344		if test "$tcl_cv_lib_tk_64" = no -o "$tcl_cv_lib_x11_64" = no; then
9345
9346		    { echo "$as_me:$LINENO: Removing 64-bit architectures from compiler & linker flags" >&5
9347echo "$as_me: Removing 64-bit architectures from compiler & linker flags" >&6;}
9348		    for v in CFLAGS CPPFLAGS LDFLAGS; do
9349			eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
9350		    done
9351fi
9352
9353
9354fi
9355
9356	    ;;
9357	OS/390-*)
9358	    CFLAGS_OPTIMIZE=""		# Optimizer is buggy
9359
9360cat >>confdefs.h <<\_ACEOF
9361#define _OE_SOCKETS 1
9362_ACEOF
9363
9364	    ;;
9365	OSF1-V*)
9366	    # Digital OSF/1
9367	    SHLIB_CFLAGS=""
9368	    if test "$SHARED_BUILD" = 1; then
9369
9370	        SHLIB_LD='ld -shared -expect_unresolved "*"'
9371
9372else
9373
9374	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
9375
9376fi
9377
9378	    SHLIB_SUFFIX=".so"
9379	    if test $doRpath = yes; then
9380
9381		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9382		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
9383fi
9384
9385	    if test "$GCC" = yes; then
9386  CFLAGS="$CFLAGS -mieee"
9387else
9388
9389		CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
9390fi
9391
9392	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
9393	    if test "${TCL_THREADS}" = 1; then
9394
9395		CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
9396		CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
9397		LIBS=`echo $LIBS | sed s/-lpthreads//`
9398		if test "$GCC" = yes; then
9399
9400		    LIBS="$LIBS -lpthread -lmach -lexc"
9401
9402else
9403
9404		    CFLAGS="$CFLAGS -pthread"
9405		    LDFLAGS="$LDFLAGS -pthread"
9406
9407fi
9408
9409
9410fi
9411
9412	    ;;
9413	QNX-6*)
9414	    # QNX RTP
9415	    # This may work for all QNX, but it was only reported for v6.
9416	    SHLIB_CFLAGS="-fPIC"
9417	    SHLIB_LD="ld -Bshareable -x"
9418	    SHLIB_LD_LIBS=""
9419	    SHLIB_SUFFIX=".so"
9420	    CC_SEARCH_FLAGS=""
9421	    LD_SEARCH_FLAGS=""
9422	    ;;
9423	SCO_SV-3.2*)
9424	    if test "$GCC" = yes; then
9425
9426		SHLIB_CFLAGS="-fPIC -melf"
9427		LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
9428
9429else
9430
9431	       SHLIB_CFLAGS="-Kpic -belf"
9432	       LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
9433
9434fi
9435
9436	    SHLIB_LD="ld -G"
9437	    SHLIB_LD_LIBS=""
9438	    SHLIB_SUFFIX=".so"
9439	    CC_SEARCH_FLAGS=""
9440	    LD_SEARCH_FLAGS=""
9441	    ;;
9442	SunOS-5.[0-6])
9443	    # Careful to not let 5.10+ fall into this case
9444
9445	    # Note: If _REENTRANT isn't defined, then Solaris
9446	    # won't define thread-safe library routines.
9447
9448
9449cat >>confdefs.h <<\_ACEOF
9450#define _REENTRANT 1
9451_ACEOF
9452
9453
9454cat >>confdefs.h <<\_ACEOF
9455#define _POSIX_PTHREAD_SEMANTICS 1
9456_ACEOF
9457
9458
9459	    SHLIB_CFLAGS="-KPIC"
9460	    SHLIB_SUFFIX=".so"
9461	    if test "$GCC" = yes; then
9462
9463		SHLIB_LD='${CC} -shared'
9464		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
9465		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9466
9467else
9468
9469		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
9470		CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
9471		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9472
9473fi
9474
9475	    ;;
9476	SunOS-5*)
9477	    # Note: If _REENTRANT isn't defined, then Solaris
9478	    # won't define thread-safe library routines.
9479
9480
9481cat >>confdefs.h <<\_ACEOF
9482#define _REENTRANT 1
9483_ACEOF
9484
9485
9486cat >>confdefs.h <<\_ACEOF
9487#define _POSIX_PTHREAD_SEMANTICS 1
9488_ACEOF
9489
9490
9491	    SHLIB_CFLAGS="-KPIC"
9492
9493	    # Check to enable 64-bit flags for compiler/linker
9494	    if test "$do64bit" = yes; then
9495
9496		arch=`isainfo`
9497		if test "$arch" = "sparcv9 sparc"; then
9498
9499		    if test "$GCC" = yes; then
9500
9501			if test "`${CC} -dumpversion | awk -F. '{print $1}'`" -lt 3; then
9502
9503			    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5
9504echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;}
9505
9506else
9507
9508			    do64bit_ok=yes
9509			    CFLAGS="$CFLAGS -m64 -mcpu=v9"
9510			    LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
9511			    SHLIB_CFLAGS="-fPIC"
9512
9513fi
9514
9515
9516else
9517
9518			do64bit_ok=yes
9519			if test "$do64bitVIS" = yes; then
9520
9521			    CFLAGS="$CFLAGS -xarch=v9a"
9522			    LDFLAGS_ARCH="-xarch=v9a"
9523
9524else
9525
9526			    CFLAGS="$CFLAGS -xarch=v9"
9527			    LDFLAGS_ARCH="-xarch=v9"
9528
9529fi
9530
9531			# Solaris 64 uses this as well
9532			#LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
9533
9534fi
9535
9536
9537else
9538  if test "$arch" = "amd64 i386"; then
9539
9540		    if test "$GCC" = yes; then
9541
9542			case $system in
9543			    SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
9544				do64bit_ok=yes
9545				CFLAGS="$CFLAGS -m64"
9546				LDFLAGS="$LDFLAGS -m64";;
9547			    *)
9548				{ echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
9549echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;};;
9550			esac
9551
9552else
9553
9554			do64bit_ok=yes
9555			case $system in
9556			    SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
9557				CFLAGS="$CFLAGS -m64"
9558				LDFLAGS="$LDFLAGS -m64";;
9559			    *)
9560				CFLAGS="$CFLAGS -xarch=amd64"
9561				LDFLAGS="$LDFLAGS -xarch=amd64";;
9562			esac
9563
9564fi
9565
9566
9567else
9568  { echo "$as_me:$LINENO: WARNING: 64bit mode not supported for $arch" >&5
9569echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;}
9570fi
9571
9572fi
9573
9574
9575fi
9576
9577
9578	    SHLIB_SUFFIX=".so"
9579	    if test "$GCC" = yes; then
9580
9581		SHLIB_LD='${CC} -shared'
9582		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
9583		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9584		if test "$do64bit_ok" = yes; then
9585
9586		    if test "$arch" = "sparcv9 sparc"; then
9587
9588			# We need to specify -static-libgcc or we need to
9589			# add the path to the sparv9 libgcc.
9590			# JH: static-libgcc is necessary for core Tcl, but may
9591			# not be necessary for extensions.
9592			SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
9593			# for finding sparcv9 libgcc, get the regular libgcc
9594			# path, remove so name and append 'sparcv9'
9595			#v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
9596			#CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
9597
9598else
9599  if test "$arch" = "amd64 i386"; then
9600
9601			# JH: static-libgcc is necessary for core Tcl, but may
9602			# not be necessary for extensions.
9603			SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
9604
9605fi
9606
9607fi
9608
9609
9610fi
9611
9612
9613else
9614
9615		case $system in
9616		    SunOS-5.[1-9][0-9]*)
9617			# TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
9618			SHLIB_LD='${CC} -G -z text ${LDFLAGS_DEFAULT}';;
9619		    *)
9620			SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
9621		esac
9622		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
9623		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
9624
9625fi
9626
9627	    ;;
9628    esac
9629
9630    if test "$do64bit" = yes -a "$do64bit_ok" = no; then
9631
9632	{ echo "$as_me:$LINENO: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5
9633echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;}
9634
9635fi
9636
9637
9638
9639
9640    # Add in the arch flags late to ensure it wasn't removed.
9641    # Not necessary in TEA, but this is aligned with core
9642    LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
9643
9644    # If we're running gcc, then change the C flags for compiling shared
9645    # libraries to the right flags for gcc, instead of those for the
9646    # standard manufacturer compiler.
9647
9648    if test "$GCC" = yes; then
9649
9650	case $system in
9651	    AIX-*) ;;
9652	    BSD/OS*) ;;
9653	    CYGWIN_*) ;;
9654	    IRIX*) ;;
9655	    NetBSD-*|FreeBSD-*|OpenBSD-*) ;;
9656	    Darwin-*) ;;
9657	    SCO_SV-3.2*) ;;
9658	    windows) ;;
9659	    *) SHLIB_CFLAGS="-fPIC" ;;
9660	esac
9661fi
9662
9663
9664    if test "$tcl_cv_cc_visibility_hidden" != yes; then
9665
9666
9667cat >>confdefs.h <<\_ACEOF
9668#define MODULE_SCOPE extern
9669_ACEOF
9670
9671
9672cat >>confdefs.h <<\_ACEOF
9673#define NO_VIZ
9674_ACEOF
9675
9676
9677fi
9678
9679
9680    if test "$SHARED_LIB_SUFFIX" = ""; then
9681
9682	# TEA specific: use PACKAGE_VERSION instead of VERSION
9683	SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'
9684fi
9685
9686    if test "$UNSHARED_LIB_SUFFIX" = ""; then
9687
9688	# TEA specific: use PACKAGE_VERSION instead of VERSION
9689	UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
9690fi
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705    # These must be called after we do the basic CFLAGS checks and
9706    # verify any possible 64-bit or similar switches are necessary
9707
9708    { echo "$as_me:$LINENO: checking for required early compiler flags" >&5
9709echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6; }
9710    tcl_flags=""
9711
9712    if test "${tcl_cv_flag__isoc99_source+set}" = set; then
9713  echo $ECHO_N "(cached) $ECHO_C" >&6
9714else
9715  cat >conftest.$ac_ext <<_ACEOF
9716/* confdefs.h.  */
9717_ACEOF
9718cat confdefs.h >>conftest.$ac_ext
9719cat >>conftest.$ac_ext <<_ACEOF
9720/* end confdefs.h.  */
9721#include <stdlib.h>
9722int
9723main ()
9724{
9725char *p = (char *)strtoll; char *q = (char *)strtoull;
9726  ;
9727  return 0;
9728}
9729_ACEOF
9730rm -f conftest.$ac_objext
9731if { (ac_try="$ac_compile"
9732case "(($ac_try" in
9733  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9734  *) ac_try_echo=$ac_try;;
9735esac
9736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9737  (eval "$ac_compile") 2>conftest.er1
9738  ac_status=$?
9739  grep -v '^ *+' conftest.er1 >conftest.err
9740  rm -f conftest.er1
9741  cat conftest.err >&5
9742  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9743  (exit $ac_status); } && {
9744	 test -z "$ac_c_werror_flag" ||
9745	 test ! -s conftest.err
9746       } && test -s conftest.$ac_objext; then
9747  tcl_cv_flag__isoc99_source=no
9748else
9749  echo "$as_me: failed program was:" >&5
9750sed 's/^/| /' conftest.$ac_ext >&5
9751
9752	cat >conftest.$ac_ext <<_ACEOF
9753/* confdefs.h.  */
9754_ACEOF
9755cat confdefs.h >>conftest.$ac_ext
9756cat >>conftest.$ac_ext <<_ACEOF
9757/* end confdefs.h.  */
9758#define _ISOC99_SOURCE 1
9759#include <stdlib.h>
9760int
9761main ()
9762{
9763char *p = (char *)strtoll; char *q = (char *)strtoull;
9764  ;
9765  return 0;
9766}
9767_ACEOF
9768rm -f conftest.$ac_objext
9769if { (ac_try="$ac_compile"
9770case "(($ac_try" in
9771  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9772  *) ac_try_echo=$ac_try;;
9773esac
9774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9775  (eval "$ac_compile") 2>conftest.er1
9776  ac_status=$?
9777  grep -v '^ *+' conftest.er1 >conftest.err
9778  rm -f conftest.er1
9779  cat conftest.err >&5
9780  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9781  (exit $ac_status); } && {
9782	 test -z "$ac_c_werror_flag" ||
9783	 test ! -s conftest.err
9784       } && test -s conftest.$ac_objext; then
9785  tcl_cv_flag__isoc99_source=yes
9786else
9787  echo "$as_me: failed program was:" >&5
9788sed 's/^/| /' conftest.$ac_ext >&5
9789
9790	tcl_cv_flag__isoc99_source=no
9791fi
9792
9793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9794fi
9795
9796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9797fi
9798
9799    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
9800
9801cat >>confdefs.h <<\_ACEOF
9802#define _ISOC99_SOURCE 1
9803_ACEOF
9804
9805	tcl_flags="$tcl_flags _ISOC99_SOURCE"
9806    fi
9807
9808
9809    if test "${tcl_cv_flag__largefile64_source+set}" = set; then
9810  echo $ECHO_N "(cached) $ECHO_C" >&6
9811else
9812  cat >conftest.$ac_ext <<_ACEOF
9813/* confdefs.h.  */
9814_ACEOF
9815cat confdefs.h >>conftest.$ac_ext
9816cat >>conftest.$ac_ext <<_ACEOF
9817/* end confdefs.h.  */
9818#include <sys/stat.h>
9819int
9820main ()
9821{
9822struct stat64 buf; int i = stat64("/", &buf);
9823  ;
9824  return 0;
9825}
9826_ACEOF
9827rm -f conftest.$ac_objext
9828if { (ac_try="$ac_compile"
9829case "(($ac_try" in
9830  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9831  *) ac_try_echo=$ac_try;;
9832esac
9833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9834  (eval "$ac_compile") 2>conftest.er1
9835  ac_status=$?
9836  grep -v '^ *+' conftest.er1 >conftest.err
9837  rm -f conftest.er1
9838  cat conftest.err >&5
9839  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9840  (exit $ac_status); } && {
9841	 test -z "$ac_c_werror_flag" ||
9842	 test ! -s conftest.err
9843       } && test -s conftest.$ac_objext; then
9844  tcl_cv_flag__largefile64_source=no
9845else
9846  echo "$as_me: failed program was:" >&5
9847sed 's/^/| /' conftest.$ac_ext >&5
9848
9849	cat >conftest.$ac_ext <<_ACEOF
9850/* confdefs.h.  */
9851_ACEOF
9852cat confdefs.h >>conftest.$ac_ext
9853cat >>conftest.$ac_ext <<_ACEOF
9854/* end confdefs.h.  */
9855#define _LARGEFILE64_SOURCE 1
9856#include <sys/stat.h>
9857int
9858main ()
9859{
9860struct stat64 buf; int i = stat64("/", &buf);
9861  ;
9862  return 0;
9863}
9864_ACEOF
9865rm -f conftest.$ac_objext
9866if { (ac_try="$ac_compile"
9867case "(($ac_try" in
9868  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9869  *) ac_try_echo=$ac_try;;
9870esac
9871eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9872  (eval "$ac_compile") 2>conftest.er1
9873  ac_status=$?
9874  grep -v '^ *+' conftest.er1 >conftest.err
9875  rm -f conftest.er1
9876  cat conftest.err >&5
9877  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9878  (exit $ac_status); } && {
9879	 test -z "$ac_c_werror_flag" ||
9880	 test ! -s conftest.err
9881       } && test -s conftest.$ac_objext; then
9882  tcl_cv_flag__largefile64_source=yes
9883else
9884  echo "$as_me: failed program was:" >&5
9885sed 's/^/| /' conftest.$ac_ext >&5
9886
9887	tcl_cv_flag__largefile64_source=no
9888fi
9889
9890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9891fi
9892
9893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9894fi
9895
9896    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
9897
9898cat >>confdefs.h <<\_ACEOF
9899#define _LARGEFILE64_SOURCE 1
9900_ACEOF
9901
9902	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
9903    fi
9904
9905
9906    if test "${tcl_cv_flag__largefile_source64+set}" = set; then
9907  echo $ECHO_N "(cached) $ECHO_C" >&6
9908else
9909  cat >conftest.$ac_ext <<_ACEOF
9910/* confdefs.h.  */
9911_ACEOF
9912cat confdefs.h >>conftest.$ac_ext
9913cat >>conftest.$ac_ext <<_ACEOF
9914/* end confdefs.h.  */
9915#include <sys/stat.h>
9916int
9917main ()
9918{
9919char *p = (char *)open64;
9920  ;
9921  return 0;
9922}
9923_ACEOF
9924rm -f conftest.$ac_objext
9925if { (ac_try="$ac_compile"
9926case "(($ac_try" in
9927  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9928  *) ac_try_echo=$ac_try;;
9929esac
9930eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9931  (eval "$ac_compile") 2>conftest.er1
9932  ac_status=$?
9933  grep -v '^ *+' conftest.er1 >conftest.err
9934  rm -f conftest.er1
9935  cat conftest.err >&5
9936  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9937  (exit $ac_status); } && {
9938	 test -z "$ac_c_werror_flag" ||
9939	 test ! -s conftest.err
9940       } && test -s conftest.$ac_objext; then
9941  tcl_cv_flag__largefile_source64=no
9942else
9943  echo "$as_me: failed program was:" >&5
9944sed 's/^/| /' conftest.$ac_ext >&5
9945
9946	cat >conftest.$ac_ext <<_ACEOF
9947/* confdefs.h.  */
9948_ACEOF
9949cat confdefs.h >>conftest.$ac_ext
9950cat >>conftest.$ac_ext <<_ACEOF
9951/* end confdefs.h.  */
9952#define _LARGEFILE_SOURCE64 1
9953#include <sys/stat.h>
9954int
9955main ()
9956{
9957char *p = (char *)open64;
9958  ;
9959  return 0;
9960}
9961_ACEOF
9962rm -f conftest.$ac_objext
9963if { (ac_try="$ac_compile"
9964case "(($ac_try" in
9965  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9966  *) ac_try_echo=$ac_try;;
9967esac
9968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9969  (eval "$ac_compile") 2>conftest.er1
9970  ac_status=$?
9971  grep -v '^ *+' conftest.er1 >conftest.err
9972  rm -f conftest.er1
9973  cat conftest.err >&5
9974  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9975  (exit $ac_status); } && {
9976	 test -z "$ac_c_werror_flag" ||
9977	 test ! -s conftest.err
9978       } && test -s conftest.$ac_objext; then
9979  tcl_cv_flag__largefile_source64=yes
9980else
9981  echo "$as_me: failed program was:" >&5
9982sed 's/^/| /' conftest.$ac_ext >&5
9983
9984	tcl_cv_flag__largefile_source64=no
9985fi
9986
9987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9988fi
9989
9990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9991fi
9992
9993    if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then
9994
9995cat >>confdefs.h <<\_ACEOF
9996#define _LARGEFILE_SOURCE64 1
9997_ACEOF
9998
9999	tcl_flags="$tcl_flags _LARGEFILE_SOURCE64"
10000    fi
10001
10002    if test "x${tcl_flags}" = "x" ; then
10003	{ echo "$as_me:$LINENO: result: none" >&5
10004echo "${ECHO_T}none" >&6; }
10005    else
10006	{ echo "$as_me:$LINENO: result: ${tcl_flags}" >&5
10007echo "${ECHO_T}${tcl_flags}" >&6; }
10008    fi
10009
10010
10011    { echo "$as_me:$LINENO: checking for 64-bit integer type" >&5
10012echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6; }
10013    if test "${tcl_cv_type_64bit+set}" = set; then
10014  echo $ECHO_N "(cached) $ECHO_C" >&6
10015else
10016
10017	tcl_cv_type_64bit=none
10018	# See if the compiler knows natively about __int64
10019	cat >conftest.$ac_ext <<_ACEOF
10020/* confdefs.h.  */
10021_ACEOF
10022cat confdefs.h >>conftest.$ac_ext
10023cat >>conftest.$ac_ext <<_ACEOF
10024/* end confdefs.h.  */
10025
10026int
10027main ()
10028{
10029__int64 value = (__int64) 0;
10030  ;
10031  return 0;
10032}
10033_ACEOF
10034rm -f conftest.$ac_objext
10035if { (ac_try="$ac_compile"
10036case "(($ac_try" in
10037  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10038  *) ac_try_echo=$ac_try;;
10039esac
10040eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10041  (eval "$ac_compile") 2>conftest.er1
10042  ac_status=$?
10043  grep -v '^ *+' conftest.er1 >conftest.err
10044  rm -f conftest.er1
10045  cat conftest.err >&5
10046  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10047  (exit $ac_status); } && {
10048	 test -z "$ac_c_werror_flag" ||
10049	 test ! -s conftest.err
10050       } && test -s conftest.$ac_objext; then
10051  tcl_type_64bit=__int64
10052else
10053  echo "$as_me: failed program was:" >&5
10054sed 's/^/| /' conftest.$ac_ext >&5
10055
10056	tcl_type_64bit="long long"
10057fi
10058
10059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10060	# See if we should use long anyway  Note that we substitute in the
10061	# type that is our current guess for a 64-bit type inside this check
10062	# program, so it should be modified only carefully...
10063        cat >conftest.$ac_ext <<_ACEOF
10064/* confdefs.h.  */
10065_ACEOF
10066cat confdefs.h >>conftest.$ac_ext
10067cat >>conftest.$ac_ext <<_ACEOF
10068/* end confdefs.h.  */
10069
10070int
10071main ()
10072{
10073switch (0) {
10074            case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
10075        }
10076  ;
10077  return 0;
10078}
10079_ACEOF
10080rm -f conftest.$ac_objext
10081if { (ac_try="$ac_compile"
10082case "(($ac_try" in
10083  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10084  *) ac_try_echo=$ac_try;;
10085esac
10086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10087  (eval "$ac_compile") 2>conftest.er1
10088  ac_status=$?
10089  grep -v '^ *+' conftest.er1 >conftest.err
10090  rm -f conftest.er1
10091  cat conftest.err >&5
10092  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10093  (exit $ac_status); } && {
10094	 test -z "$ac_c_werror_flag" ||
10095	 test ! -s conftest.err
10096       } && test -s conftest.$ac_objext; then
10097  tcl_cv_type_64bit=${tcl_type_64bit}
10098else
10099  echo "$as_me: failed program was:" >&5
10100sed 's/^/| /' conftest.$ac_ext >&5
10101
10102
10103fi
10104
10105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10106fi
10107
10108    if test "${tcl_cv_type_64bit}" = none ; then
10109
10110cat >>confdefs.h <<\_ACEOF
10111#define TCL_WIDE_INT_IS_LONG 1
10112_ACEOF
10113
10114	{ echo "$as_me:$LINENO: result: using long" >&5
10115echo "${ECHO_T}using long" >&6; }
10116    elif test "${tcl_cv_type_64bit}" = "__int64" \
10117		-a "${TEA_PLATFORM}" = "windows" ; then
10118	# TEA specific: We actually want to use the default tcl.h checks in
10119	# this case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER*
10120	{ echo "$as_me:$LINENO: result: using Tcl header defaults" >&5
10121echo "${ECHO_T}using Tcl header defaults" >&6; }
10122    else
10123
10124cat >>confdefs.h <<_ACEOF
10125#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
10126_ACEOF
10127
10128	{ echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5
10129echo "${ECHO_T}${tcl_cv_type_64bit}" >&6; }
10130
10131	# Now check for auxiliary declarations
10132	{ echo "$as_me:$LINENO: checking for struct dirent64" >&5
10133echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6; }
10134if test "${tcl_cv_struct_dirent64+set}" = set; then
10135  echo $ECHO_N "(cached) $ECHO_C" >&6
10136else
10137
10138	    cat >conftest.$ac_ext <<_ACEOF
10139/* confdefs.h.  */
10140_ACEOF
10141cat confdefs.h >>conftest.$ac_ext
10142cat >>conftest.$ac_ext <<_ACEOF
10143/* end confdefs.h.  */
10144#include <sys/types.h>
10145#include <sys/dirent.h>
10146int
10147main ()
10148{
10149struct dirent64 p;
10150  ;
10151  return 0;
10152}
10153_ACEOF
10154rm -f conftest.$ac_objext
10155if { (ac_try="$ac_compile"
10156case "(($ac_try" in
10157  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10158  *) ac_try_echo=$ac_try;;
10159esac
10160eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10161  (eval "$ac_compile") 2>conftest.er1
10162  ac_status=$?
10163  grep -v '^ *+' conftest.er1 >conftest.err
10164  rm -f conftest.er1
10165  cat conftest.err >&5
10166  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10167  (exit $ac_status); } && {
10168	 test -z "$ac_c_werror_flag" ||
10169	 test ! -s conftest.err
10170       } && test -s conftest.$ac_objext; then
10171  tcl_cv_struct_dirent64=yes
10172else
10173  echo "$as_me: failed program was:" >&5
10174sed 's/^/| /' conftest.$ac_ext >&5
10175
10176	tcl_cv_struct_dirent64=no
10177fi
10178
10179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10180fi
10181{ echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5
10182echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6; }
10183	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
10184
10185cat >>confdefs.h <<\_ACEOF
10186#define HAVE_STRUCT_DIRENT64 1
10187_ACEOF
10188
10189	fi
10190
10191	{ echo "$as_me:$LINENO: checking for struct stat64" >&5
10192echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6; }
10193if test "${tcl_cv_struct_stat64+set}" = set; then
10194  echo $ECHO_N "(cached) $ECHO_C" >&6
10195else
10196
10197	    cat >conftest.$ac_ext <<_ACEOF
10198/* confdefs.h.  */
10199_ACEOF
10200cat confdefs.h >>conftest.$ac_ext
10201cat >>conftest.$ac_ext <<_ACEOF
10202/* end confdefs.h.  */
10203#include <sys/stat.h>
10204int
10205main ()
10206{
10207struct stat64 p;
10208
10209  ;
10210  return 0;
10211}
10212_ACEOF
10213rm -f conftest.$ac_objext
10214if { (ac_try="$ac_compile"
10215case "(($ac_try" in
10216  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10217  *) ac_try_echo=$ac_try;;
10218esac
10219eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10220  (eval "$ac_compile") 2>conftest.er1
10221  ac_status=$?
10222  grep -v '^ *+' conftest.er1 >conftest.err
10223  rm -f conftest.er1
10224  cat conftest.err >&5
10225  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10226  (exit $ac_status); } && {
10227	 test -z "$ac_c_werror_flag" ||
10228	 test ! -s conftest.err
10229       } && test -s conftest.$ac_objext; then
10230  tcl_cv_struct_stat64=yes
10231else
10232  echo "$as_me: failed program was:" >&5
10233sed 's/^/| /' conftest.$ac_ext >&5
10234
10235	tcl_cv_struct_stat64=no
10236fi
10237
10238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10239fi
10240{ echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5
10241echo "${ECHO_T}$tcl_cv_struct_stat64" >&6; }
10242	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
10243
10244cat >>confdefs.h <<\_ACEOF
10245#define HAVE_STRUCT_STAT64 1
10246_ACEOF
10247
10248	fi
10249
10250
10251
10252for ac_func in open64 lseek64
10253do
10254as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10255{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10256echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10257if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
10258  echo $ECHO_N "(cached) $ECHO_C" >&6
10259else
10260  cat >conftest.$ac_ext <<_ACEOF
10261/* confdefs.h.  */
10262_ACEOF
10263cat confdefs.h >>conftest.$ac_ext
10264cat >>conftest.$ac_ext <<_ACEOF
10265/* end confdefs.h.  */
10266/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10267   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10268#define $ac_func innocuous_$ac_func
10269
10270/* System header to define __stub macros and hopefully few prototypes,
10271    which can conflict with char $ac_func (); below.
10272    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10273    <limits.h> exists even on freestanding compilers.  */
10274
10275#ifdef __STDC__
10276# include <limits.h>
10277#else
10278# include <assert.h>
10279#endif
10280
10281#undef $ac_func
10282
10283/* Override any GCC internal prototype to avoid an error.
10284   Use char because int might match the return type of a GCC
10285   builtin and then its argument prototype would still apply.  */
10286#ifdef __cplusplus
10287extern "C"
10288#endif
10289char $ac_func ();
10290/* The GNU C library defines this for functions which it implements
10291    to always fail with ENOSYS.  Some functions are actually named
10292    something starting with __ and the normal name is an alias.  */
10293#if defined __stub_$ac_func || defined __stub___$ac_func
10294choke me
10295#endif
10296
10297int
10298main ()
10299{
10300return $ac_func ();
10301  ;
10302  return 0;
10303}
10304_ACEOF
10305rm -f conftest.$ac_objext conftest$ac_exeext
10306if { (ac_try="$ac_link"
10307case "(($ac_try" in
10308  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10309  *) ac_try_echo=$ac_try;;
10310esac
10311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10312  (eval "$ac_link") 2>conftest.er1
10313  ac_status=$?
10314  grep -v '^ *+' conftest.er1 >conftest.err
10315  rm -f conftest.er1
10316  cat conftest.err >&5
10317  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10318  (exit $ac_status); } && {
10319	 test -z "$ac_c_werror_flag" ||
10320	 test ! -s conftest.err
10321       } && test -s conftest$ac_exeext &&
10322       $as_test_x conftest$ac_exeext; then
10323  eval "$as_ac_var=yes"
10324else
10325  echo "$as_me: failed program was:" >&5
10326sed 's/^/| /' conftest.$ac_ext >&5
10327
10328	eval "$as_ac_var=no"
10329fi
10330
10331rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10332      conftest$ac_exeext conftest.$ac_ext
10333fi
10334ac_res=`eval echo '${'$as_ac_var'}'`
10335	       { echo "$as_me:$LINENO: result: $ac_res" >&5
10336echo "${ECHO_T}$ac_res" >&6; }
10337if test `eval echo '${'$as_ac_var'}'` = yes; then
10338  cat >>confdefs.h <<_ACEOF
10339#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10340_ACEOF
10341
10342fi
10343done
10344
10345	{ echo "$as_me:$LINENO: checking for off64_t" >&5
10346echo $ECHO_N "checking for off64_t... $ECHO_C" >&6; }
10347	if test "${tcl_cv_type_off64_t+set}" = set; then
10348  echo $ECHO_N "(cached) $ECHO_C" >&6
10349else
10350
10351	    cat >conftest.$ac_ext <<_ACEOF
10352/* confdefs.h.  */
10353_ACEOF
10354cat confdefs.h >>conftest.$ac_ext
10355cat >>conftest.$ac_ext <<_ACEOF
10356/* end confdefs.h.  */
10357#include <sys/types.h>
10358int
10359main ()
10360{
10361off64_t offset;
10362
10363  ;
10364  return 0;
10365}
10366_ACEOF
10367rm -f conftest.$ac_objext
10368if { (ac_try="$ac_compile"
10369case "(($ac_try" in
10370  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10371  *) ac_try_echo=$ac_try;;
10372esac
10373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10374  (eval "$ac_compile") 2>conftest.er1
10375  ac_status=$?
10376  grep -v '^ *+' conftest.er1 >conftest.err
10377  rm -f conftest.er1
10378  cat conftest.err >&5
10379  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10380  (exit $ac_status); } && {
10381	 test -z "$ac_c_werror_flag" ||
10382	 test ! -s conftest.err
10383       } && test -s conftest.$ac_objext; then
10384  tcl_cv_type_off64_t=yes
10385else
10386  echo "$as_me: failed program was:" >&5
10387sed 's/^/| /' conftest.$ac_ext >&5
10388
10389	tcl_cv_type_off64_t=no
10390fi
10391
10392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10393fi
10394
10395			if test "x${tcl_cv_type_off64_t}" = "xyes" && \
10396	        test "x${ac_cv_func_lseek64}" = "xyes" && \
10397	        test "x${ac_cv_func_open64}" = "xyes" ; then
10398
10399cat >>confdefs.h <<\_ACEOF
10400#define HAVE_TYPE_OFF64_T 1
10401_ACEOF
10402
10403	    { echo "$as_me:$LINENO: result: yes" >&5
10404echo "${ECHO_T}yes" >&6; }
10405	else
10406	    { echo "$as_me:$LINENO: result: no" >&5
10407echo "${ECHO_T}no" >&6; }
10408	fi
10409    fi
10410
10411
10412
10413#--------------------------------------------------------------------
10414#	Set audio related variables for the supported systems
10415#--------------------------------------------------------------------
10416
10417case $system in
10418    BSD/OS-4.*)
10419
10420    PKG_CFLAGS="$PKG_CFLAGS -DOSS"
10421
10422
10423
10424    vars="-lossaudio"
10425    for i in $vars; do
10426	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
10427	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
10428	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
10429	fi
10430	PKG_LIBS="$PKG_LIBS $i"
10431    done
10432
10433
10434
10435    vars="jkAudIO_oss.c"
10436    for i in $vars; do
10437	case $i in
10438	    \$*)
10439		# allow $-var names
10440		PKG_SOURCES="$PKG_SOURCES $i"
10441		PKG_OBJECTS="$PKG_OBJECTS $i"
10442		;;
10443	    *)
10444		# check for existence - allows for generic/win/unix VPATH
10445		# To add more dirs here (like 'src'), you have to update VPATH
10446		# in Makefile.in as well
10447		if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
10448		    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
10449		    -a ! -f "${srcdir}/macosx/$i" \
10450		    ; then
10451		    { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
10452echo "$as_me: error: could not find source file '$i'" >&2;}
10453   { (exit 1); exit 1; }; }
10454		fi
10455		PKG_SOURCES="$PKG_SOURCES $i"
10456		# this assumes it is in a VPATH dir
10457		i=`basename $i`
10458		# handle user calling this before or after TEA_SETUP_COMPILER
10459		if test x"${OBJEXT}" != x ; then
10460		    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
10461		else
10462		    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
10463		fi
10464		PKG_OBJECTS="$PKG_OBJECTS $j"
10465		;;
10466	esac
10467    done
10468
10469
10470
10471        ;;
10472    HP-UX-*.1*)
10473
10474    vars="-I/opt/audio/include"
10475    for i in $vars; do
10476	PKG_INCLUDES="$PKG_INCLUDES $i"
10477    done
10478
10479
10480
10481    PKG_CFLAGS="$PKG_CFLAGS -DHPUX"
10482
10483
10484
10485    vars="-L/opt/audio/lib -lAlib"
10486    for i in $vars; do
10487	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
10488	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
10489	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
10490	fi
10491	PKG_LIBS="$PKG_LIBS $i"
10492    done
10493
10494
10495
10496    vars="jkAudIO_hp.c"
10497    for i in $vars; do
10498	case $i in
10499	    \$*)
10500		# allow $-var names
10501		PKG_SOURCES="$PKG_SOURCES $i"
10502		PKG_OBJECTS="$PKG_OBJECTS $i"
10503		;;
10504	    *)
10505		# check for existence - allows for generic/win/unix VPATH
10506		# To add more dirs here (like 'src'), you have to update VPATH
10507		# in Makefile.in as well
10508		if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
10509		    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
10510		    -a ! -f "${srcdir}/macosx/$i" \
10511		    ; then
10512		    { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
10513echo "$as_me: error: could not find source file '$i'" >&2;}
10514   { (exit 1); exit 1; }; }
10515		fi
10516		PKG_SOURCES="$PKG_SOURCES $i"
10517		# this assumes it is in a VPATH dir
10518		i=`basename $i`
10519		# handle user calling this before or after TEA_SETUP_COMPILER
10520		if test x"${OBJEXT}" != x ; then
10521		    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
10522		else
10523		    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
10524		fi
10525		PKG_OBJECTS="$PKG_OBJECTS $j"
10526		;;
10527	esac
10528    done
10529
10530
10531
10532	;;
10533    IRIX*)
10534
10535    PKG_CFLAGS="$PKG_CFLAGS -DIRIX"
10536
10537
10538
10539    vars="-laudio"
10540    for i in $vars; do
10541	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
10542	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
10543	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
10544	fi
10545	PKG_LIBS="$PKG_LIBS $i"
10546    done
10547
10548
10549
10550    vars="jkAudIO_sgi.c"
10551    for i in $vars; do
10552	case $i in
10553	    \$*)
10554		# allow $-var names
10555		PKG_SOURCES="$PKG_SOURCES $i"
10556		PKG_OBJECTS="$PKG_OBJECTS $i"
10557		;;
10558	    *)
10559		# check for existence - allows for generic/win/unix VPATH
10560		# To add more dirs here (like 'src'), you have to update VPATH
10561		# in Makefile.in as well
10562		if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
10563		    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
10564		    -a ! -f "${srcdir}/macosx/$i" \
10565		    ; then
10566		    { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
10567echo "$as_me: error: could not find source file '$i'" >&2;}
10568   { (exit 1); exit 1; }; }
10569		fi
10570		PKG_SOURCES="$PKG_SOURCES $i"
10571		# this assumes it is in a VPATH dir
10572		i=`basename $i`
10573		# handle user calling this before or after TEA_SETUP_COMPILER
10574		if test x"${OBJEXT}" != x ; then
10575		    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
10576		else
10577		    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
10578		fi
10579		PKG_OBJECTS="$PKG_OBJECTS $j"
10580		;;
10581	esac
10582    done
10583
10584
10585
10586	;;
10587    IRIX64-6.*)
10588
10589    PKG_CFLAGS="$PKG_CFLAGS -DIRIX"
10590
10591
10592
10593    vars="-laudio"
10594    for i in $vars; do
10595	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
10596	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
10597	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
10598	fi
10599	PKG_LIBS="$PKG_LIBS $i"
10600    done
10601
10602
10603
10604    vars="jkAudIO_sgi.c"
10605    for i in $vars; do
10606	case $i in
10607	    \$*)
10608		# allow $-var names
10609		PKG_SOURCES="$PKG_SOURCES $i"
10610		PKG_OBJECTS="$PKG_OBJECTS $i"
10611		;;
10612	    *)
10613		# check for existence - allows for generic/win/unix VPATH
10614		# To add more dirs here (like 'src'), you have to update VPATH
10615		# in Makefile.in as well
10616		if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
10617		    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
10618		    -a ! -f "${srcdir}/macosx/$i" \
10619		    ; then
10620		    { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
10621echo "$as_me: error: could not find source file '$i'" >&2;}
10622   { (exit 1); exit 1; }; }
10623		fi
10624		PKG_SOURCES="$PKG_SOURCES $i"
10625		# this assumes it is in a VPATH dir
10626		i=`basename $i`
10627		# handle user calling this before or after TEA_SETUP_COMPILER
10628		if test x"${OBJEXT}" != x ; then
10629		    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
10630		else
10631		    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
10632		fi
10633		PKG_OBJECTS="$PKG_OBJECTS $j"
10634		;;
10635	esac
10636    done
10637
10638
10639
10640	;;
10641    Linux*)
10642	{ echo "$as_me:$LINENO: checking sound driver" >&5
10643echo $ECHO_N "checking sound driver... $ECHO_C" >&6; }
10644	# Check whether --enable-alsa was given.
10645if test "${enable_alsa+set}" = set; then
10646  enableval=$enable_alsa;
10647else
10648  enableval="no"
10649fi
10650
10651	if test "$enableval" != "no"; then
10652	    { echo "$as_me:$LINENO: result: will use ALSA" >&5
10653echo "${ECHO_T}will use ALSA" >&6; }
10654
10655    PKG_CFLAGS="$PKG_CFLAGS -DALSA"
10656
10657
10658
10659    vars="-lasound"
10660    for i in $vars; do
10661	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
10662	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
10663	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
10664	fi
10665	PKG_LIBS="$PKG_LIBS $i"
10666    done
10667
10668
10669
10670    vars="jkAudIO_alsa.c"
10671    for i in $vars; do
10672	case $i in
10673	    \$*)
10674		# allow $-var names
10675		PKG_SOURCES="$PKG_SOURCES $i"
10676		PKG_OBJECTS="$PKG_OBJECTS $i"
10677		;;
10678	    *)
10679		# check for existence - allows for generic/win/unix VPATH
10680		# To add more dirs here (like 'src'), you have to update VPATH
10681		# in Makefile.in as well
10682		if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
10683		    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
10684		    -a ! -f "${srcdir}/macosx/$i" \
10685		    ; then
10686		    { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
10687echo "$as_me: error: could not find source file '$i'" >&2;}
10688   { (exit 1); exit 1; }; }
10689		fi
10690		PKG_SOURCES="$PKG_SOURCES $i"
10691		# this assumes it is in a VPATH dir
10692		i=`basename $i`
10693		# handle user calling this before or after TEA_SETUP_COMPILER
10694		if test x"${OBJEXT}" != x ; then
10695		    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
10696		else
10697		    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
10698		fi
10699		PKG_OBJECTS="$PKG_OBJECTS $j"
10700		;;
10701	esac
10702    done
10703
10704
10705
10706	else
10707	    { echo "$as_me:$LINENO: result: will use OSS" >&5
10708echo "${ECHO_T}will use OSS" >&6; }
10709
10710    PKG_CFLAGS="$PKG_CFLAGS -DOSS"
10711
10712
10713
10714    vars="jkAudIO_oss.c"
10715    for i in $vars; do
10716	case $i in
10717	    \$*)
10718		# allow $-var names
10719		PKG_SOURCES="$PKG_SOURCES $i"
10720		PKG_OBJECTS="$PKG_OBJECTS $i"
10721		;;
10722	    *)
10723		# check for existence - allows for generic/win/unix VPATH
10724		# To add more dirs here (like 'src'), you have to update VPATH
10725		# in Makefile.in as well
10726		if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
10727		    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
10728		    -a ! -f "${srcdir}/macosx/$i" \
10729		    ; then
10730		    { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
10731echo "$as_me: error: could not find source file '$i'" >&2;}
10732   { (exit 1); exit 1; }; }
10733		fi
10734		PKG_SOURCES="$PKG_SOURCES $i"
10735		# this assumes it is in a VPATH dir
10736		i=`basename $i`
10737		# handle user calling this before or after TEA_SETUP_COMPILER
10738		if test x"${OBJEXT}" != x ; then
10739		    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
10740		else
10741		    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
10742		fi
10743		PKG_OBJECTS="$PKG_OBJECTS $j"
10744		;;
10745	esac
10746    done
10747
10748
10749
10750	fi
10751	;;
10752    NetBSD*|OpenBSD-*)
10753
10754    PKG_CFLAGS="$PKG_CFLAGS -DOSS"
10755
10756
10757
10758    vars="-lossaudio"
10759    for i in $vars; do
10760	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
10761	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
10762	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
10763	fi
10764	PKG_LIBS="$PKG_LIBS $i"
10765    done
10766
10767
10768
10769    vars="jkAudIO_oss.c"
10770    for i in $vars; do
10771	case $i in
10772	    \$*)
10773		# allow $-var names
10774		PKG_SOURCES="$PKG_SOURCES $i"
10775		PKG_OBJECTS="$PKG_OBJECTS $i"
10776		;;
10777	    *)
10778		# check for existence - allows for generic/win/unix VPATH
10779		# To add more dirs here (like 'src'), you have to update VPATH
10780		# in Makefile.in as well
10781		if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
10782		    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
10783		    -a ! -f "${srcdir}/macosx/$i" \
10784		    ; then
10785		    { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
10786echo "$as_me: error: could not find source file '$i'" >&2;}
10787   { (exit 1); exit 1; }; }
10788		fi
10789		PKG_SOURCES="$PKG_SOURCES $i"
10790		# this assumes it is in a VPATH dir
10791		i=`basename $i`
10792		# handle user calling this before or after TEA_SETUP_COMPILER
10793		if test x"${OBJEXT}" != x ; then
10794		    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
10795		else
10796		    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
10797		fi
10798		PKG_OBJECTS="$PKG_OBJECTS $j"
10799		;;
10800	esac
10801    done
10802
10803
10804
10805        ;;
10806    FreeBSD-*)
10807
10808    PKG_CFLAGS="$PKG_CFLAGS -DOSS"
10809
10810
10811
10812    vars="jkAudIO_oss.c"
10813    for i in $vars; do
10814	case $i in
10815	    \$*)
10816		# allow $-var names
10817		PKG_SOURCES="$PKG_SOURCES $i"
10818		PKG_OBJECTS="$PKG_OBJECTS $i"
10819		;;
10820	    *)
10821		# check for existence - allows for generic/win/unix VPATH
10822		# To add more dirs here (like 'src'), you have to update VPATH
10823		# in Makefile.in as well
10824		if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
10825		    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
10826		    -a ! -f "${srcdir}/macosx/$i" \
10827		    ; then
10828		    { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
10829echo "$as_me: error: could not find source file '$i'" >&2;}
10830   { (exit 1); exit 1; }; }
10831		fi
10832		PKG_SOURCES="$PKG_SOURCES $i"
10833		# this assumes it is in a VPATH dir
10834		i=`basename $i`
10835		# handle user calling this before or after TEA_SETUP_COMPILER
10836		if test x"${OBJEXT}" != x ; then
10837		    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
10838		else
10839		    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
10840		fi
10841		PKG_OBJECTS="$PKG_OBJECTS $j"
10842		;;
10843	esac
10844    done
10845
10846
10847
10848        ;;
10849    SunOS*)
10850
10851    PKG_CFLAGS="$PKG_CFLAGS -DSolaris"
10852
10853
10854
10855    vars="jkAudIO_sun.c"
10856    for i in $vars; do
10857	case $i in
10858	    \$*)
10859		# allow $-var names
10860		PKG_SOURCES="$PKG_SOURCES $i"
10861		PKG_OBJECTS="$PKG_OBJECTS $i"
10862		;;
10863	    *)
10864		# check for existence - allows for generic/win/unix VPATH
10865		# To add more dirs here (like 'src'), you have to update VPATH
10866		# in Makefile.in as well
10867		if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
10868		    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
10869		    -a ! -f "${srcdir}/macosx/$i" \
10870		    ; then
10871		    { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
10872echo "$as_me: error: could not find source file '$i'" >&2;}
10873   { (exit 1); exit 1; }; }
10874		fi
10875		PKG_SOURCES="$PKG_SOURCES $i"
10876		# this assumes it is in a VPATH dir
10877		i=`basename $i`
10878		# handle user calling this before or after TEA_SETUP_COMPILER
10879		if test x"${OBJEXT}" != x ; then
10880		    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
10881		else
10882		    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
10883		fi
10884		PKG_OBJECTS="$PKG_OBJECTS $j"
10885		;;
10886	esac
10887    done
10888
10889
10890
10891	;;
10892    Darwin-*)
10893
10894    PKG_CFLAGS="$PKG_CFLAGS -DOS_X_CORE_AUDIO -DMAC_OSX_TCL -DMAC_OSX_TK"
10895
10896
10897
10898    vars="-framework CoreAudio"
10899    for i in $vars; do
10900	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
10901	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
10902	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
10903	fi
10904	PKG_LIBS="$PKG_LIBS $i"
10905    done
10906
10907
10908
10909    vars="jkAudIO_osx.c"
10910    for i in $vars; do
10911	case $i in
10912	    \$*)
10913		# allow $-var names
10914		PKG_SOURCES="$PKG_SOURCES $i"
10915		PKG_OBJECTS="$PKG_OBJECTS $i"
10916		;;
10917	    *)
10918		# check for existence - allows for generic/win/unix VPATH
10919		# To add more dirs here (like 'src'), you have to update VPATH
10920		# in Makefile.in as well
10921		if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
10922		    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
10923		    -a ! -f "${srcdir}/macosx/$i" \
10924		    ; then
10925		    { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
10926echo "$as_me: error: could not find source file '$i'" >&2;}
10927   { (exit 1); exit 1; }; }
10928		fi
10929		PKG_SOURCES="$PKG_SOURCES $i"
10930		# this assumes it is in a VPATH dir
10931		i=`basename $i`
10932		# handle user calling this before or after TEA_SETUP_COMPILER
10933		if test x"${OBJEXT}" != x ; then
10934		    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
10935		else
10936		    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
10937		fi
10938		PKG_OBJECTS="$PKG_OBJECTS $j"
10939		;;
10940	esac
10941    done
10942
10943
10944
10945        ;;
10946    *)
10947
10948    PKG_CFLAGS="$PKG_CFLAGS -DOTHER"
10949
10950
10951
10952    vars="jkAudIO_skel.c"
10953    for i in $vars; do
10954	case $i in
10955	    \$*)
10956		# allow $-var names
10957		PKG_SOURCES="$PKG_SOURCES $i"
10958		PKG_OBJECTS="$PKG_OBJECTS $i"
10959		;;
10960	    *)
10961		# check for existence - allows for generic/win/unix VPATH
10962		# To add more dirs here (like 'src'), you have to update VPATH
10963		# in Makefile.in as well
10964		if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
10965		    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
10966		    -a ! -f "${srcdir}/macosx/$i" \
10967		    ; then
10968		    { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
10969echo "$as_me: error: could not find source file '$i'" >&2;}
10970   { (exit 1); exit 1; }; }
10971		fi
10972		PKG_SOURCES="$PKG_SOURCES $i"
10973		# this assumes it is in a VPATH dir
10974		i=`basename $i`
10975		# handle user calling this before or after TEA_SETUP_COMPILER
10976		if test x"${OBJEXT}" != x ; then
10977		    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
10978		else
10979		    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
10980		fi
10981		PKG_OBJECTS="$PKG_OBJECTS $j"
10982		;;
10983	esac
10984    done
10985
10986
10987
10988	;;
10989esac
10990
10991#--------------------------------------------------------------------
10992# Set the default compiler switches based on the --enable-symbols option.
10993#--------------------------------------------------------------------
10994
10995
10996
10997    { echo "$as_me:$LINENO: checking for build with symbols" >&5
10998echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6; }
10999    # Check whether --enable-symbols was given.
11000if test "${enable_symbols+set}" = set; then
11001  enableval=$enable_symbols; tcl_ok=$enableval
11002else
11003  tcl_ok=no
11004fi
11005
11006    DBGX=""
11007    if test "$tcl_ok" = "no"; then
11008	CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}"
11009	LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
11010	{ echo "$as_me:$LINENO: result: no" >&5
11011echo "${ECHO_T}no" >&6; }
11012    else
11013	CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
11014	LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
11015	if test "$tcl_ok" = "yes"; then
11016	    { echo "$as_me:$LINENO: result: yes (standard debugging)" >&5
11017echo "${ECHO_T}yes (standard debugging)" >&6; }
11018	fi
11019    fi
11020    # TEA specific:
11021    if test "${TEA_PLATFORM}" != "windows" ; then
11022	LDFLAGS_DEFAULT="${LDFLAGS}"
11023    fi
11024
11025
11026
11027
11028    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
11029
11030cat >>confdefs.h <<\_ACEOF
11031#define TCL_MEM_DEBUG 1
11032_ACEOF
11033
11034    fi
11035
11036    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
11037	if test "$tcl_ok" = "all"; then
11038	    { echo "$as_me:$LINENO: result: enabled symbols mem debugging" >&5
11039echo "${ECHO_T}enabled symbols mem debugging" >&6; }
11040	else
11041	    { echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5
11042echo "${ECHO_T}enabled $tcl_ok debugging" >&6; }
11043	fi
11044    fi
11045
11046
11047#--------------------------------------------------------------------
11048# Everyone should be linking against the Tcl stub library.  If you
11049# can't for some reason, remove this definition.  If you aren't using
11050# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
11051# link against the non-stubbed Tcl library.  Add Tk too if necessary.
11052#--------------------------------------------------------------------
11053
11054
11055cat >>confdefs.h <<\_ACEOF
11056#define USE_TCL_STUBS 1
11057_ACEOF
11058
11059
11060cat >>confdefs.h <<\_ACEOF
11061#define USE_TK_STUBS 1
11062_ACEOF
11063
11064
11065#--------------------------------------------------------------------
11066# This macro generates a line to use when building a library.  It
11067# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
11068# and TEA_LOAD_TCLCONFIG macros above.
11069#--------------------------------------------------------------------
11070
11071
11072    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
11073	MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(PKG_OBJECTS)"
11074	MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\$@ \$(PKG_OBJECTS)"
11075	cat >conftest.$ac_ext <<_ACEOF
11076/* confdefs.h.  */
11077_ACEOF
11078cat confdefs.h >>conftest.$ac_ext
11079cat >>conftest.$ac_ext <<_ACEOF
11080/* end confdefs.h.  */
11081
11082#if defined(_MSC_VER) && _MSC_VER >= 1400
11083print("manifest needed")
11084#endif
11085
11086_ACEOF
11087if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11088  $EGREP "manifest needed" >/dev/null 2>&1; then
11089
11090	# Could do a CHECK_PROG for mt, but should always be with MSVC8+
11091	VC_MANIFEST_EMBED_DLL="mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;2"
11092	VC_MANIFEST_EMBED_EXE="mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;1"
11093	MAKE_SHARED_LIB="${MAKE_SHARED_LIB} ; ${VC_MANIFEST_EMBED_DLL}"
11094
11095    CLEANFILES="$CLEANFILES *.manifest"
11096
11097
11098fi
11099rm -f -r conftest*
11100
11101	MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(PKG_STUB_OBJECTS)"
11102    else
11103	MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(PKG_OBJECTS)"
11104	MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
11105	MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(PKG_STUB_OBJECTS)"
11106    fi
11107
11108    if test "${SHARED_BUILD}" = "1" ; then
11109	MAKE_LIB="${MAKE_SHARED_LIB} "
11110    else
11111	MAKE_LIB="${MAKE_STATIC_LIB} "
11112    fi
11113
11114    #--------------------------------------------------------------------
11115    # Shared libraries and static libraries have different names.
11116    # Use the double eval to make sure any variables in the suffix is
11117    # substituted. (@@@ Might not be necessary anymore)
11118    #--------------------------------------------------------------------
11119
11120    if test "${TEA_PLATFORM}" = "windows" ; then
11121	if test "${SHARED_BUILD}" = "1" ; then
11122	    # We force the unresolved linking of symbols that are really in
11123	    # the private libraries of Tcl and Tk.
11124	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
11125	    if test x"${TK_BIN_DIR}" != x ; then
11126		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
11127	    fi
11128	    eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
11129	else
11130	    eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
11131	fi
11132	# Some packages build their own stubs libraries
11133	eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
11134	if test "$GCC" = "yes"; then
11135	    PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
11136	fi
11137	# These aren't needed on Windows (either MSVC or gcc)
11138	RANLIB=:
11139	RANLIB_STUB=:
11140    else
11141	RANLIB_STUB="${RANLIB}"
11142	if test "${SHARED_BUILD}" = "1" ; then
11143	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
11144	    if test x"${TK_BIN_DIR}" != x ; then
11145		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
11146	    fi
11147	    eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
11148	    RANLIB=:
11149	else
11150	    eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
11151	fi
11152	# Some packages build their own stubs libraries
11153	eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
11154    fi
11155
11156    # These are escaped so that only CFLAGS is picked up at configure time.
11157    # The other values will be substituted at make time.
11158    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
11159    if test "${SHARED_BUILD}" = "1" ; then
11160	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
11161    fi
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172#--------------------------------------------------------------------
11173# Determine the name of the tclsh and/or wish executables in the
11174# Tcl and Tk build directories or the location they were installed
11175# into. These paths are used to support running test cases only,
11176# the Makefile should not be making use of these paths to generate
11177# a pkgIndex.tcl file or anything else at extension build time.
11178#--------------------------------------------------------------------
11179
11180
11181    { echo "$as_me:$LINENO: checking for tclsh" >&5
11182echo $ECHO_N "checking for tclsh... $ECHO_C" >&6; }
11183    if test -f "${TCL_BIN_DIR}/Makefile" ; then
11184        # tclConfig.sh is in Tcl build directory
11185        if test "${TEA_PLATFORM}" = "windows"; then
11186            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
11187        else
11188            TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
11189        fi
11190    else
11191        # tclConfig.sh is in install location
11192        if test "${TEA_PLATFORM}" = "windows"; then
11193            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
11194        else
11195            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}"
11196        fi
11197        list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
11198              `ls -d ${TCL_BIN_DIR}/..     2>/dev/null` \
11199              `ls -d ${TCL_PREFIX}/bin     2>/dev/null`"
11200        for i in $list ; do
11201            if test -f "$i/${TCLSH_PROG}" ; then
11202                REAL_TCL_BIN_DIR="`cd "$i"; pwd`/"
11203                break
11204            fi
11205        done
11206        TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}"
11207    fi
11208    { echo "$as_me:$LINENO: result: ${TCLSH_PROG}" >&5
11209echo "${ECHO_T}${TCLSH_PROG}" >&6; }
11210
11211
11212#TEA_PROG_WISH
11213
11214#--------------------------------------------------------------------
11215# Finally, substitute all of the various values into the Makefile.
11216# You may alternatively have a special pkgIndex.tcl.in or other files
11217# which require substituting th AC variables in.  Include these here.
11218#--------------------------------------------------------------------
11219
11220ac_config_files="$ac_config_files Makefile pkgIndex.tcl"
11221
11222cat >confcache <<\_ACEOF
11223# This file is a shell script that caches the results of configure
11224# tests run on this system so they can be shared between configure
11225# scripts and configure runs, see configure's option --config-cache.
11226# It is not useful on other systems.  If it contains results you don't
11227# want to keep, you may remove or edit it.
11228#
11229# config.status only pays attention to the cache file if you give it
11230# the --recheck option to rerun configure.
11231#
11232# `ac_cv_env_foo' variables (set or unset) will be overridden when
11233# loading this file, other *unset* `ac_cv_foo' will be assigned the
11234# following values.
11235
11236_ACEOF
11237
11238# The following way of writing the cache mishandles newlines in values,
11239# but we know of no workaround that is simple, portable, and efficient.
11240# So, we kill variables containing newlines.
11241# Ultrix sh set writes to stderr and can't be redirected directly,
11242# and sets the high bit in the cache file unless we assign to the vars.
11243(
11244  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
11245    eval ac_val=\$$ac_var
11246    case $ac_val in #(
11247    *${as_nl}*)
11248      case $ac_var in #(
11249      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
11250echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
11251      esac
11252      case $ac_var in #(
11253      _ | IFS | as_nl) ;; #(
11254      *) $as_unset $ac_var ;;
11255      esac ;;
11256    esac
11257  done
11258
11259  (set) 2>&1 |
11260    case $as_nl`(ac_space=' '; set) 2>&1` in #(
11261    *${as_nl}ac_space=\ *)
11262      # `set' does not quote correctly, so add quotes (double-quote
11263      # substitution turns \\\\ into \\, and sed turns \\ into \).
11264      sed -n \
11265	"s/'/'\\\\''/g;
11266	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
11267      ;; #(
11268    *)
11269      # `set' quotes correctly as required by POSIX, so do not add quotes.
11270      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
11271      ;;
11272    esac |
11273    sort
11274) |
11275  sed '
11276     /^ac_cv_env_/b end
11277     t clear
11278     :clear
11279     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
11280     t end
11281     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
11282     :end' >>confcache
11283if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
11284  if test -w "$cache_file"; then
11285    test "x$cache_file" != "x/dev/null" &&
11286      { echo "$as_me:$LINENO: updating cache $cache_file" >&5
11287echo "$as_me: updating cache $cache_file" >&6;}
11288    cat confcache >$cache_file
11289  else
11290    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
11291echo "$as_me: not updating unwritable cache $cache_file" >&6;}
11292  fi
11293fi
11294rm -f confcache
11295
11296test "x$prefix" = xNONE && prefix=$ac_default_prefix
11297# Let make expand exec_prefix.
11298test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11299
11300# Transform confdefs.h into DEFS.
11301# Protect against shell expansion while executing Makefile rules.
11302# Protect against Makefile macro expansion.
11303#
11304# If the first sed substitution is executed (which looks for macros that
11305# take arguments), then branch to the quote section.  Otherwise,
11306# look for a macro that doesn't take arguments.
11307ac_script='
11308t clear
11309:clear
11310s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
11311t quote
11312s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
11313t quote
11314b any
11315:quote
11316s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
11317s/\[/\\&/g
11318s/\]/\\&/g
11319s/\$/$$/g
11320H
11321:any
11322${
11323	g
11324	s/^\n//
11325	s/\n/ /g
11326	p
11327}
11328'
11329DEFS=`sed -n "$ac_script" confdefs.h`
11330
11331
11332ac_libobjs=
11333ac_ltlibobjs=
11334for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
11335  # 1. Remove the extension, and $U if already installed.
11336  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
11337  ac_i=`echo "$ac_i" | sed "$ac_script"`
11338  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
11339  #    will be set to the directory where LIBOBJS objects are built.
11340  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
11341  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
11342done
11343LIBOBJS=$ac_libobjs
11344
11345LTLIBOBJS=$ac_ltlibobjs
11346
11347
11348CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""
11349
11350: ${CONFIG_STATUS=./config.status}
11351ac_clean_files_save=$ac_clean_files
11352ac_clean_files="$ac_clean_files $CONFIG_STATUS"
11353{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
11354echo "$as_me: creating $CONFIG_STATUS" >&6;}
11355cat >$CONFIG_STATUS <<_ACEOF
11356#! $SHELL
11357# Generated by $as_me.
11358# Run this file to recreate the current configuration.
11359# Compiler output produced by configure, useful for debugging
11360# configure, is in config.log if it exists.
11361
11362debug=false
11363ac_cs_recheck=false
11364ac_cs_silent=false
11365SHELL=\${CONFIG_SHELL-$SHELL}
11366_ACEOF
11367
11368cat >>$CONFIG_STATUS <<\_ACEOF
11369## --------------------- ##
11370## M4sh Initialization.  ##
11371## --------------------- ##
11372
11373# Be more Bourne compatible
11374DUALCASE=1; export DUALCASE # for MKS sh
11375if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
11376  emulate sh
11377  NULLCMD=:
11378  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
11379  # is contrary to our usage.  Disable this feature.
11380  alias -g '${1+"$@"}'='"$@"'
11381  setopt NO_GLOB_SUBST
11382else
11383  case `(set -o) 2>/dev/null` in
11384  *posix*) set -o posix ;;
11385esac
11386
11387fi
11388
11389
11390
11391
11392# PATH needs CR
11393# Avoid depending upon Character Ranges.
11394as_cr_letters='abcdefghijklmnopqrstuvwxyz'
11395as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
11396as_cr_Letters=$as_cr_letters$as_cr_LETTERS
11397as_cr_digits='0123456789'
11398as_cr_alnum=$as_cr_Letters$as_cr_digits
11399
11400# The user is always right.
11401if test "${PATH_SEPARATOR+set}" != set; then
11402  echo "#! /bin/sh" >conf$$.sh
11403  echo  "exit 0"   >>conf$$.sh
11404  chmod +x conf$$.sh
11405  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
11406    PATH_SEPARATOR=';'
11407  else
11408    PATH_SEPARATOR=:
11409  fi
11410  rm -f conf$$.sh
11411fi
11412
11413# Support unset when possible.
11414if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
11415  as_unset=unset
11416else
11417  as_unset=false
11418fi
11419
11420
11421# IFS
11422# We need space, tab and new line, in precisely that order.  Quoting is
11423# there to prevent editors from complaining about space-tab.
11424# (If _AS_PATH_WALK were called with IFS unset, it would disable word
11425# splitting by setting IFS to empty value.)
11426as_nl='
11427'
11428IFS=" ""	$as_nl"
11429
11430# Find who we are.  Look in the path if we contain no directory separator.
11431case $0 in
11432  *[\\/]* ) as_myself=$0 ;;
11433  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11434for as_dir in $PATH
11435do
11436  IFS=$as_save_IFS
11437  test -z "$as_dir" && as_dir=.
11438  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
11439done
11440IFS=$as_save_IFS
11441
11442     ;;
11443esac
11444# We did not find ourselves, most probably we were run as `sh COMMAND'
11445# in which case we are not to be found in the path.
11446if test "x$as_myself" = x; then
11447  as_myself=$0
11448fi
11449if test ! -f "$as_myself"; then
11450  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
11451  { (exit 1); exit 1; }
11452fi
11453
11454# Work around bugs in pre-3.0 UWIN ksh.
11455for as_var in ENV MAIL MAILPATH
11456do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
11457done
11458PS1='$ '
11459PS2='> '
11460PS4='+ '
11461
11462# NLS nuisances.
11463for as_var in \
11464  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
11465  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
11466  LC_TELEPHONE LC_TIME
11467do
11468  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
11469    eval $as_var=C; export $as_var
11470  else
11471    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
11472  fi
11473done
11474
11475# Required to use basename.
11476if expr a : '\(a\)' >/dev/null 2>&1 &&
11477   test "X`expr 00001 : '.*\(...\)'`" = X001; then
11478  as_expr=expr
11479else
11480  as_expr=false
11481fi
11482
11483if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
11484  as_basename=basename
11485else
11486  as_basename=false
11487fi
11488
11489
11490# Name of the executable.
11491as_me=`$as_basename -- "$0" ||
11492$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
11493	 X"$0" : 'X\(//\)$' \| \
11494	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
11495echo X/"$0" |
11496    sed '/^.*\/\([^/][^/]*\)\/*$/{
11497	    s//\1/
11498	    q
11499	  }
11500	  /^X\/\(\/\/\)$/{
11501	    s//\1/
11502	    q
11503	  }
11504	  /^X\/\(\/\).*/{
11505	    s//\1/
11506	    q
11507	  }
11508	  s/.*/./; q'`
11509
11510# CDPATH.
11511$as_unset CDPATH
11512
11513
11514
11515  as_lineno_1=$LINENO
11516  as_lineno_2=$LINENO
11517  test "x$as_lineno_1" != "x$as_lineno_2" &&
11518  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
11519
11520  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
11521  # uniformly replaced by the line number.  The first 'sed' inserts a
11522  # line-number line after each line using $LINENO; the second 'sed'
11523  # does the real work.  The second script uses 'N' to pair each
11524  # line-number line with the line containing $LINENO, and appends
11525  # trailing '-' during substitution so that $LINENO is not a special
11526  # case at line end.
11527  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
11528  # scripts with optimization help from Paolo Bonzini.  Blame Lee
11529  # E. McMahon (1931-1989) for sed's syntax.  :-)
11530  sed -n '
11531    p
11532    /[$]LINENO/=
11533  ' <$as_myself |
11534    sed '
11535      s/[$]LINENO.*/&-/
11536      t lineno
11537      b
11538      :lineno
11539      N
11540      :loop
11541      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
11542      t loop
11543      s/-\n.*//
11544    ' >$as_me.lineno &&
11545  chmod +x "$as_me.lineno" ||
11546    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
11547   { (exit 1); exit 1; }; }
11548
11549  # Don't try to exec as it changes $[0], causing all sort of problems
11550  # (the dirname of $[0] is not the place where we might find the
11551  # original and so on.  Autoconf is especially sensitive to this).
11552  . "./$as_me.lineno"
11553  # Exit status is that of the last command.
11554  exit
11555}
11556
11557
11558if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
11559  as_dirname=dirname
11560else
11561  as_dirname=false
11562fi
11563
11564ECHO_C= ECHO_N= ECHO_T=
11565case `echo -n x` in
11566-n*)
11567  case `echo 'x\c'` in
11568  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
11569  *)   ECHO_C='\c';;
11570  esac;;
11571*)
11572  ECHO_N='-n';;
11573esac
11574
11575if expr a : '\(a\)' >/dev/null 2>&1 &&
11576   test "X`expr 00001 : '.*\(...\)'`" = X001; then
11577  as_expr=expr
11578else
11579  as_expr=false
11580fi
11581
11582rm -f conf$$ conf$$.exe conf$$.file
11583if test -d conf$$.dir; then
11584  rm -f conf$$.dir/conf$$.file
11585else
11586  rm -f conf$$.dir
11587  mkdir conf$$.dir
11588fi
11589echo >conf$$.file
11590if ln -s conf$$.file conf$$ 2>/dev/null; then
11591  as_ln_s='ln -s'
11592  # ... but there are two gotchas:
11593  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
11594  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
11595  # In both cases, we have to default to `cp -p'.
11596  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
11597    as_ln_s='cp -p'
11598elif ln conf$$.file conf$$ 2>/dev/null; then
11599  as_ln_s=ln
11600else
11601  as_ln_s='cp -p'
11602fi
11603rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
11604rmdir conf$$.dir 2>/dev/null
11605
11606if mkdir -p . 2>/dev/null; then
11607  as_mkdir_p=:
11608else
11609  test -d ./-p && rmdir ./-p
11610  as_mkdir_p=false
11611fi
11612
11613if test -x / >/dev/null 2>&1; then
11614  as_test_x='test -x'
11615else
11616  if ls -dL / >/dev/null 2>&1; then
11617    as_ls_L_option=L
11618  else
11619    as_ls_L_option=
11620  fi
11621  as_test_x='
11622    eval sh -c '\''
11623      if test -d "$1"; then
11624        test -d "$1/.";
11625      else
11626	case $1 in
11627        -*)set "./$1";;
11628	esac;
11629	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
11630	???[sx]*):;;*)false;;esac;fi
11631    '\'' sh
11632  '
11633fi
11634as_executable_p=$as_test_x
11635
11636# Sed expression to map a string onto a valid CPP name.
11637as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
11638
11639# Sed expression to map a string onto a valid variable name.
11640as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
11641
11642
11643exec 6>&1
11644
11645# Save the log message, to keep $[0] and so on meaningful, and to
11646# report actual input values of CONFIG_FILES etc. instead of their
11647# values after options handling.
11648ac_log="
11649This file was extended by snack $as_me 2.2, which was
11650generated by GNU Autoconf 2.61.  Invocation command line was
11651
11652  CONFIG_FILES    = $CONFIG_FILES
11653  CONFIG_HEADERS  = $CONFIG_HEADERS
11654  CONFIG_LINKS    = $CONFIG_LINKS
11655  CONFIG_COMMANDS = $CONFIG_COMMANDS
11656  $ $0 $@
11657
11658on `(hostname || uname -n) 2>/dev/null | sed 1q`
11659"
11660
11661_ACEOF
11662
11663cat >>$CONFIG_STATUS <<_ACEOF
11664# Files that config.status was made for.
11665config_files="$ac_config_files"
11666
11667_ACEOF
11668
11669cat >>$CONFIG_STATUS <<\_ACEOF
11670ac_cs_usage="\
11671\`$as_me' instantiates files from templates according to the
11672current configuration.
11673
11674Usage: $0 [OPTIONS] [FILE]...
11675
11676  -h, --help       print this help, then exit
11677  -V, --version    print version number and configuration settings, then exit
11678  -q, --quiet      do not print progress messages
11679  -d, --debug      don't remove temporary files
11680      --recheck    update $as_me by reconfiguring in the same conditions
11681  --file=FILE[:TEMPLATE]
11682		   instantiate the configuration file FILE
11683
11684Configuration files:
11685$config_files
11686
11687Report bugs to <bug-autoconf@gnu.org>."
11688
11689_ACEOF
11690cat >>$CONFIG_STATUS <<_ACEOF
11691ac_cs_version="\\
11692snack config.status 2.2
11693configured by $0, generated by GNU Autoconf 2.61,
11694  with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
11695
11696Copyright (C) 2006 Free Software Foundation, Inc.
11697This config.status script is free software; the Free Software Foundation
11698gives unlimited permission to copy, distribute and modify it."
11699
11700ac_pwd='$ac_pwd'
11701srcdir='$srcdir'
11702INSTALL='$INSTALL'
11703_ACEOF
11704
11705cat >>$CONFIG_STATUS <<\_ACEOF
11706# If no file are specified by the user, then we need to provide default
11707# value.  By we need to know if files were specified by the user.
11708ac_need_defaults=:
11709while test $# != 0
11710do
11711  case $1 in
11712  --*=*)
11713    ac_option=`expr "X$1" : 'X\([^=]*\)='`
11714    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
11715    ac_shift=:
11716    ;;
11717  *)
11718    ac_option=$1
11719    ac_optarg=$2
11720    ac_shift=shift
11721    ;;
11722  esac
11723
11724  case $ac_option in
11725  # Handling of the options.
11726  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11727    ac_cs_recheck=: ;;
11728  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
11729    echo "$ac_cs_version"; exit ;;
11730  --debug | --debu | --deb | --de | --d | -d )
11731    debug=: ;;
11732  --file | --fil | --fi | --f )
11733    $ac_shift
11734    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
11735    ac_need_defaults=false;;
11736  --he | --h |  --help | --hel | -h )
11737    echo "$ac_cs_usage"; exit ;;
11738  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
11739  | -silent | --silent | --silen | --sile | --sil | --si | --s)
11740    ac_cs_silent=: ;;
11741
11742  # This is an error.
11743  -*) { echo "$as_me: error: unrecognized option: $1
11744Try \`$0 --help' for more information." >&2
11745   { (exit 1); exit 1; }; } ;;
11746
11747  *) ac_config_targets="$ac_config_targets $1"
11748     ac_need_defaults=false ;;
11749
11750  esac
11751  shift
11752done
11753
11754ac_configure_extra_args=
11755
11756if $ac_cs_silent; then
11757  exec 6>/dev/null
11758  ac_configure_extra_args="$ac_configure_extra_args --silent"
11759fi
11760
11761_ACEOF
11762cat >>$CONFIG_STATUS <<_ACEOF
11763if \$ac_cs_recheck; then
11764  echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
11765  CONFIG_SHELL=$SHELL
11766  export CONFIG_SHELL
11767  exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
11768fi
11769
11770_ACEOF
11771cat >>$CONFIG_STATUS <<\_ACEOF
11772exec 5>>config.log
11773{
11774  echo
11775  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
11776## Running $as_me. ##
11777_ASBOX
11778  echo "$ac_log"
11779} >&5
11780
11781_ACEOF
11782cat >>$CONFIG_STATUS <<_ACEOF
11783_ACEOF
11784
11785cat >>$CONFIG_STATUS <<\_ACEOF
11786
11787# Handling of arguments.
11788for ac_config_target in $ac_config_targets
11789do
11790  case $ac_config_target in
11791    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
11792    "pkgIndex.tcl") CONFIG_FILES="$CONFIG_FILES pkgIndex.tcl" ;;
11793
11794  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
11795echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
11796   { (exit 1); exit 1; }; };;
11797  esac
11798done
11799
11800
11801# If the user did not use the arguments to specify the items to instantiate,
11802# then the envvar interface is used.  Set only those that are not.
11803# We use the long form for the default assignment because of an extremely
11804# bizarre bug on SunOS 4.1.3.
11805if $ac_need_defaults; then
11806  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
11807fi
11808
11809# Have a temporary directory for convenience.  Make it in the build tree
11810# simply because there is no reason against having it here, and in addition,
11811# creating and moving files from /tmp can sometimes cause problems.
11812# Hook for its removal unless debugging.
11813# Note that there is a small window in which the directory will not be cleaned:
11814# after its creation but before its name has been assigned to `$tmp'.
11815$debug ||
11816{
11817  tmp=
11818  trap 'exit_status=$?
11819  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
11820' 0
11821  trap '{ (exit 1); exit 1; }' 1 2 13 15
11822}
11823# Create a (secure) tmp directory for tmp files.
11824
11825{
11826  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
11827  test -n "$tmp" && test -d "$tmp"
11828}  ||
11829{
11830  tmp=./conf$$-$RANDOM
11831  (umask 077 && mkdir "$tmp")
11832} ||
11833{
11834   echo "$me: cannot create a temporary directory in ." >&2
11835   { (exit 1); exit 1; }
11836}
11837
11838#
11839# Set up the sed scripts for CONFIG_FILES section.
11840#
11841
11842# No need to generate the scripts if there are no CONFIG_FILES.
11843# This happens for instance when ./config.status config.h
11844if test -n "$CONFIG_FILES"; then
11845
11846_ACEOF
11847
11848
11849
11850ac_delim='%!_!# '
11851for ac_last_try in false false false false false :; do
11852  cat >conf$$subs.sed <<_ACEOF
11853SHELL!$SHELL$ac_delim
11854PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
11855PACKAGE_NAME!$PACKAGE_NAME$ac_delim
11856PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
11857PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
11858PACKAGE_STRING!$PACKAGE_STRING$ac_delim
11859PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
11860exec_prefix!$exec_prefix$ac_delim
11861prefix!$prefix$ac_delim
11862program_transform_name!$program_transform_name$ac_delim
11863bindir!$bindir$ac_delim
11864sbindir!$sbindir$ac_delim
11865libexecdir!$libexecdir$ac_delim
11866datarootdir!$datarootdir$ac_delim
11867datadir!$datadir$ac_delim
11868sysconfdir!$sysconfdir$ac_delim
11869sharedstatedir!$sharedstatedir$ac_delim
11870localstatedir!$localstatedir$ac_delim
11871includedir!$includedir$ac_delim
11872oldincludedir!$oldincludedir$ac_delim
11873docdir!$docdir$ac_delim
11874infodir!$infodir$ac_delim
11875htmldir!$htmldir$ac_delim
11876dvidir!$dvidir$ac_delim
11877pdfdir!$pdfdir$ac_delim
11878psdir!$psdir$ac_delim
11879libdir!$libdir$ac_delim
11880localedir!$localedir$ac_delim
11881mandir!$mandir$ac_delim
11882DEFS!$DEFS$ac_delim
11883ECHO_C!$ECHO_C$ac_delim
11884ECHO_N!$ECHO_N$ac_delim
11885ECHO_T!$ECHO_T$ac_delim
11886LIBS!$LIBS$ac_delim
11887build_alias!$build_alias$ac_delim
11888host_alias!$host_alias$ac_delim
11889target_alias!$target_alias$ac_delim
11890CYGPATH!$CYGPATH$ac_delim
11891EXEEXT!$EXEEXT$ac_delim
11892PKG_LIB_FILE!$PKG_LIB_FILE$ac_delim
11893PKG_STUB_LIB_FILE!$PKG_STUB_LIB_FILE$ac_delim
11894PKG_STUB_SOURCES!$PKG_STUB_SOURCES$ac_delim
11895PKG_STUB_OBJECTS!$PKG_STUB_OBJECTS$ac_delim
11896PKG_TCL_SOURCES!$PKG_TCL_SOURCES$ac_delim
11897PKG_HEADERS!$PKG_HEADERS$ac_delim
11898PKG_INCLUDES!$PKG_INCLUDES$ac_delim
11899PKG_LIBS!$PKG_LIBS$ac_delim
11900PKG_CFLAGS!$PKG_CFLAGS$ac_delim
11901TCL_VERSION!$TCL_VERSION$ac_delim
11902TCL_PATCH_LEVEL!$TCL_PATCH_LEVEL$ac_delim
11903TCL_BIN_DIR!$TCL_BIN_DIR$ac_delim
11904TCL_SRC_DIR!$TCL_SRC_DIR$ac_delim
11905TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim
11906TCL_LIB_FLAG!$TCL_LIB_FLAG$ac_delim
11907TCL_LIB_SPEC!$TCL_LIB_SPEC$ac_delim
11908TCL_STUB_LIB_FILE!$TCL_STUB_LIB_FILE$ac_delim
11909TCL_STUB_LIB_FLAG!$TCL_STUB_LIB_FLAG$ac_delim
11910TCL_STUB_LIB_SPEC!$TCL_STUB_LIB_SPEC$ac_delim
11911CLEANFILES!$CLEANFILES$ac_delim
11912TCL_LIBS!$TCL_LIBS$ac_delim
11913TCL_DEFS!$TCL_DEFS$ac_delim
11914TCL_EXTRA_CFLAGS!$TCL_EXTRA_CFLAGS$ac_delim
11915TCL_LD_FLAGS!$TCL_LD_FLAGS$ac_delim
11916TCL_SHLIB_LD_LIBS!$TCL_SHLIB_LD_LIBS$ac_delim
11917TK_VERSION!$TK_VERSION$ac_delim
11918TK_BIN_DIR!$TK_BIN_DIR$ac_delim
11919TK_SRC_DIR!$TK_SRC_DIR$ac_delim
11920TK_LIB_FILE!$TK_LIB_FILE$ac_delim
11921TK_LIB_FLAG!$TK_LIB_FLAG$ac_delim
11922TK_LIB_SPEC!$TK_LIB_SPEC$ac_delim
11923TK_STUB_LIB_FILE!$TK_STUB_LIB_FILE$ac_delim
11924TK_STUB_LIB_FLAG!$TK_STUB_LIB_FLAG$ac_delim
11925TK_STUB_LIB_SPEC!$TK_STUB_LIB_SPEC$ac_delim
11926TK_LIBS!$TK_LIBS$ac_delim
11927TK_XINCLUDES!$TK_XINCLUDES$ac_delim
11928CC!$CC$ac_delim
11929CFLAGS!$CFLAGS$ac_delim
11930LDFLAGS!$LDFLAGS$ac_delim
11931CPPFLAGS!$CPPFLAGS$ac_delim
11932ac_ct_CC!$ac_ct_CC$ac_delim
11933OBJEXT!$OBJEXT$ac_delim
11934CPP!$CPP$ac_delim
11935INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
11936INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
11937INSTALL_DATA!$INSTALL_DATA$ac_delim
11938SET_MAKE!$SET_MAKE$ac_delim
11939RANLIB!$RANLIB$ac_delim
11940GREP!$GREP$ac_delim
11941EGREP!$EGREP$ac_delim
11942MATH_LIBS!$MATH_LIBS$ac_delim
11943PKG_SOURCES!$PKG_SOURCES$ac_delim
11944PKG_OBJECTS!$PKG_OBJECTS$ac_delim
11945TCL_INCLUDES!$TCL_INCLUDES$ac_delim
11946TK_INCLUDES!$TK_INCLUDES$ac_delim
11947TCL_THREADS!$TCL_THREADS$ac_delim
11948SHARED_BUILD!$SHARED_BUILD$ac_delim
11949AR!$AR$ac_delim
11950_ACEOF
11951
11952  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
11953    break
11954  elif $ac_last_try; then
11955    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
11956echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
11957   { (exit 1); exit 1; }; }
11958  else
11959    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
11960  fi
11961done
11962
11963ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
11964if test -n "$ac_eof"; then
11965  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
11966  ac_eof=`expr $ac_eof + 1`
11967fi
11968
11969cat >>$CONFIG_STATUS <<_ACEOF
11970cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
11971/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
11972_ACEOF
11973sed '
11974s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
11975s/^/s,@/; s/!/@,|#_!!_#|/
11976:n
11977t n
11978s/'"$ac_delim"'$/,g/; t
11979s/$/\\/; p
11980N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
11981' >>$CONFIG_STATUS <conf$$subs.sed
11982rm -f conf$$subs.sed
11983cat >>$CONFIG_STATUS <<_ACEOF
11984CEOF$ac_eof
11985_ACEOF
11986
11987
11988ac_delim='%!_!# '
11989for ac_last_try in false false false false false :; do
11990  cat >conf$$subs.sed <<_ACEOF
11991CELIB_DIR!$CELIB_DIR$ac_delim
11992CFLAGS_DEBUG!$CFLAGS_DEBUG$ac_delim
11993CFLAGS_OPTIMIZE!$CFLAGS_OPTIMIZE$ac_delim
11994CFLAGS_WARNING!$CFLAGS_WARNING$ac_delim
11995STLIB_LD!$STLIB_LD$ac_delim
11996SHLIB_LD!$SHLIB_LD$ac_delim
11997SHLIB_LD_LIBS!$SHLIB_LD_LIBS$ac_delim
11998SHLIB_CFLAGS!$SHLIB_CFLAGS$ac_delim
11999LD_LIBRARY_PATH_VAR!$LD_LIBRARY_PATH_VAR$ac_delim
12000CFLAGS_DEFAULT!$CFLAGS_DEFAULT$ac_delim
12001LDFLAGS_DEFAULT!$LDFLAGS_DEFAULT$ac_delim
12002TCL_DBGX!$TCL_DBGX$ac_delim
12003MAKE_LIB!$MAKE_LIB$ac_delim
12004MAKE_SHARED_LIB!$MAKE_SHARED_LIB$ac_delim
12005MAKE_STATIC_LIB!$MAKE_STATIC_LIB$ac_delim
12006MAKE_STUB_LIB!$MAKE_STUB_LIB$ac_delim
12007RANLIB_STUB!$RANLIB_STUB$ac_delim
12008VC_MANIFEST_EMBED_DLL!$VC_MANIFEST_EMBED_DLL$ac_delim
12009VC_MANIFEST_EMBED_EXE!$VC_MANIFEST_EMBED_EXE$ac_delim
12010TCLSH_PROG!$TCLSH_PROG$ac_delim
12011LIBOBJS!$LIBOBJS$ac_delim
12012LTLIBOBJS!$LTLIBOBJS$ac_delim
12013_ACEOF
12014
12015  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 22; then
12016    break
12017  elif $ac_last_try; then
12018    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
12019echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
12020   { (exit 1); exit 1; }; }
12021  else
12022    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
12023  fi
12024done
12025
12026ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
12027if test -n "$ac_eof"; then
12028  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
12029  ac_eof=`expr $ac_eof + 1`
12030fi
12031
12032cat >>$CONFIG_STATUS <<_ACEOF
12033cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
12034/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
12035_ACEOF
12036sed '
12037s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
12038s/^/s,@/; s/!/@,|#_!!_#|/
12039:n
12040t n
12041s/'"$ac_delim"'$/,g/; t
12042s/$/\\/; p
12043N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
12044' >>$CONFIG_STATUS <conf$$subs.sed
12045rm -f conf$$subs.sed
12046cat >>$CONFIG_STATUS <<_ACEOF
12047:end
12048s/|#_!!_#|//g
12049CEOF$ac_eof
12050_ACEOF
12051
12052
12053# VPATH may cause trouble with some makes, so we remove $(srcdir),
12054# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
12055# trailing colons and then remove the whole line if VPATH becomes empty
12056# (actually we leave an empty line to preserve line numbers).
12057if test "x$srcdir" = x.; then
12058  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
12059s/:*\$(srcdir):*/:/
12060s/:*\${srcdir}:*/:/
12061s/:*@srcdir@:*/:/
12062s/^\([^=]*=[	 ]*\):*/\1/
12063s/:*$//
12064s/^[^=]*=[	 ]*$//
12065}'
12066fi
12067
12068cat >>$CONFIG_STATUS <<\_ACEOF
12069fi # test -n "$CONFIG_FILES"
12070
12071
12072for ac_tag in  :F $CONFIG_FILES
12073do
12074  case $ac_tag in
12075  :[FHLC]) ac_mode=$ac_tag; continue;;
12076  esac
12077  case $ac_mode$ac_tag in
12078  :[FHL]*:*);;
12079  :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
12080echo "$as_me: error: Invalid tag $ac_tag." >&2;}
12081   { (exit 1); exit 1; }; };;
12082  :[FH]-) ac_tag=-:-;;
12083  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
12084  esac
12085  ac_save_IFS=$IFS
12086  IFS=:
12087  set x $ac_tag
12088  IFS=$ac_save_IFS
12089  shift
12090  ac_file=$1
12091  shift
12092
12093  case $ac_mode in
12094  :L) ac_source=$1;;
12095  :[FH])
12096    ac_file_inputs=
12097    for ac_f
12098    do
12099      case $ac_f in
12100      -) ac_f="$tmp/stdin";;
12101      *) # Look for the file first in the build tree, then in the source tree
12102	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
12103	 # because $ac_f cannot contain `:'.
12104	 test -f "$ac_f" ||
12105	   case $ac_f in
12106	   [\\/$]*) false;;
12107	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
12108	   esac ||
12109	   { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
12110echo "$as_me: error: cannot find input file: $ac_f" >&2;}
12111   { (exit 1); exit 1; }; };;
12112      esac
12113      ac_file_inputs="$ac_file_inputs $ac_f"
12114    done
12115
12116    # Let's still pretend it is `configure' which instantiates (i.e., don't
12117    # use $as_me), people would be surprised to read:
12118    #    /* config.h.  Generated by config.status.  */
12119    configure_input="Generated from "`IFS=:
12120	  echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
12121    if test x"$ac_file" != x-; then
12122      configure_input="$ac_file.  $configure_input"
12123      { echo "$as_me:$LINENO: creating $ac_file" >&5
12124echo "$as_me: creating $ac_file" >&6;}
12125    fi
12126
12127    case $ac_tag in
12128    *:-:* | *:-) cat >"$tmp/stdin";;
12129    esac
12130    ;;
12131  esac
12132
12133  ac_dir=`$as_dirname -- "$ac_file" ||
12134$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12135	 X"$ac_file" : 'X\(//\)[^/]' \| \
12136	 X"$ac_file" : 'X\(//\)$' \| \
12137	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
12138echo X"$ac_file" |
12139    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
12140	    s//\1/
12141	    q
12142	  }
12143	  /^X\(\/\/\)[^/].*/{
12144	    s//\1/
12145	    q
12146	  }
12147	  /^X\(\/\/\)$/{
12148	    s//\1/
12149	    q
12150	  }
12151	  /^X\(\/\).*/{
12152	    s//\1/
12153	    q
12154	  }
12155	  s/.*/./; q'`
12156  { as_dir="$ac_dir"
12157  case $as_dir in #(
12158  -*) as_dir=./$as_dir;;
12159  esac
12160  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
12161    as_dirs=
12162    while :; do
12163      case $as_dir in #(
12164      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
12165      *) as_qdir=$as_dir;;
12166      esac
12167      as_dirs="'$as_qdir' $as_dirs"
12168      as_dir=`$as_dirname -- "$as_dir" ||
12169$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12170	 X"$as_dir" : 'X\(//\)[^/]' \| \
12171	 X"$as_dir" : 'X\(//\)$' \| \
12172	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
12173echo X"$as_dir" |
12174    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
12175	    s//\1/
12176	    q
12177	  }
12178	  /^X\(\/\/\)[^/].*/{
12179	    s//\1/
12180	    q
12181	  }
12182	  /^X\(\/\/\)$/{
12183	    s//\1/
12184	    q
12185	  }
12186	  /^X\(\/\).*/{
12187	    s//\1/
12188	    q
12189	  }
12190	  s/.*/./; q'`
12191      test -d "$as_dir" && break
12192    done
12193    test -z "$as_dirs" || eval "mkdir $as_dirs"
12194  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
12195echo "$as_me: error: cannot create directory $as_dir" >&2;}
12196   { (exit 1); exit 1; }; }; }
12197  ac_builddir=.
12198
12199case "$ac_dir" in
12200.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
12201*)
12202  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
12203  # A ".." for each directory in $ac_dir_suffix.
12204  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
12205  case $ac_top_builddir_sub in
12206  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
12207  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
12208  esac ;;
12209esac
12210ac_abs_top_builddir=$ac_pwd
12211ac_abs_builddir=$ac_pwd$ac_dir_suffix
12212# for backward compatibility:
12213ac_top_builddir=$ac_top_build_prefix
12214
12215case $srcdir in
12216  .)  # We are building in place.
12217    ac_srcdir=.
12218    ac_top_srcdir=$ac_top_builddir_sub
12219    ac_abs_top_srcdir=$ac_pwd ;;
12220  [\\/]* | ?:[\\/]* )  # Absolute name.
12221    ac_srcdir=$srcdir$ac_dir_suffix;
12222    ac_top_srcdir=$srcdir
12223    ac_abs_top_srcdir=$srcdir ;;
12224  *) # Relative name.
12225    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
12226    ac_top_srcdir=$ac_top_build_prefix$srcdir
12227    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
12228esac
12229ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
12230
12231
12232  case $ac_mode in
12233  :F)
12234  #
12235  # CONFIG_FILE
12236  #
12237
12238  case $INSTALL in
12239  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
12240  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
12241  esac
12242_ACEOF
12243
12244cat >>$CONFIG_STATUS <<\_ACEOF
12245# If the template does not know about datarootdir, expand it.
12246# FIXME: This hack should be removed a few years after 2.60.
12247ac_datarootdir_hack=; ac_datarootdir_seen=
12248
12249case `sed -n '/datarootdir/ {
12250  p
12251  q
12252}
12253/@datadir@/p
12254/@docdir@/p
12255/@infodir@/p
12256/@localedir@/p
12257/@mandir@/p
12258' $ac_file_inputs` in
12259*datarootdir*) ac_datarootdir_seen=yes;;
12260*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
12261  { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
12262echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
12263_ACEOF
12264cat >>$CONFIG_STATUS <<_ACEOF
12265  ac_datarootdir_hack='
12266  s&@datadir@&$datadir&g
12267  s&@docdir@&$docdir&g
12268  s&@infodir@&$infodir&g
12269  s&@localedir@&$localedir&g
12270  s&@mandir@&$mandir&g
12271    s&\\\${datarootdir}&$datarootdir&g' ;;
12272esac
12273_ACEOF
12274
12275# Neutralize VPATH when `$srcdir' = `.'.
12276# Shell code in configure.ac might set extrasub.
12277# FIXME: do we really want to maintain this feature?
12278cat >>$CONFIG_STATUS <<_ACEOF
12279  sed "$ac_vpsub
12280$extrasub
12281_ACEOF
12282cat >>$CONFIG_STATUS <<\_ACEOF
12283:t
12284/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
12285s&@configure_input@&$configure_input&;t t
12286s&@top_builddir@&$ac_top_builddir_sub&;t t
12287s&@srcdir@&$ac_srcdir&;t t
12288s&@abs_srcdir@&$ac_abs_srcdir&;t t
12289s&@top_srcdir@&$ac_top_srcdir&;t t
12290s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
12291s&@builddir@&$ac_builddir&;t t
12292s&@abs_builddir@&$ac_abs_builddir&;t t
12293s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
12294s&@INSTALL@&$ac_INSTALL&;t t
12295$ac_datarootdir_hack
12296" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
12297
12298test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
12299  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
12300  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
12301  { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
12302which seems to be undefined.  Please make sure it is defined." >&5
12303echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
12304which seems to be undefined.  Please make sure it is defined." >&2;}
12305
12306  rm -f "$tmp/stdin"
12307  case $ac_file in
12308  -) cat "$tmp/out"; rm -f "$tmp/out";;
12309  *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
12310  esac
12311 ;;
12312
12313
12314
12315  esac
12316
12317done # for ac_tag
12318
12319
12320{ (exit 0); exit 0; }
12321_ACEOF
12322chmod +x $CONFIG_STATUS
12323ac_clean_files=$ac_clean_files_save
12324
12325
12326# configure is writing to config.log, and then calls config.status.
12327# config.status does its own redirection, appending to config.log.
12328# Unfortunately, on DOS this fails, as config.log is still kept open
12329# by configure, so config.status won't be able to write to it; its
12330# output is simply discarded.  So we exec the FD to /dev/null,
12331# effectively closing config.log, so it can be properly (re)opened and
12332# appended to by config.status.  When coming back to configure, we
12333# need to make the FD available again.
12334if test "$no_create" != yes; then
12335  ac_cs_success=:
12336  ac_config_status_args=
12337  test "$silent" = yes &&
12338    ac_config_status_args="$ac_config_status_args --quiet"
12339  exec 5>/dev/null
12340  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
12341  exec 5>>config.log
12342  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
12343  # would make configure fail if this is the last instruction.
12344  $ac_cs_success || { (exit 1); exit 1; }
12345fi
12346
12347