xref: /freebsd/contrib/sqlite3/tea/configure (revision 5dae51da3da0cc94d17bd67b308fad304ebec7e0)
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for sqlite 3.14.1.
4#
5#
6# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
7#
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
14
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18  emulate sh
19  NULLCMD=:
20  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21  # is contrary to our usage.  Disable this feature.
22  alias -g '${1+"$@"}'='"$@"'
23  setopt NO_GLOB_SUBST
24else
25  case `(set -o) 2>/dev/null` in #(
26  *posix*) :
27    set -o posix ;; #(
28  *) :
29     ;;
30esac
31fi
32
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45  as_echo='print -r --'
46  as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48  as_echo='printf %s\n'
49  as_echo_n='printf %s'
50else
51  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53    as_echo_n='/usr/ucb/echo -n'
54  else
55    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56    as_echo_n_body='eval
57      arg=$1;
58      case $arg in #(
59      *"$as_nl"*)
60	expr "X$arg" : "X\\(.*\\)$as_nl";
61	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62      esac;
63      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64    '
65    export as_echo_n_body
66    as_echo_n='sh -c $as_echo_n_body as_echo'
67  fi
68  export as_echo_body
69  as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74  PATH_SEPARATOR=:
75  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77      PATH_SEPARATOR=';'
78  }
79fi
80
81
82# IFS
83# We need space, tab and new line, in precisely that order.  Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" ""	$as_nl"
88
89# Find who we are.  Look in the path if we contain no directory separator.
90as_myself=
91case $0 in #((
92  *[\\/]* ) as_myself=$0 ;;
93  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94for as_dir in $PATH
95do
96  IFS=$as_save_IFS
97  test -z "$as_dir" && as_dir=.
98    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99  done
100IFS=$as_save_IFS
101
102     ;;
103esac
104# We did not find ourselves, most probably we were run as `sh COMMAND'
105# in which case we are not to be found in the path.
106if test "x$as_myself" = x; then
107  as_myself=$0
108fi
109if test ! -f "$as_myself"; then
110  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111  exit 1
112fi
113
114# Unset variables that we do not need and which cause bugs (e.g. in
115# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
116# suppresses any "Segmentation fault" message there.  '((' could
117# trigger a bug in pdksh 5.2.14.
118for as_var in BASH_ENV ENV MAIL MAILPATH
119do eval test x\${$as_var+set} = xset \
120  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121done
122PS1='$ '
123PS2='> '
124PS4='+ '
125
126# NLS nuisances.
127LC_ALL=C
128export LC_ALL
129LANGUAGE=C
130export LANGUAGE
131
132# CDPATH.
133(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
135# Use a proper internal environment variable to ensure we don't fall
136  # into an infinite loop, continuously re-executing ourselves.
137  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138    _as_can_reexec=no; export _as_can_reexec;
139    # We cannot yet assume a decent shell, so we have to provide a
140# neutralization value for shells without unset; and this also
141# works around shells that cannot unset nonexistent variables.
142# Preserve -v and -x to the replacement shell.
143BASH_ENV=/dev/null
144ENV=/dev/null
145(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146case $- in # ((((
147  *v*x* | *x*v* ) as_opts=-vx ;;
148  *v* ) as_opts=-v ;;
149  *x* ) as_opts=-x ;;
150  * ) as_opts= ;;
151esac
152exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153# Admittedly, this is quite paranoid, since all the known shells bail
154# out after a failed `exec'.
155$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156as_fn_exit 255
157  fi
158  # We don't want this to propagate to other subprocesses.
159          { _as_can_reexec=; unset _as_can_reexec;}
160if test "x$CONFIG_SHELL" = x; then
161  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162  emulate sh
163  NULLCMD=:
164  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165  # is contrary to our usage.  Disable this feature.
166  alias -g '\${1+\"\$@\"}'='\"\$@\"'
167  setopt NO_GLOB_SUBST
168else
169  case \`(set -o) 2>/dev/null\` in #(
170  *posix*) :
171    set -o posix ;; #(
172  *) :
173     ;;
174esac
175fi
176"
177  as_required="as_fn_return () { (exit \$1); }
178as_fn_success () { as_fn_return 0; }
179as_fn_failure () { as_fn_return 1; }
180as_fn_ret_success () { return 0; }
181as_fn_ret_failure () { return 1; }
182
183exitcode=0
184as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190else
191  exitcode=1; echo positional parameters were not saved.
192fi
193test x\$exitcode = x0 || exit 1
194test -x / || exit 1"
195  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199test \$(( 1 + 1 )) = 2 || exit 1"
200  if (eval "$as_required") 2>/dev/null; then :
201  as_have_required=yes
202else
203  as_have_required=no
204fi
205  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207else
208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209as_found=false
210for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211do
212  IFS=$as_save_IFS
213  test -z "$as_dir" && as_dir=.
214  as_found=:
215  case $as_dir in #(
216	 /*)
217	   for as_base in sh bash ksh sh5; do
218	     # Try only shells that exist, to save several forks.
219	     as_shell=$as_dir/$as_base
220	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222  CONFIG_SHELL=$as_shell as_have_required=yes
223		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224  break 2
225fi
226fi
227	   done;;
228       esac
229  as_found=false
230done
231$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233  CONFIG_SHELL=$SHELL as_have_required=yes
234fi; }
235IFS=$as_save_IFS
236
237
238      if test "x$CONFIG_SHELL" != x; then :
239  export CONFIG_SHELL
240             # We cannot yet assume a decent shell, so we have to provide a
241# neutralization value for shells without unset; and this also
242# works around shells that cannot unset nonexistent variables.
243# Preserve -v and -x to the replacement shell.
244BASH_ENV=/dev/null
245ENV=/dev/null
246(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247case $- in # ((((
248  *v*x* | *x*v* ) as_opts=-vx ;;
249  *v* ) as_opts=-v ;;
250  *x* ) as_opts=-x ;;
251  * ) as_opts= ;;
252esac
253exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254# Admittedly, this is quite paranoid, since all the known shells bail
255# out after a failed `exec'.
256$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257exit 255
258fi
259
260    if test x$as_have_required = xno; then :
261  $as_echo "$0: This script requires a shell more modern than all"
262  $as_echo "$0: the shells that I found on your system."
263  if test x${ZSH_VERSION+set} = xset ; then
264    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
266  else
267    $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268$0: including any error possibly output before this
269$0: message. Then install a modern shell, or manually run
270$0: the script under such a shell if you do have one."
271  fi
272  exit 1
273fi
274fi
275fi
276SHELL=${CONFIG_SHELL-/bin/sh}
277export SHELL
278# Unset more variables known to interfere with behavior of common tools.
279CLICOLOR_FORCE= GREP_OPTIONS=
280unset CLICOLOR_FORCE GREP_OPTIONS
281
282## --------------------- ##
283## M4sh Shell Functions. ##
284## --------------------- ##
285# as_fn_unset VAR
286# ---------------
287# Portably unset VAR.
288as_fn_unset ()
289{
290  { eval $1=; unset $1;}
291}
292as_unset=as_fn_unset
293
294# as_fn_set_status STATUS
295# -----------------------
296# Set $? to STATUS, without forking.
297as_fn_set_status ()
298{
299  return $1
300} # as_fn_set_status
301
302# as_fn_exit STATUS
303# -----------------
304# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305as_fn_exit ()
306{
307  set +e
308  as_fn_set_status $1
309  exit $1
310} # as_fn_exit
311
312# as_fn_mkdir_p
313# -------------
314# Create "$as_dir" as a directory, including parents if necessary.
315as_fn_mkdir_p ()
316{
317
318  case $as_dir in #(
319  -*) as_dir=./$as_dir;;
320  esac
321  test -d "$as_dir" || eval $as_mkdir_p || {
322    as_dirs=
323    while :; do
324      case $as_dir in #(
325      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326      *) as_qdir=$as_dir;;
327      esac
328      as_dirs="'$as_qdir' $as_dirs"
329      as_dir=`$as_dirname -- "$as_dir" ||
330$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331	 X"$as_dir" : 'X\(//\)[^/]' \| \
332	 X"$as_dir" : 'X\(//\)$' \| \
333	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334$as_echo X"$as_dir" |
335    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336	    s//\1/
337	    q
338	  }
339	  /^X\(\/\/\)[^/].*/{
340	    s//\1/
341	    q
342	  }
343	  /^X\(\/\/\)$/{
344	    s//\1/
345	    q
346	  }
347	  /^X\(\/\).*/{
348	    s//\1/
349	    q
350	  }
351	  s/.*/./; q'`
352      test -d "$as_dir" && break
353    done
354    test -z "$as_dirs" || eval "mkdir $as_dirs"
355  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
356
357
358} # as_fn_mkdir_p
359
360# as_fn_executable_p FILE
361# -----------------------
362# Test if FILE is an executable regular file.
363as_fn_executable_p ()
364{
365  test -f "$1" && test -x "$1"
366} # as_fn_executable_p
367# as_fn_append VAR VALUE
368# ----------------------
369# Append the text in VALUE to the end of the definition contained in VAR. Take
370# advantage of any shell optimizations that allow amortized linear growth over
371# repeated appends, instead of the typical quadratic growth present in naive
372# implementations.
373if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374  eval 'as_fn_append ()
375  {
376    eval $1+=\$2
377  }'
378else
379  as_fn_append ()
380  {
381    eval $1=\$$1\$2
382  }
383fi # as_fn_append
384
385# as_fn_arith ARG...
386# ------------------
387# Perform arithmetic evaluation on the ARGs, and store the result in the
388# global $as_val. Take advantage of shells that can avoid forks. The arguments
389# must be portable across $(()) and expr.
390if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391  eval 'as_fn_arith ()
392  {
393    as_val=$(( $* ))
394  }'
395else
396  as_fn_arith ()
397  {
398    as_val=`expr "$@" || test $? -eq 1`
399  }
400fi # as_fn_arith
401
402
403# as_fn_error STATUS ERROR [LINENO LOG_FD]
404# ----------------------------------------
405# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
407# script with STATUS, using 1 if that was 0.
408as_fn_error ()
409{
410  as_status=$1; test $as_status -eq 0 && as_status=1
411  if test "$4"; then
412    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
414  fi
415  $as_echo "$as_me: error: $2" >&2
416  as_fn_exit $as_status
417} # as_fn_error
418
419if expr a : '\(a\)' >/dev/null 2>&1 &&
420   test "X`expr 00001 : '.*\(...\)'`" = X001; then
421  as_expr=expr
422else
423  as_expr=false
424fi
425
426if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427  as_basename=basename
428else
429  as_basename=false
430fi
431
432if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433  as_dirname=dirname
434else
435  as_dirname=false
436fi
437
438as_me=`$as_basename -- "$0" ||
439$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440	 X"$0" : 'X\(//\)$' \| \
441	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442$as_echo X/"$0" |
443    sed '/^.*\/\([^/][^/]*\)\/*$/{
444	    s//\1/
445	    q
446	  }
447	  /^X\/\(\/\/\)$/{
448	    s//\1/
449	    q
450	  }
451	  /^X\/\(\/\).*/{
452	    s//\1/
453	    q
454	  }
455	  s/.*/./; q'`
456
457# Avoid depending upon Character Ranges.
458as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461as_cr_digits='0123456789'
462as_cr_alnum=$as_cr_Letters$as_cr_digits
463
464
465  as_lineno_1=$LINENO as_lineno_1a=$LINENO
466  as_lineno_2=$LINENO as_lineno_2a=$LINENO
467  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
470  sed -n '
471    p
472    /[$]LINENO/=
473  ' <$as_myself |
474    sed '
475      s/[$]LINENO.*/&-/
476      t lineno
477      b
478      :lineno
479      N
480      :loop
481      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
482      t loop
483      s/-\n.*//
484    ' >$as_me.lineno &&
485  chmod +x "$as_me.lineno" ||
486    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
487
488  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489  # already done that, so ensure we don't try to do so again and fall
490  # in an infinite loop.  This has already happened in practice.
491  _as_can_reexec=no; export _as_can_reexec
492  # Don't try to exec as it changes $[0], causing all sort of problems
493  # (the dirname of $[0] is not the place where we might find the
494  # original and so on.  Autoconf is especially sensitive to this).
495  . "./$as_me.lineno"
496  # Exit status is that of the last command.
497  exit
498}
499
500ECHO_C= ECHO_N= ECHO_T=
501case `echo -n x` in #(((((
502-n*)
503  case `echo 'xy\c'` in
504  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
505  xy)  ECHO_C='\c';;
506  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
507       ECHO_T='	';;
508  esac;;
509*)
510  ECHO_N='-n';;
511esac
512
513rm -f conf$$ conf$$.exe conf$$.file
514if test -d conf$$.dir; then
515  rm -f conf$$.dir/conf$$.file
516else
517  rm -f conf$$.dir
518  mkdir conf$$.dir 2>/dev/null
519fi
520if (echo >conf$$.file) 2>/dev/null; then
521  if ln -s conf$$.file conf$$ 2>/dev/null; then
522    as_ln_s='ln -s'
523    # ... but there are two gotchas:
524    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
526    # In both cases, we have to default to `cp -pR'.
527    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
528      as_ln_s='cp -pR'
529  elif ln conf$$.file conf$$ 2>/dev/null; then
530    as_ln_s=ln
531  else
532    as_ln_s='cp -pR'
533  fi
534else
535  as_ln_s='cp -pR'
536fi
537rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538rmdir conf$$.dir 2>/dev/null
539
540if mkdir -p . 2>/dev/null; then
541  as_mkdir_p='mkdir -p "$as_dir"'
542else
543  test -d ./-p && rmdir ./-p
544  as_mkdir_p=false
545fi
546
547as_test_x='test -x'
548as_executable_p=as_fn_executable_p
549
550# Sed expression to map a string onto a valid CPP name.
551as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553# Sed expression to map a string onto a valid variable name.
554as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
557test -n "$DJDIR" || exec 7<&0 </dev/null
558exec 6>&1
559
560# Name of the host.
561# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
562# so uname gets run too.
563ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
565#
566# Initializations.
567#
568ac_default_prefix=/usr/local
569ac_clean_files=
570ac_config_libobj_dir=.
571LIBOBJS=
572cross_compiling=no
573subdirs=
574MFLAGS=
575MAKEFLAGS=
576
577# Identity of this package.
578PACKAGE_NAME='sqlite'
579PACKAGE_TARNAME='sqlite'
580PACKAGE_VERSION='3.14.1'
581PACKAGE_STRING='sqlite 3.14.1'
582PACKAGE_BUGREPORT=''
583PACKAGE_URL=''
584
585# Factoring default headers for most tests.
586ac_includes_default="\
587#include <stdio.h>
588#ifdef HAVE_SYS_TYPES_H
589# include <sys/types.h>
590#endif
591#ifdef HAVE_SYS_STAT_H
592# include <sys/stat.h>
593#endif
594#ifdef STDC_HEADERS
595# include <stdlib.h>
596# include <stddef.h>
597#else
598# ifdef HAVE_STDLIB_H
599#  include <stdlib.h>
600# endif
601#endif
602#ifdef HAVE_STRING_H
603# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
604#  include <memory.h>
605# endif
606# include <string.h>
607#endif
608#ifdef HAVE_STRINGS_H
609# include <strings.h>
610#endif
611#ifdef HAVE_INTTYPES_H
612# include <inttypes.h>
613#endif
614#ifdef HAVE_STDINT_H
615# include <stdint.h>
616#endif
617#ifdef HAVE_UNISTD_H
618# include <unistd.h>
619#endif"
620
621ac_subst_vars='LTLIBOBJS
622LIBOBJS
623TCLSH_PROG
624VC_MANIFEST_EMBED_EXE
625VC_MANIFEST_EMBED_DLL
626RANLIB_STUB
627MAKE_STUB_LIB
628MAKE_STATIC_LIB
629MAKE_SHARED_LIB
630MAKE_LIB
631TCL_DBGX
632LDFLAGS_DEFAULT
633CFLAGS_DEFAULT
634LD_LIBRARY_PATH_VAR
635SHLIB_CFLAGS
636SHLIB_LD_LIBS
637SHLIB_LD
638STLIB_LD
639CFLAGS_WARNING
640CFLAGS_OPTIMIZE
641CFLAGS_DEBUG
642RC
643CELIB_DIR
644AR
645SHARED_BUILD
646TCL_THREADS
647TCL_INCLUDES
648PKG_OBJECTS
649PKG_SOURCES
650MATH_LIBS
651EGREP
652GREP
653RANLIB
654SET_MAKE
655INSTALL_SCRIPT
656INSTALL_PROGRAM
657INSTALL_DATA
658INSTALL
659CPP
660TCL_SHLIB_LD_LIBS
661TCL_LD_FLAGS
662TCL_EXTRA_CFLAGS
663TCL_DEFS
664TCL_LIBS
665CLEANFILES
666OBJEXT
667ac_ct_CC
668CPPFLAGS
669LDFLAGS
670CFLAGS
671CC
672TCL_STUB_LIB_SPEC
673TCL_STUB_LIB_FLAG
674TCL_STUB_LIB_FILE
675TCL_LIB_SPEC
676TCL_LIB_FLAG
677TCL_LIB_FILE
678TCL_SRC_DIR
679TCL_BIN_DIR
680TCL_PATCH_LEVEL
681TCL_VERSION
682PKG_CFLAGS
683PKG_LIBS
684PKG_INCLUDES
685PKG_HEADERS
686PKG_TCL_SOURCES
687PKG_STUB_OBJECTS
688PKG_STUB_SOURCES
689PKG_STUB_LIB_FILE
690PKG_LIB_FILE
691EXEEXT
692CYGPATH
693target_alias
694host_alias
695build_alias
696LIBS
697ECHO_T
698ECHO_N
699ECHO_C
700DEFS
701mandir
702localedir
703libdir
704psdir
705pdfdir
706dvidir
707htmldir
708infodir
709docdir
710oldincludedir
711includedir
712localstatedir
713sharedstatedir
714sysconfdir
715datadir
716datarootdir
717libexecdir
718sbindir
719bindir
720program_transform_name
721prefix
722exec_prefix
723PACKAGE_URL
724PACKAGE_BUGREPORT
725PACKAGE_STRING
726PACKAGE_VERSION
727PACKAGE_TARNAME
728PACKAGE_NAME
729PATH_SEPARATOR
730SHELL'
731ac_subst_files=''
732ac_user_opts='
733enable_option_checking
734with_tcl
735with_system_sqlite
736with_tclinclude
737enable_threads
738enable_shared
739enable_64bit
740enable_64bit_vis
741enable_rpath
742enable_wince
743with_celib
744enable_symbols
745'
746      ac_precious_vars='build_alias
747host_alias
748target_alias
749CC
750CFLAGS
751LDFLAGS
752LIBS
753CPPFLAGS
754CPP'
755
756
757# Initialize some variables set by options.
758ac_init_help=
759ac_init_version=false
760ac_unrecognized_opts=
761ac_unrecognized_sep=
762# The variables have the same names as the options, with
763# dashes changed to underlines.
764cache_file=/dev/null
765exec_prefix=NONE
766no_create=
767no_recursion=
768prefix=NONE
769program_prefix=NONE
770program_suffix=NONE
771program_transform_name=s,x,x,
772silent=
773site=
774srcdir=
775verbose=
776x_includes=NONE
777x_libraries=NONE
778
779# Installation directory options.
780# These are left unexpanded so users can "make install exec_prefix=/foo"
781# and all the variables that are supposed to be based on exec_prefix
782# by default will actually change.
783# Use braces instead of parens because sh, perl, etc. also accept them.
784# (The list follows the same order as the GNU Coding Standards.)
785bindir='${exec_prefix}/bin'
786sbindir='${exec_prefix}/sbin'
787libexecdir='${exec_prefix}/libexec'
788datarootdir='${prefix}/share'
789datadir='${datarootdir}'
790sysconfdir='${prefix}/etc'
791sharedstatedir='${prefix}/com'
792localstatedir='${prefix}/var'
793includedir='${prefix}/include'
794oldincludedir='/usr/include'
795docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
796infodir='${datarootdir}/info'
797htmldir='${docdir}'
798dvidir='${docdir}'
799pdfdir='${docdir}'
800psdir='${docdir}'
801libdir='${exec_prefix}/lib'
802localedir='${datarootdir}/locale'
803mandir='${datarootdir}/man'
804
805ac_prev=
806ac_dashdash=
807for ac_option
808do
809  # If the previous option needs an argument, assign it.
810  if test -n "$ac_prev"; then
811    eval $ac_prev=\$ac_option
812    ac_prev=
813    continue
814  fi
815
816  case $ac_option in
817  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
818  *=)   ac_optarg= ;;
819  *)    ac_optarg=yes ;;
820  esac
821
822  # Accept the important Cygnus configure options, so we can diagnose typos.
823
824  case $ac_dashdash$ac_option in
825  --)
826    ac_dashdash=yes ;;
827
828  -bindir | --bindir | --bindi | --bind | --bin | --bi)
829    ac_prev=bindir ;;
830  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
831    bindir=$ac_optarg ;;
832
833  -build | --build | --buil | --bui | --bu)
834    ac_prev=build_alias ;;
835  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
836    build_alias=$ac_optarg ;;
837
838  -cache-file | --cache-file | --cache-fil | --cache-fi \
839  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
840    ac_prev=cache_file ;;
841  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
842  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
843    cache_file=$ac_optarg ;;
844
845  --config-cache | -C)
846    cache_file=config.cache ;;
847
848  -datadir | --datadir | --datadi | --datad)
849    ac_prev=datadir ;;
850  -datadir=* | --datadir=* | --datadi=* | --datad=*)
851    datadir=$ac_optarg ;;
852
853  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
854  | --dataroo | --dataro | --datar)
855    ac_prev=datarootdir ;;
856  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
857  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
858    datarootdir=$ac_optarg ;;
859
860  -disable-* | --disable-*)
861    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
862    # Reject names that are not valid shell variable names.
863    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
864      as_fn_error $? "invalid feature name: $ac_useropt"
865    ac_useropt_orig=$ac_useropt
866    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
867    case $ac_user_opts in
868      *"
869"enable_$ac_useropt"
870"*) ;;
871      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
872	 ac_unrecognized_sep=', ';;
873    esac
874    eval enable_$ac_useropt=no ;;
875
876  -docdir | --docdir | --docdi | --doc | --do)
877    ac_prev=docdir ;;
878  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
879    docdir=$ac_optarg ;;
880
881  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
882    ac_prev=dvidir ;;
883  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
884    dvidir=$ac_optarg ;;
885
886  -enable-* | --enable-*)
887    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
888    # Reject names that are not valid shell variable names.
889    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
890      as_fn_error $? "invalid feature name: $ac_useropt"
891    ac_useropt_orig=$ac_useropt
892    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
893    case $ac_user_opts in
894      *"
895"enable_$ac_useropt"
896"*) ;;
897      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
898	 ac_unrecognized_sep=', ';;
899    esac
900    eval enable_$ac_useropt=\$ac_optarg ;;
901
902  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
903  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
904  | --exec | --exe | --ex)
905    ac_prev=exec_prefix ;;
906  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
907  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
908  | --exec=* | --exe=* | --ex=*)
909    exec_prefix=$ac_optarg ;;
910
911  -gas | --gas | --ga | --g)
912    # Obsolete; use --with-gas.
913    with_gas=yes ;;
914
915  -help | --help | --hel | --he | -h)
916    ac_init_help=long ;;
917  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
918    ac_init_help=recursive ;;
919  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
920    ac_init_help=short ;;
921
922  -host | --host | --hos | --ho)
923    ac_prev=host_alias ;;
924  -host=* | --host=* | --hos=* | --ho=*)
925    host_alias=$ac_optarg ;;
926
927  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
928    ac_prev=htmldir ;;
929  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
930  | --ht=*)
931    htmldir=$ac_optarg ;;
932
933  -includedir | --includedir | --includedi | --included | --include \
934  | --includ | --inclu | --incl | --inc)
935    ac_prev=includedir ;;
936  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
937  | --includ=* | --inclu=* | --incl=* | --inc=*)
938    includedir=$ac_optarg ;;
939
940  -infodir | --infodir | --infodi | --infod | --info | --inf)
941    ac_prev=infodir ;;
942  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
943    infodir=$ac_optarg ;;
944
945  -libdir | --libdir | --libdi | --libd)
946    ac_prev=libdir ;;
947  -libdir=* | --libdir=* | --libdi=* | --libd=*)
948    libdir=$ac_optarg ;;
949
950  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
951  | --libexe | --libex | --libe)
952    ac_prev=libexecdir ;;
953  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
954  | --libexe=* | --libex=* | --libe=*)
955    libexecdir=$ac_optarg ;;
956
957  -localedir | --localedir | --localedi | --localed | --locale)
958    ac_prev=localedir ;;
959  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
960    localedir=$ac_optarg ;;
961
962  -localstatedir | --localstatedir | --localstatedi | --localstated \
963  | --localstate | --localstat | --localsta | --localst | --locals)
964    ac_prev=localstatedir ;;
965  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
966  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
967    localstatedir=$ac_optarg ;;
968
969  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
970    ac_prev=mandir ;;
971  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
972    mandir=$ac_optarg ;;
973
974  -nfp | --nfp | --nf)
975    # Obsolete; use --without-fp.
976    with_fp=no ;;
977
978  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
979  | --no-cr | --no-c | -n)
980    no_create=yes ;;
981
982  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
983  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
984    no_recursion=yes ;;
985
986  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
987  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
988  | --oldin | --oldi | --old | --ol | --o)
989    ac_prev=oldincludedir ;;
990  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
991  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
992  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
993    oldincludedir=$ac_optarg ;;
994
995  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
996    ac_prev=prefix ;;
997  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
998    prefix=$ac_optarg ;;
999
1000  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1001  | --program-pre | --program-pr | --program-p)
1002    ac_prev=program_prefix ;;
1003  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1004  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1005    program_prefix=$ac_optarg ;;
1006
1007  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1008  | --program-suf | --program-su | --program-s)
1009    ac_prev=program_suffix ;;
1010  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1011  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1012    program_suffix=$ac_optarg ;;
1013
1014  -program-transform-name | --program-transform-name \
1015  | --program-transform-nam | --program-transform-na \
1016  | --program-transform-n | --program-transform- \
1017  | --program-transform | --program-transfor \
1018  | --program-transfo | --program-transf \
1019  | --program-trans | --program-tran \
1020  | --progr-tra | --program-tr | --program-t)
1021    ac_prev=program_transform_name ;;
1022  -program-transform-name=* | --program-transform-name=* \
1023  | --program-transform-nam=* | --program-transform-na=* \
1024  | --program-transform-n=* | --program-transform-=* \
1025  | --program-transform=* | --program-transfor=* \
1026  | --program-transfo=* | --program-transf=* \
1027  | --program-trans=* | --program-tran=* \
1028  | --progr-tra=* | --program-tr=* | --program-t=*)
1029    program_transform_name=$ac_optarg ;;
1030
1031  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1032    ac_prev=pdfdir ;;
1033  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1034    pdfdir=$ac_optarg ;;
1035
1036  -psdir | --psdir | --psdi | --psd | --ps)
1037    ac_prev=psdir ;;
1038  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1039    psdir=$ac_optarg ;;
1040
1041  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1042  | -silent | --silent | --silen | --sile | --sil)
1043    silent=yes ;;
1044
1045  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1046    ac_prev=sbindir ;;
1047  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1048  | --sbi=* | --sb=*)
1049    sbindir=$ac_optarg ;;
1050
1051  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1052  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1053  | --sharedst | --shareds | --shared | --share | --shar \
1054  | --sha | --sh)
1055    ac_prev=sharedstatedir ;;
1056  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1057  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1058  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1059  | --sha=* | --sh=*)
1060    sharedstatedir=$ac_optarg ;;
1061
1062  -site | --site | --sit)
1063    ac_prev=site ;;
1064  -site=* | --site=* | --sit=*)
1065    site=$ac_optarg ;;
1066
1067  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1068    ac_prev=srcdir ;;
1069  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1070    srcdir=$ac_optarg ;;
1071
1072  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1073  | --syscon | --sysco | --sysc | --sys | --sy)
1074    ac_prev=sysconfdir ;;
1075  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1076  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1077    sysconfdir=$ac_optarg ;;
1078
1079  -target | --target | --targe | --targ | --tar | --ta | --t)
1080    ac_prev=target_alias ;;
1081  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1082    target_alias=$ac_optarg ;;
1083
1084  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1085    verbose=yes ;;
1086
1087  -version | --version | --versio | --versi | --vers | -V)
1088    ac_init_version=: ;;
1089
1090  -with-* | --with-*)
1091    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1092    # Reject names that are not valid shell variable names.
1093    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1094      as_fn_error $? "invalid package name: $ac_useropt"
1095    ac_useropt_orig=$ac_useropt
1096    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1097    case $ac_user_opts in
1098      *"
1099"with_$ac_useropt"
1100"*) ;;
1101      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1102	 ac_unrecognized_sep=', ';;
1103    esac
1104    eval with_$ac_useropt=\$ac_optarg ;;
1105
1106  -without-* | --without-*)
1107    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1108    # Reject names that are not valid shell variable names.
1109    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1110      as_fn_error $? "invalid package name: $ac_useropt"
1111    ac_useropt_orig=$ac_useropt
1112    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1113    case $ac_user_opts in
1114      *"
1115"with_$ac_useropt"
1116"*) ;;
1117      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1118	 ac_unrecognized_sep=', ';;
1119    esac
1120    eval with_$ac_useropt=no ;;
1121
1122  --x)
1123    # Obsolete; use --with-x.
1124    with_x=yes ;;
1125
1126  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1127  | --x-incl | --x-inc | --x-in | --x-i)
1128    ac_prev=x_includes ;;
1129  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1130  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1131    x_includes=$ac_optarg ;;
1132
1133  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1134  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1135    ac_prev=x_libraries ;;
1136  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1137  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1138    x_libraries=$ac_optarg ;;
1139
1140  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1141Try \`$0 --help' for more information"
1142    ;;
1143
1144  *=*)
1145    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1146    # Reject names that are not valid shell variable names.
1147    case $ac_envvar in #(
1148      '' | [0-9]* | *[!_$as_cr_alnum]* )
1149      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1150    esac
1151    eval $ac_envvar=\$ac_optarg
1152    export $ac_envvar ;;
1153
1154  *)
1155    # FIXME: should be removed in autoconf 3.0.
1156    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1157    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1158      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1159    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1160    ;;
1161
1162  esac
1163done
1164
1165if test -n "$ac_prev"; then
1166  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1167  as_fn_error $? "missing argument to $ac_option"
1168fi
1169
1170if test -n "$ac_unrecognized_opts"; then
1171  case $enable_option_checking in
1172    no) ;;
1173    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1174    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1175  esac
1176fi
1177
1178# Check all directory arguments for consistency.
1179for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1180		datadir sysconfdir sharedstatedir localstatedir includedir \
1181		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1182		libdir localedir mandir
1183do
1184  eval ac_val=\$$ac_var
1185  # Remove trailing slashes.
1186  case $ac_val in
1187    */ )
1188      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1189      eval $ac_var=\$ac_val;;
1190  esac
1191  # Be sure to have absolute directory names.
1192  case $ac_val in
1193    [\\/$]* | ?:[\\/]* )  continue;;
1194    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1195  esac
1196  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1197done
1198
1199# There might be people who depend on the old broken behavior: `$host'
1200# used to hold the argument of --host etc.
1201# FIXME: To remove some day.
1202build=$build_alias
1203host=$host_alias
1204target=$target_alias
1205
1206# FIXME: To remove some day.
1207if test "x$host_alias" != x; then
1208  if test "x$build_alias" = x; then
1209    cross_compiling=maybe
1210  elif test "x$build_alias" != "x$host_alias"; then
1211    cross_compiling=yes
1212  fi
1213fi
1214
1215ac_tool_prefix=
1216test -n "$host_alias" && ac_tool_prefix=$host_alias-
1217
1218test "$silent" = yes && exec 6>/dev/null
1219
1220
1221ac_pwd=`pwd` && test -n "$ac_pwd" &&
1222ac_ls_di=`ls -di .` &&
1223ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1224  as_fn_error $? "working directory cannot be determined"
1225test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1226  as_fn_error $? "pwd does not report name of working directory"
1227
1228
1229# Find the source files, if location was not specified.
1230if test -z "$srcdir"; then
1231  ac_srcdir_defaulted=yes
1232  # Try the directory containing this script, then the parent directory.
1233  ac_confdir=`$as_dirname -- "$as_myself" ||
1234$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1235	 X"$as_myself" : 'X\(//\)[^/]' \| \
1236	 X"$as_myself" : 'X\(//\)$' \| \
1237	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1238$as_echo X"$as_myself" |
1239    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1240	    s//\1/
1241	    q
1242	  }
1243	  /^X\(\/\/\)[^/].*/{
1244	    s//\1/
1245	    q
1246	  }
1247	  /^X\(\/\/\)$/{
1248	    s//\1/
1249	    q
1250	  }
1251	  /^X\(\/\).*/{
1252	    s//\1/
1253	    q
1254	  }
1255	  s/.*/./; q'`
1256  srcdir=$ac_confdir
1257  if test ! -r "$srcdir/$ac_unique_file"; then
1258    srcdir=..
1259  fi
1260else
1261  ac_srcdir_defaulted=no
1262fi
1263if test ! -r "$srcdir/$ac_unique_file"; then
1264  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1265  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1266fi
1267ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1268ac_abs_confdir=`(
1269	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1270	pwd)`
1271# When building in place, set srcdir=.
1272if test "$ac_abs_confdir" = "$ac_pwd"; then
1273  srcdir=.
1274fi
1275# Remove unnecessary trailing slashes from srcdir.
1276# Double slashes in file names in object file debugging info
1277# mess up M-x gdb in Emacs.
1278case $srcdir in
1279*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1280esac
1281for ac_var in $ac_precious_vars; do
1282  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1283  eval ac_env_${ac_var}_value=\$${ac_var}
1284  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1285  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1286done
1287
1288#
1289# Report the --help message.
1290#
1291if test "$ac_init_help" = "long"; then
1292  # Omit some internal or obsolete options to make the list less imposing.
1293  # This message is too long to be a string in the A/UX 3.1 sh.
1294  cat <<_ACEOF
1295\`configure' configures sqlite 3.14.1 to adapt to many kinds of systems.
1296
1297Usage: $0 [OPTION]... [VAR=VALUE]...
1298
1299To assign environment variables (e.g., CC, CFLAGS...), specify them as
1300VAR=VALUE.  See below for descriptions of some of the useful variables.
1301
1302Defaults for the options are specified in brackets.
1303
1304Configuration:
1305  -h, --help              display this help and exit
1306      --help=short        display options specific to this package
1307      --help=recursive    display the short help of all the included packages
1308  -V, --version           display version information and exit
1309  -q, --quiet, --silent   do not print \`checking ...' messages
1310      --cache-file=FILE   cache test results in FILE [disabled]
1311  -C, --config-cache      alias for \`--cache-file=config.cache'
1312  -n, --no-create         do not create output files
1313      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1314
1315Installation directories:
1316  --prefix=PREFIX         install architecture-independent files in PREFIX
1317                          [$ac_default_prefix]
1318  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1319                          [PREFIX]
1320
1321By default, \`make install' will install all the files in
1322\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1323an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1324for instance \`--prefix=\$HOME'.
1325
1326For better control, use the options below.
1327
1328Fine tuning of the installation directories:
1329  --bindir=DIR            user executables [EPREFIX/bin]
1330  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1331  --libexecdir=DIR        program executables [EPREFIX/libexec]
1332  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1333  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1334  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1335  --libdir=DIR            object code libraries [EPREFIX/lib]
1336  --includedir=DIR        C header files [PREFIX/include]
1337  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1338  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1339  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1340  --infodir=DIR           info documentation [DATAROOTDIR/info]
1341  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1342  --mandir=DIR            man documentation [DATAROOTDIR/man]
1343  --docdir=DIR            documentation root [DATAROOTDIR/doc/sqlite]
1344  --htmldir=DIR           html documentation [DOCDIR]
1345  --dvidir=DIR            dvi documentation [DOCDIR]
1346  --pdfdir=DIR            pdf documentation [DOCDIR]
1347  --psdir=DIR             ps documentation [DOCDIR]
1348_ACEOF
1349
1350  cat <<\_ACEOF
1351_ACEOF
1352fi
1353
1354if test -n "$ac_init_help"; then
1355  case $ac_init_help in
1356     short | recursive ) echo "Configuration of sqlite 3.14.1:";;
1357   esac
1358  cat <<\_ACEOF
1359
1360Optional Features:
1361  --disable-option-checking  ignore unrecognized --enable/--with options
1362  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1363  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1364  --enable-threads        build with threads
1365  --enable-shared         build and link with shared libraries (default: on)
1366  --enable-64bit          enable 64bit support (default: off)
1367  --enable-64bit-vis      enable 64bit Sparc VIS support (default: off)
1368  --disable-rpath         disable rpath support (default: on)
1369  --enable-wince          enable Win/CE support (where applicable)
1370  --enable-symbols        build with debugging symbols (default: off)
1371
1372Optional Packages:
1373  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1374  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1375  --with-tcl              directory containing tcl configuration
1376                          (tclConfig.sh)
1377  --with-system-sqlite    use a system-supplied libsqlite3 instead of the
1378                          bundled one
1379  --with-tclinclude       directory containing the public Tcl header files
1380  --with-celib=DIR        use Windows/CE support library from DIR
1381
1382Some influential environment variables:
1383  CC          C compiler command
1384  CFLAGS      C compiler flags
1385  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1386              nonstandard directory <lib dir>
1387  LIBS        libraries to pass to the linker, e.g. -l<library>
1388  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1389              you have headers in a nonstandard directory <include dir>
1390  CPP         C preprocessor
1391
1392Use these variables to override the choices made by `configure' or to help
1393it to find libraries and programs with nonstandard names/locations.
1394
1395Report bugs to the package provider.
1396_ACEOF
1397ac_status=$?
1398fi
1399
1400if test "$ac_init_help" = "recursive"; then
1401  # If there are subdirs, report their specific --help.
1402  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1403    test -d "$ac_dir" ||
1404      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1405      continue
1406    ac_builddir=.
1407
1408case "$ac_dir" in
1409.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1410*)
1411  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1412  # A ".." for each directory in $ac_dir_suffix.
1413  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1414  case $ac_top_builddir_sub in
1415  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1416  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1417  esac ;;
1418esac
1419ac_abs_top_builddir=$ac_pwd
1420ac_abs_builddir=$ac_pwd$ac_dir_suffix
1421# for backward compatibility:
1422ac_top_builddir=$ac_top_build_prefix
1423
1424case $srcdir in
1425  .)  # We are building in place.
1426    ac_srcdir=.
1427    ac_top_srcdir=$ac_top_builddir_sub
1428    ac_abs_top_srcdir=$ac_pwd ;;
1429  [\\/]* | ?:[\\/]* )  # Absolute name.
1430    ac_srcdir=$srcdir$ac_dir_suffix;
1431    ac_top_srcdir=$srcdir
1432    ac_abs_top_srcdir=$srcdir ;;
1433  *) # Relative name.
1434    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1435    ac_top_srcdir=$ac_top_build_prefix$srcdir
1436    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1437esac
1438ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1439
1440    cd "$ac_dir" || { ac_status=$?; continue; }
1441    # Check for guested configure.
1442    if test -f "$ac_srcdir/configure.gnu"; then
1443      echo &&
1444      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1445    elif test -f "$ac_srcdir/configure"; then
1446      echo &&
1447      $SHELL "$ac_srcdir/configure" --help=recursive
1448    else
1449      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1450    fi || ac_status=$?
1451    cd "$ac_pwd" || { ac_status=$?; break; }
1452  done
1453fi
1454
1455test -n "$ac_init_help" && exit $ac_status
1456if $ac_init_version; then
1457  cat <<\_ACEOF
1458sqlite configure 3.14.1
1459generated by GNU Autoconf 2.69
1460
1461Copyright (C) 2012 Free Software Foundation, Inc.
1462This configure script is free software; the Free Software Foundation
1463gives unlimited permission to copy, distribute and modify it.
1464_ACEOF
1465  exit
1466fi
1467
1468## ------------------------ ##
1469## Autoconf initialization. ##
1470## ------------------------ ##
1471
1472# ac_fn_c_try_compile LINENO
1473# --------------------------
1474# Try to compile conftest.$ac_ext, and return whether this succeeded.
1475ac_fn_c_try_compile ()
1476{
1477  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1478  rm -f conftest.$ac_objext
1479  if { { ac_try="$ac_compile"
1480case "(($ac_try" in
1481  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1482  *) ac_try_echo=$ac_try;;
1483esac
1484eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1485$as_echo "$ac_try_echo"; } >&5
1486  (eval "$ac_compile") 2>conftest.err
1487  ac_status=$?
1488  if test -s conftest.err; then
1489    grep -v '^ *+' conftest.err >conftest.er1
1490    cat conftest.er1 >&5
1491    mv -f conftest.er1 conftest.err
1492  fi
1493  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1494  test $ac_status = 0; } && {
1495	 test -z "$ac_c_werror_flag" ||
1496	 test ! -s conftest.err
1497       } && test -s conftest.$ac_objext; then :
1498  ac_retval=0
1499else
1500  $as_echo "$as_me: failed program was:" >&5
1501sed 's/^/| /' conftest.$ac_ext >&5
1502
1503	ac_retval=1
1504fi
1505  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1506  as_fn_set_status $ac_retval
1507
1508} # ac_fn_c_try_compile
1509
1510# ac_fn_c_try_cpp LINENO
1511# ----------------------
1512# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1513ac_fn_c_try_cpp ()
1514{
1515  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1516  if { { ac_try="$ac_cpp conftest.$ac_ext"
1517case "(($ac_try" in
1518  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1519  *) ac_try_echo=$ac_try;;
1520esac
1521eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1522$as_echo "$ac_try_echo"; } >&5
1523  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1524  ac_status=$?
1525  if test -s conftest.err; then
1526    grep -v '^ *+' conftest.err >conftest.er1
1527    cat conftest.er1 >&5
1528    mv -f conftest.er1 conftest.err
1529  fi
1530  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1531  test $ac_status = 0; } > conftest.i && {
1532	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1533	 test ! -s conftest.err
1534       }; then :
1535  ac_retval=0
1536else
1537  $as_echo "$as_me: failed program was:" >&5
1538sed 's/^/| /' conftest.$ac_ext >&5
1539
1540    ac_retval=1
1541fi
1542  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1543  as_fn_set_status $ac_retval
1544
1545} # ac_fn_c_try_cpp
1546
1547# ac_fn_c_try_run LINENO
1548# ----------------------
1549# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1550# that executables *can* be run.
1551ac_fn_c_try_run ()
1552{
1553  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1554  if { { ac_try="$ac_link"
1555case "(($ac_try" in
1556  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1557  *) ac_try_echo=$ac_try;;
1558esac
1559eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1560$as_echo "$ac_try_echo"; } >&5
1561  (eval "$ac_link") 2>&5
1562  ac_status=$?
1563  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1564  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1565  { { case "(($ac_try" in
1566  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1567  *) ac_try_echo=$ac_try;;
1568esac
1569eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1570$as_echo "$ac_try_echo"; } >&5
1571  (eval "$ac_try") 2>&5
1572  ac_status=$?
1573  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1574  test $ac_status = 0; }; }; then :
1575  ac_retval=0
1576else
1577  $as_echo "$as_me: program exited with status $ac_status" >&5
1578       $as_echo "$as_me: failed program was:" >&5
1579sed 's/^/| /' conftest.$ac_ext >&5
1580
1581       ac_retval=$ac_status
1582fi
1583  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1584  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1585  as_fn_set_status $ac_retval
1586
1587} # ac_fn_c_try_run
1588
1589# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1590# -------------------------------------------------------
1591# Tests whether HEADER exists and can be compiled using the include files in
1592# INCLUDES, setting the cache variable VAR accordingly.
1593ac_fn_c_check_header_compile ()
1594{
1595  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1596  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1597$as_echo_n "checking for $2... " >&6; }
1598if eval \${$3+:} false; then :
1599  $as_echo_n "(cached) " >&6
1600else
1601  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1602/* end confdefs.h.  */
1603$4
1604#include <$2>
1605_ACEOF
1606if ac_fn_c_try_compile "$LINENO"; then :
1607  eval "$3=yes"
1608else
1609  eval "$3=no"
1610fi
1611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1612fi
1613eval ac_res=\$$3
1614	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1615$as_echo "$ac_res" >&6; }
1616  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1617
1618} # ac_fn_c_check_header_compile
1619
1620# ac_fn_c_try_link LINENO
1621# -----------------------
1622# Try to link conftest.$ac_ext, and return whether this succeeded.
1623ac_fn_c_try_link ()
1624{
1625  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1626  rm -f conftest.$ac_objext conftest$ac_exeext
1627  if { { ac_try="$ac_link"
1628case "(($ac_try" in
1629  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1630  *) ac_try_echo=$ac_try;;
1631esac
1632eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1633$as_echo "$ac_try_echo"; } >&5
1634  (eval "$ac_link") 2>conftest.err
1635  ac_status=$?
1636  if test -s conftest.err; then
1637    grep -v '^ *+' conftest.err >conftest.er1
1638    cat conftest.er1 >&5
1639    mv -f conftest.er1 conftest.err
1640  fi
1641  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1642  test $ac_status = 0; } && {
1643	 test -z "$ac_c_werror_flag" ||
1644	 test ! -s conftest.err
1645       } && test -s conftest$ac_exeext && {
1646	 test "$cross_compiling" = yes ||
1647	 test -x conftest$ac_exeext
1648       }; then :
1649  ac_retval=0
1650else
1651  $as_echo "$as_me: failed program was:" >&5
1652sed 's/^/| /' conftest.$ac_ext >&5
1653
1654	ac_retval=1
1655fi
1656  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1657  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1658  # interfere with the next link command; also delete a directory that is
1659  # left behind by Apple's compiler.  We do this before executing the actions.
1660  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1661  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1662  as_fn_set_status $ac_retval
1663
1664} # ac_fn_c_try_link
1665
1666# ac_fn_c_check_func LINENO FUNC VAR
1667# ----------------------------------
1668# Tests whether FUNC exists, setting the cache variable VAR accordingly
1669ac_fn_c_check_func ()
1670{
1671  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1672  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1673$as_echo_n "checking for $2... " >&6; }
1674if eval \${$3+:} false; then :
1675  $as_echo_n "(cached) " >&6
1676else
1677  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1678/* end confdefs.h.  */
1679/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1680   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1681#define $2 innocuous_$2
1682
1683/* System header to define __stub macros and hopefully few prototypes,
1684    which can conflict with char $2 (); below.
1685    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1686    <limits.h> exists even on freestanding compilers.  */
1687
1688#ifdef __STDC__
1689# include <limits.h>
1690#else
1691# include <assert.h>
1692#endif
1693
1694#undef $2
1695
1696/* Override any GCC internal prototype to avoid an error.
1697   Use char because int might match the return type of a GCC
1698   builtin and then its argument prototype would still apply.  */
1699#ifdef __cplusplus
1700extern "C"
1701#endif
1702char $2 ();
1703/* The GNU C library defines this for functions which it implements
1704    to always fail with ENOSYS.  Some functions are actually named
1705    something starting with __ and the normal name is an alias.  */
1706#if defined __stub_$2 || defined __stub___$2
1707choke me
1708#endif
1709
1710int
1711main ()
1712{
1713return $2 ();
1714  ;
1715  return 0;
1716}
1717_ACEOF
1718if ac_fn_c_try_link "$LINENO"; then :
1719  eval "$3=yes"
1720else
1721  eval "$3=no"
1722fi
1723rm -f core conftest.err conftest.$ac_objext \
1724    conftest$ac_exeext conftest.$ac_ext
1725fi
1726eval ac_res=\$$3
1727	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1728$as_echo "$ac_res" >&6; }
1729  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1730
1731} # ac_fn_c_check_func
1732
1733# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1734# -------------------------------------------------------
1735# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1736# the include files in INCLUDES and setting the cache variable VAR
1737# accordingly.
1738ac_fn_c_check_header_mongrel ()
1739{
1740  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1741  if eval \${$3+:} false; then :
1742  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1743$as_echo_n "checking for $2... " >&6; }
1744if eval \${$3+:} false; then :
1745  $as_echo_n "(cached) " >&6
1746fi
1747eval ac_res=\$$3
1748	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1749$as_echo "$ac_res" >&6; }
1750else
1751  # Is the header compilable?
1752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1753$as_echo_n "checking $2 usability... " >&6; }
1754cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1755/* end confdefs.h.  */
1756$4
1757#include <$2>
1758_ACEOF
1759if ac_fn_c_try_compile "$LINENO"; then :
1760  ac_header_compiler=yes
1761else
1762  ac_header_compiler=no
1763fi
1764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1766$as_echo "$ac_header_compiler" >&6; }
1767
1768# Is the header present?
1769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1770$as_echo_n "checking $2 presence... " >&6; }
1771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1772/* end confdefs.h.  */
1773#include <$2>
1774_ACEOF
1775if ac_fn_c_try_cpp "$LINENO"; then :
1776  ac_header_preproc=yes
1777else
1778  ac_header_preproc=no
1779fi
1780rm -f conftest.err conftest.i conftest.$ac_ext
1781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1782$as_echo "$ac_header_preproc" >&6; }
1783
1784# So?  What about this header?
1785case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1786  yes:no: )
1787    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1788$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1789    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1790$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1791    ;;
1792  no:yes:* )
1793    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1794$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1795    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1796$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1797    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1798$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1799    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1800$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1801    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1802$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1803    ;;
1804esac
1805  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1806$as_echo_n "checking for $2... " >&6; }
1807if eval \${$3+:} false; then :
1808  $as_echo_n "(cached) " >&6
1809else
1810  eval "$3=\$ac_header_compiler"
1811fi
1812eval ac_res=\$$3
1813	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1814$as_echo "$ac_res" >&6; }
1815fi
1816  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1817
1818} # ac_fn_c_check_header_mongrel
1819
1820# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
1821# ---------------------------------------------
1822# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
1823# accordingly.
1824ac_fn_c_check_decl ()
1825{
1826  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1827  as_decl_name=`echo $2|sed 's/ *(.*//'`
1828  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
1829  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
1830$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
1831if eval \${$3+:} false; then :
1832  $as_echo_n "(cached) " >&6
1833else
1834  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1835/* end confdefs.h.  */
1836$4
1837int
1838main ()
1839{
1840#ifndef $as_decl_name
1841#ifdef __cplusplus
1842  (void) $as_decl_use;
1843#else
1844  (void) $as_decl_name;
1845#endif
1846#endif
1847
1848  ;
1849  return 0;
1850}
1851_ACEOF
1852if ac_fn_c_try_compile "$LINENO"; then :
1853  eval "$3=yes"
1854else
1855  eval "$3=no"
1856fi
1857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1858fi
1859eval ac_res=\$$3
1860	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1861$as_echo "$ac_res" >&6; }
1862  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1863
1864} # ac_fn_c_check_decl
1865cat >config.log <<_ACEOF
1866This file contains any messages produced by compilers while
1867running configure, to aid debugging if configure makes a mistake.
1868
1869It was created by sqlite $as_me 3.14.1, which was
1870generated by GNU Autoconf 2.69.  Invocation command line was
1871
1872  $ $0 $@
1873
1874_ACEOF
1875exec 5>>config.log
1876{
1877cat <<_ASUNAME
1878## --------- ##
1879## Platform. ##
1880## --------- ##
1881
1882hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1883uname -m = `(uname -m) 2>/dev/null || echo unknown`
1884uname -r = `(uname -r) 2>/dev/null || echo unknown`
1885uname -s = `(uname -s) 2>/dev/null || echo unknown`
1886uname -v = `(uname -v) 2>/dev/null || echo unknown`
1887
1888/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1889/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1890
1891/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1892/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1893/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1894/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1895/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1896/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1897/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1898
1899_ASUNAME
1900
1901as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1902for as_dir in $PATH
1903do
1904  IFS=$as_save_IFS
1905  test -z "$as_dir" && as_dir=.
1906    $as_echo "PATH: $as_dir"
1907  done
1908IFS=$as_save_IFS
1909
1910} >&5
1911
1912cat >&5 <<_ACEOF
1913
1914
1915## ----------- ##
1916## Core tests. ##
1917## ----------- ##
1918
1919_ACEOF
1920
1921
1922# Keep a trace of the command line.
1923# Strip out --no-create and --no-recursion so they do not pile up.
1924# Strip out --silent because we don't want to record it for future runs.
1925# Also quote any args containing shell meta-characters.
1926# Make two passes to allow for proper duplicate-argument suppression.
1927ac_configure_args=
1928ac_configure_args0=
1929ac_configure_args1=
1930ac_must_keep_next=false
1931for ac_pass in 1 2
1932do
1933  for ac_arg
1934  do
1935    case $ac_arg in
1936    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1937    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1938    | -silent | --silent | --silen | --sile | --sil)
1939      continue ;;
1940    *\'*)
1941      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1942    esac
1943    case $ac_pass in
1944    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
1945    2)
1946      as_fn_append ac_configure_args1 " '$ac_arg'"
1947      if test $ac_must_keep_next = true; then
1948	ac_must_keep_next=false # Got value, back to normal.
1949      else
1950	case $ac_arg in
1951	  *=* | --config-cache | -C | -disable-* | --disable-* \
1952	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1953	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1954	  | -with-* | --with-* | -without-* | --without-* | --x)
1955	    case "$ac_configure_args0 " in
1956	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1957	    esac
1958	    ;;
1959	  -* ) ac_must_keep_next=true ;;
1960	esac
1961      fi
1962      as_fn_append ac_configure_args " '$ac_arg'"
1963      ;;
1964    esac
1965  done
1966done
1967{ ac_configure_args0=; unset ac_configure_args0;}
1968{ ac_configure_args1=; unset ac_configure_args1;}
1969
1970# When interrupted or exit'd, cleanup temporary files, and complete
1971# config.log.  We remove comments because anyway the quotes in there
1972# would cause problems or look ugly.
1973# WARNING: Use '\'' to represent an apostrophe within the trap.
1974# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1975trap 'exit_status=$?
1976  # Save into config.log some information that might help in debugging.
1977  {
1978    echo
1979
1980    $as_echo "## ---------------- ##
1981## Cache variables. ##
1982## ---------------- ##"
1983    echo
1984    # The following way of writing the cache mishandles newlines in values,
1985(
1986  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1987    eval ac_val=\$$ac_var
1988    case $ac_val in #(
1989    *${as_nl}*)
1990      case $ac_var in #(
1991      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
1992$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
1993      esac
1994      case $ac_var in #(
1995      _ | IFS | as_nl) ;; #(
1996      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
1997      *) { eval $ac_var=; unset $ac_var;} ;;
1998      esac ;;
1999    esac
2000  done
2001  (set) 2>&1 |
2002    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2003    *${as_nl}ac_space=\ *)
2004      sed -n \
2005	"s/'\''/'\''\\\\'\'''\''/g;
2006	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2007      ;; #(
2008    *)
2009      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2010      ;;
2011    esac |
2012    sort
2013)
2014    echo
2015
2016    $as_echo "## ----------------- ##
2017## Output variables. ##
2018## ----------------- ##"
2019    echo
2020    for ac_var in $ac_subst_vars
2021    do
2022      eval ac_val=\$$ac_var
2023      case $ac_val in
2024      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2025      esac
2026      $as_echo "$ac_var='\''$ac_val'\''"
2027    done | sort
2028    echo
2029
2030    if test -n "$ac_subst_files"; then
2031      $as_echo "## ------------------- ##
2032## File substitutions. ##
2033## ------------------- ##"
2034      echo
2035      for ac_var in $ac_subst_files
2036      do
2037	eval ac_val=\$$ac_var
2038	case $ac_val in
2039	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2040	esac
2041	$as_echo "$ac_var='\''$ac_val'\''"
2042      done | sort
2043      echo
2044    fi
2045
2046    if test -s confdefs.h; then
2047      $as_echo "## ----------- ##
2048## confdefs.h. ##
2049## ----------- ##"
2050      echo
2051      cat confdefs.h
2052      echo
2053    fi
2054    test "$ac_signal" != 0 &&
2055      $as_echo "$as_me: caught signal $ac_signal"
2056    $as_echo "$as_me: exit $exit_status"
2057  } >&5
2058  rm -f core *.core core.conftest.* &&
2059    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2060    exit $exit_status
2061' 0
2062for ac_signal in 1 2 13 15; do
2063  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2064done
2065ac_signal=0
2066
2067# confdefs.h avoids OS command line length limits that DEFS can exceed.
2068rm -f -r conftest* confdefs.h
2069
2070$as_echo "/* confdefs.h */" > confdefs.h
2071
2072# Predefined preprocessor variables.
2073
2074cat >>confdefs.h <<_ACEOF
2075#define PACKAGE_NAME "$PACKAGE_NAME"
2076_ACEOF
2077
2078cat >>confdefs.h <<_ACEOF
2079#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2080_ACEOF
2081
2082cat >>confdefs.h <<_ACEOF
2083#define PACKAGE_VERSION "$PACKAGE_VERSION"
2084_ACEOF
2085
2086cat >>confdefs.h <<_ACEOF
2087#define PACKAGE_STRING "$PACKAGE_STRING"
2088_ACEOF
2089
2090cat >>confdefs.h <<_ACEOF
2091#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2092_ACEOF
2093
2094cat >>confdefs.h <<_ACEOF
2095#define PACKAGE_URL "$PACKAGE_URL"
2096_ACEOF
2097
2098
2099# Let the site file select an alternate cache file if it wants to.
2100# Prefer an explicitly selected file to automatically selected ones.
2101ac_site_file1=NONE
2102ac_site_file2=NONE
2103if test -n "$CONFIG_SITE"; then
2104  # We do not want a PATH search for config.site.
2105  case $CONFIG_SITE in #((
2106    -*)  ac_site_file1=./$CONFIG_SITE;;
2107    */*) ac_site_file1=$CONFIG_SITE;;
2108    *)   ac_site_file1=./$CONFIG_SITE;;
2109  esac
2110elif test "x$prefix" != xNONE; then
2111  ac_site_file1=$prefix/share/config.site
2112  ac_site_file2=$prefix/etc/config.site
2113else
2114  ac_site_file1=$ac_default_prefix/share/config.site
2115  ac_site_file2=$ac_default_prefix/etc/config.site
2116fi
2117for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2118do
2119  test "x$ac_site_file" = xNONE && continue
2120  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2121    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2122$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2123    sed 's/^/| /' "$ac_site_file" >&5
2124    . "$ac_site_file" \
2125      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2126$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2127as_fn_error $? "failed to load site script $ac_site_file
2128See \`config.log' for more details" "$LINENO" 5; }
2129  fi
2130done
2131
2132if test -r "$cache_file"; then
2133  # Some versions of bash will fail to source /dev/null (special files
2134  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2135  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2136    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2137$as_echo "$as_me: loading cache $cache_file" >&6;}
2138    case $cache_file in
2139      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2140      *)                      . "./$cache_file";;
2141    esac
2142  fi
2143else
2144  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2145$as_echo "$as_me: creating cache $cache_file" >&6;}
2146  >$cache_file
2147fi
2148
2149# Check that the precious variables saved in the cache have kept the same
2150# value.
2151ac_cache_corrupted=false
2152for ac_var in $ac_precious_vars; do
2153  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2154  eval ac_new_set=\$ac_env_${ac_var}_set
2155  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2156  eval ac_new_val=\$ac_env_${ac_var}_value
2157  case $ac_old_set,$ac_new_set in
2158    set,)
2159      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2160$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2161      ac_cache_corrupted=: ;;
2162    ,set)
2163      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2164$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2165      ac_cache_corrupted=: ;;
2166    ,);;
2167    *)
2168      if test "x$ac_old_val" != "x$ac_new_val"; then
2169	# differences in whitespace do not lead to failure.
2170	ac_old_val_w=`echo x $ac_old_val`
2171	ac_new_val_w=`echo x $ac_new_val`
2172	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2173	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2174$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2175	  ac_cache_corrupted=:
2176	else
2177	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2178$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2179	  eval $ac_var=\$ac_old_val
2180	fi
2181	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2182$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2183	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2184$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2185      fi;;
2186  esac
2187  # Pass precious variables to config.status.
2188  if test "$ac_new_set" = set; then
2189    case $ac_new_val in
2190    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2191    *) ac_arg=$ac_var=$ac_new_val ;;
2192    esac
2193    case " $ac_configure_args " in
2194      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2195      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2196    esac
2197  fi
2198done
2199if $ac_cache_corrupted; then
2200  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2201$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2202  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2203$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2204  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2205fi
2206## -------------------- ##
2207## Main body of script. ##
2208## -------------------- ##
2209
2210ac_ext=c
2211ac_cpp='$CPP $CPPFLAGS'
2212ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2213ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2214ac_compiler_gnu=$ac_cv_c_compiler_gnu
2215
2216
2217
2218#--------------------------------------------------------------------
2219# Call TEA_INIT as the first TEA_ macro to set up initial vars.
2220# This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
2221# as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
2222#--------------------------------------------------------------------
2223
2224
2225    # TEA extensions pass this us the version of TEA they think they
2226    # are compatible with.
2227    TEA_VERSION="3.9"
2228
2229    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct TEA configuration" >&5
2230$as_echo_n "checking for correct TEA configuration... " >&6; }
2231    if test x"${PACKAGE_NAME}" = x ; then
2232	as_fn_error $? "
2233The PACKAGE_NAME variable must be defined by your TEA configure.in" "$LINENO" 5
2234    fi
2235    if test x"3.9" = x ; then
2236	as_fn_error $? "
2237TEA version not specified." "$LINENO" 5
2238    elif test "3.9" != "${TEA_VERSION}" ; then
2239	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&5
2240$as_echo "warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&6; }
2241    else
2242	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok (TEA ${TEA_VERSION})" >&5
2243$as_echo "ok (TEA ${TEA_VERSION})" >&6; }
2244    fi
2245
2246    # If the user did not set CFLAGS, set it now to keep macros
2247    # like AC_PROG_CC and AC_TRY_COMPILE from adding "-g -O2".
2248    if test "${CFLAGS+set}" != "set" ; then
2249	CFLAGS=""
2250    fi
2251
2252    case "`uname -s`" in
2253	*win32*|*WIN32*|*MINGW32_*)
2254	    # Extract the first word of "cygpath", so it can be a program name with args.
2255set dummy cygpath; ac_word=$2
2256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2257$as_echo_n "checking for $ac_word... " >&6; }
2258if ${ac_cv_prog_CYGPATH+:} false; then :
2259  $as_echo_n "(cached) " >&6
2260else
2261  if test -n "$CYGPATH"; then
2262  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
2263else
2264as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2265for as_dir in $PATH
2266do
2267  IFS=$as_save_IFS
2268  test -z "$as_dir" && as_dir=.
2269    for ac_exec_ext in '' $ac_executable_extensions; do
2270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2271    ac_cv_prog_CYGPATH="cygpath -w"
2272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2273    break 2
2274  fi
2275done
2276  done
2277IFS=$as_save_IFS
2278
2279  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
2280fi
2281fi
2282CYGPATH=$ac_cv_prog_CYGPATH
2283if test -n "$CYGPATH"; then
2284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
2285$as_echo "$CYGPATH" >&6; }
2286else
2287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2288$as_echo "no" >&6; }
2289fi
2290
2291
2292	    EXEEXT=".exe"
2293	    TEA_PLATFORM="windows"
2294	    ;;
2295	*CYGWIN_*)
2296	    CYGPATH=echo
2297	    EXEEXT=".exe"
2298	    # TEA_PLATFORM is determined later in LOAD_TCLCONFIG
2299	    ;;
2300	*)
2301	    CYGPATH=echo
2302	    # Maybe we are cross-compiling....
2303	    case ${host_alias} in
2304		*mingw32*)
2305		EXEEXT=".exe"
2306		TEA_PLATFORM="windows"
2307		;;
2308	    *)
2309		EXEEXT=""
2310		TEA_PLATFORM="unix"
2311		;;
2312	    esac
2313	    ;;
2314    esac
2315
2316    # Check if exec_prefix is set. If not use fall back to prefix.
2317    # Note when adjusted, so that TEA_PREFIX can correct for this.
2318    # This is needed for recursive configures, since autoconf propagates
2319    # $prefix, but not $exec_prefix (doh!).
2320    if test x$exec_prefix = xNONE ; then
2321	exec_prefix_default=yes
2322	exec_prefix=$prefix
2323    fi
2324
2325    { $as_echo "$as_me:${as_lineno-$LINENO}: configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}" >&5
2326$as_echo "$as_me: configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}" >&6;}
2327
2328
2329
2330
2331    # This package name must be replaced statically for AC_SUBST to work
2332
2333    # Substitute STUB_LIB_FILE in case package creates a stub library too.
2334
2335
2336    # We AC_SUBST these here to ensure they are subst'ed,
2337    # in case the user doesn't call TEA_ADD_...
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347ac_aux_dir=
2348for ac_dir in tclconfig "$srcdir"/tclconfig; do
2349  if test -f "$ac_dir/install-sh"; then
2350    ac_aux_dir=$ac_dir
2351    ac_install_sh="$ac_aux_dir/install-sh -c"
2352    break
2353  elif test -f "$ac_dir/install.sh"; then
2354    ac_aux_dir=$ac_dir
2355    ac_install_sh="$ac_aux_dir/install.sh -c"
2356    break
2357  elif test -f "$ac_dir/shtool"; then
2358    ac_aux_dir=$ac_dir
2359    ac_install_sh="$ac_aux_dir/shtool install -c"
2360    break
2361  fi
2362done
2363if test -z "$ac_aux_dir"; then
2364  as_fn_error $? "cannot find install-sh, install.sh, or shtool in tclconfig \"$srcdir\"/tclconfig" "$LINENO" 5
2365fi
2366
2367# These three variables are undocumented and unsupported,
2368# and are intended to be withdrawn in a future Autoconf release.
2369# They can cause serious problems if a builder's source tree is in a directory
2370# whose full name contains unusual characters.
2371ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2372ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2373ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2374
2375
2376
2377#--------------------------------------------------------------------
2378# Load the tclConfig.sh file
2379#--------------------------------------------------------------------
2380
2381
2382
2383    #
2384    # Ok, lets find the tcl configuration
2385    # First, look for one uninstalled.
2386    # the alternative search directory is invoked by --with-tcl
2387    #
2388
2389    if test x"${no_tcl}" = x ; then
2390	# we reset no_tcl in case something fails here
2391	no_tcl=true
2392
2393# Check whether --with-tcl was given.
2394if test "${with_tcl+set}" = set; then :
2395  withval=$with_tcl; with_tclconfig="${withval}"
2396fi
2397
2398	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
2399$as_echo_n "checking for Tcl configuration... " >&6; }
2400	if ${ac_cv_c_tclconfig+:} false; then :
2401  $as_echo_n "(cached) " >&6
2402else
2403
2404
2405	    # First check to see if --with-tcl was specified.
2406	    if test x"${with_tclconfig}" != x ; then
2407		case "${with_tclconfig}" in
2408		    */tclConfig.sh )
2409			if test -f "${with_tclconfig}"; then
2410			    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&5
2411$as_echo "$as_me: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&2;}
2412			    with_tclconfig="`echo "${with_tclconfig}" | sed 's!/tclConfig\.sh$!!'`"
2413			fi ;;
2414		esac
2415		if test -f "${with_tclconfig}/tclConfig.sh" ; then
2416		    ac_cv_c_tclconfig="`(cd "${with_tclconfig}"; pwd)`"
2417		else
2418		    as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
2419		fi
2420	    fi
2421
2422	    # then check for a private Tcl installation
2423	    if test x"${ac_cv_c_tclconfig}" = x ; then
2424		for i in \
2425			../tcl \
2426			`ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2427			`ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
2428			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
2429			../../tcl \
2430			`ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2431			`ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
2432			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
2433			../../../tcl \
2434			`ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2435			`ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
2436			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
2437		    if test "${TEA_PLATFORM}" = "windows" \
2438			    -a -f "$i/win/tclConfig.sh" ; then
2439			ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
2440			break
2441		    fi
2442		    if test -f "$i/unix/tclConfig.sh" ; then
2443			ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
2444			break
2445		    fi
2446		done
2447	    fi
2448
2449	    # on Darwin, check in Framework installation locations
2450	    if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
2451		for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
2452			`ls -d /Library/Frameworks 2>/dev/null` \
2453			`ls -d /Network/Library/Frameworks 2>/dev/null` \
2454			`ls -d /System/Library/Frameworks 2>/dev/null` \
2455			; do
2456		    if test -f "$i/Tcl.framework/tclConfig.sh" ; then
2457			ac_cv_c_tclconfig="`(cd $i/Tcl.framework; pwd)`"
2458			break
2459		    fi
2460		done
2461	    fi
2462
2463	    # TEA specific: on Windows, check in common installation locations
2464	    if test "${TEA_PLATFORM}" = "windows" \
2465		-a x"${ac_cv_c_tclconfig}" = x ; then
2466		for i in `ls -d C:/Tcl/lib 2>/dev/null` \
2467			`ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
2468			; do
2469		    if test -f "$i/tclConfig.sh" ; then
2470			ac_cv_c_tclconfig="`(cd $i; pwd)`"
2471			break
2472		    fi
2473		done
2474	    fi
2475
2476	    # check in a few common install locations
2477	    if test x"${ac_cv_c_tclconfig}" = x ; then
2478		for i in `ls -d ${libdir} 2>/dev/null` \
2479			`ls -d ${exec_prefix}/lib 2>/dev/null` \
2480			`ls -d ${prefix}/lib 2>/dev/null` \
2481			`ls -d /usr/local/lib 2>/dev/null` \
2482			`ls -d /usr/contrib/lib 2>/dev/null` \
2483			`ls -d /usr/lib 2>/dev/null` \
2484			`ls -d /usr/lib64 2>/dev/null` \
2485			`ls -d /usr/lib/tcl8.6 2>/dev/null` \
2486			`ls -d /usr/lib/tcl8.5 2>/dev/null` \
2487			; do
2488		    if test -f "$i/tclConfig.sh" ; then
2489			ac_cv_c_tclconfig="`(cd $i; pwd)`"
2490			break
2491		    fi
2492		done
2493	    fi
2494
2495	    # check in a few other private locations
2496	    if test x"${ac_cv_c_tclconfig}" = x ; then
2497		for i in \
2498			${srcdir}/../tcl \
2499			`ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2500			`ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
2501			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
2502		    if test "${TEA_PLATFORM}" = "windows" \
2503			    -a -f "$i/win/tclConfig.sh" ; then
2504			ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
2505			break
2506		    fi
2507		    if test -f "$i/unix/tclConfig.sh" ; then
2508			ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
2509			break
2510		    fi
2511		done
2512	    fi
2513
2514fi
2515
2516
2517	if test x"${ac_cv_c_tclconfig}" = x ; then
2518	    TCL_BIN_DIR="# no Tcl configs found"
2519	    as_fn_error $? "Can't find Tcl configuration definitions. Use --with-tcl to specify a directory containing tclConfig.sh" "$LINENO" 5
2520	else
2521	    no_tcl=
2522	    TCL_BIN_DIR="${ac_cv_c_tclconfig}"
2523	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
2524$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
2525	fi
2526    fi
2527
2528ac_ext=c
2529ac_cpp='$CPP $CPPFLAGS'
2530ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2531ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2532ac_compiler_gnu=$ac_cv_c_compiler_gnu
2533if test -n "$ac_tool_prefix"; then
2534  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2535set dummy ${ac_tool_prefix}gcc; ac_word=$2
2536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2537$as_echo_n "checking for $ac_word... " >&6; }
2538if ${ac_cv_prog_CC+:} false; then :
2539  $as_echo_n "(cached) " >&6
2540else
2541  if test -n "$CC"; then
2542  ac_cv_prog_CC="$CC" # Let the user override the test.
2543else
2544as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2545for as_dir in $PATH
2546do
2547  IFS=$as_save_IFS
2548  test -z "$as_dir" && as_dir=.
2549    for ac_exec_ext in '' $ac_executable_extensions; do
2550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2551    ac_cv_prog_CC="${ac_tool_prefix}gcc"
2552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2553    break 2
2554  fi
2555done
2556  done
2557IFS=$as_save_IFS
2558
2559fi
2560fi
2561CC=$ac_cv_prog_CC
2562if test -n "$CC"; then
2563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2564$as_echo "$CC" >&6; }
2565else
2566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2567$as_echo "no" >&6; }
2568fi
2569
2570
2571fi
2572if test -z "$ac_cv_prog_CC"; then
2573  ac_ct_CC=$CC
2574  # Extract the first word of "gcc", so it can be a program name with args.
2575set dummy gcc; ac_word=$2
2576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2577$as_echo_n "checking for $ac_word... " >&6; }
2578if ${ac_cv_prog_ac_ct_CC+:} false; then :
2579  $as_echo_n "(cached) " >&6
2580else
2581  if test -n "$ac_ct_CC"; then
2582  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2583else
2584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2585for as_dir in $PATH
2586do
2587  IFS=$as_save_IFS
2588  test -z "$as_dir" && as_dir=.
2589    for ac_exec_ext in '' $ac_executable_extensions; do
2590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2591    ac_cv_prog_ac_ct_CC="gcc"
2592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2593    break 2
2594  fi
2595done
2596  done
2597IFS=$as_save_IFS
2598
2599fi
2600fi
2601ac_ct_CC=$ac_cv_prog_ac_ct_CC
2602if test -n "$ac_ct_CC"; then
2603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2604$as_echo "$ac_ct_CC" >&6; }
2605else
2606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2607$as_echo "no" >&6; }
2608fi
2609
2610  if test "x$ac_ct_CC" = x; then
2611    CC=""
2612  else
2613    case $cross_compiling:$ac_tool_warned in
2614yes:)
2615{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2616$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2617ac_tool_warned=yes ;;
2618esac
2619    CC=$ac_ct_CC
2620  fi
2621else
2622  CC="$ac_cv_prog_CC"
2623fi
2624
2625if test -z "$CC"; then
2626          if test -n "$ac_tool_prefix"; then
2627    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2628set dummy ${ac_tool_prefix}cc; ac_word=$2
2629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2630$as_echo_n "checking for $ac_word... " >&6; }
2631if ${ac_cv_prog_CC+:} false; then :
2632  $as_echo_n "(cached) " >&6
2633else
2634  if test -n "$CC"; then
2635  ac_cv_prog_CC="$CC" # Let the user override the test.
2636else
2637as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2638for as_dir in $PATH
2639do
2640  IFS=$as_save_IFS
2641  test -z "$as_dir" && as_dir=.
2642    for ac_exec_ext in '' $ac_executable_extensions; do
2643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2644    ac_cv_prog_CC="${ac_tool_prefix}cc"
2645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2646    break 2
2647  fi
2648done
2649  done
2650IFS=$as_save_IFS
2651
2652fi
2653fi
2654CC=$ac_cv_prog_CC
2655if test -n "$CC"; then
2656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2657$as_echo "$CC" >&6; }
2658else
2659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2660$as_echo "no" >&6; }
2661fi
2662
2663
2664  fi
2665fi
2666if test -z "$CC"; then
2667  # Extract the first word of "cc", so it can be a program name with args.
2668set dummy cc; ac_word=$2
2669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2670$as_echo_n "checking for $ac_word... " >&6; }
2671if ${ac_cv_prog_CC+:} false; then :
2672  $as_echo_n "(cached) " >&6
2673else
2674  if test -n "$CC"; then
2675  ac_cv_prog_CC="$CC" # Let the user override the test.
2676else
2677  ac_prog_rejected=no
2678as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2679for as_dir in $PATH
2680do
2681  IFS=$as_save_IFS
2682  test -z "$as_dir" && as_dir=.
2683    for ac_exec_ext in '' $ac_executable_extensions; do
2684  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2685    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2686       ac_prog_rejected=yes
2687       continue
2688     fi
2689    ac_cv_prog_CC="cc"
2690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2691    break 2
2692  fi
2693done
2694  done
2695IFS=$as_save_IFS
2696
2697if test $ac_prog_rejected = yes; then
2698  # We found a bogon in the path, so make sure we never use it.
2699  set dummy $ac_cv_prog_CC
2700  shift
2701  if test $# != 0; then
2702    # We chose a different compiler from the bogus one.
2703    # However, it has the same basename, so the bogon will be chosen
2704    # first if we set CC to just the basename; use the full file name.
2705    shift
2706    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2707  fi
2708fi
2709fi
2710fi
2711CC=$ac_cv_prog_CC
2712if test -n "$CC"; then
2713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2714$as_echo "$CC" >&6; }
2715else
2716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2717$as_echo "no" >&6; }
2718fi
2719
2720
2721fi
2722if test -z "$CC"; then
2723  if test -n "$ac_tool_prefix"; then
2724  for ac_prog in cl.exe
2725  do
2726    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2727set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2729$as_echo_n "checking for $ac_word... " >&6; }
2730if ${ac_cv_prog_CC+:} false; then :
2731  $as_echo_n "(cached) " >&6
2732else
2733  if test -n "$CC"; then
2734  ac_cv_prog_CC="$CC" # Let the user override the test.
2735else
2736as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2737for as_dir in $PATH
2738do
2739  IFS=$as_save_IFS
2740  test -z "$as_dir" && as_dir=.
2741    for ac_exec_ext in '' $ac_executable_extensions; do
2742  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2743    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2744    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2745    break 2
2746  fi
2747done
2748  done
2749IFS=$as_save_IFS
2750
2751fi
2752fi
2753CC=$ac_cv_prog_CC
2754if test -n "$CC"; then
2755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2756$as_echo "$CC" >&6; }
2757else
2758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2759$as_echo "no" >&6; }
2760fi
2761
2762
2763    test -n "$CC" && break
2764  done
2765fi
2766if test -z "$CC"; then
2767  ac_ct_CC=$CC
2768  for ac_prog in cl.exe
2769do
2770  # Extract the first word of "$ac_prog", so it can be a program name with args.
2771set dummy $ac_prog; ac_word=$2
2772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2773$as_echo_n "checking for $ac_word... " >&6; }
2774if ${ac_cv_prog_ac_ct_CC+:} false; then :
2775  $as_echo_n "(cached) " >&6
2776else
2777  if test -n "$ac_ct_CC"; then
2778  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2779else
2780as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2781for as_dir in $PATH
2782do
2783  IFS=$as_save_IFS
2784  test -z "$as_dir" && as_dir=.
2785    for ac_exec_ext in '' $ac_executable_extensions; do
2786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2787    ac_cv_prog_ac_ct_CC="$ac_prog"
2788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2789    break 2
2790  fi
2791done
2792  done
2793IFS=$as_save_IFS
2794
2795fi
2796fi
2797ac_ct_CC=$ac_cv_prog_ac_ct_CC
2798if test -n "$ac_ct_CC"; then
2799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2800$as_echo "$ac_ct_CC" >&6; }
2801else
2802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2803$as_echo "no" >&6; }
2804fi
2805
2806
2807  test -n "$ac_ct_CC" && break
2808done
2809
2810  if test "x$ac_ct_CC" = x; then
2811    CC=""
2812  else
2813    case $cross_compiling:$ac_tool_warned in
2814yes:)
2815{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2816$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2817ac_tool_warned=yes ;;
2818esac
2819    CC=$ac_ct_CC
2820  fi
2821fi
2822
2823fi
2824
2825
2826test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2827$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2828as_fn_error $? "no acceptable C compiler found in \$PATH
2829See \`config.log' for more details" "$LINENO" 5; }
2830
2831# Provide some information about the compiler.
2832$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2833set X $ac_compile
2834ac_compiler=$2
2835for ac_option in --version -v -V -qversion; do
2836  { { ac_try="$ac_compiler $ac_option >&5"
2837case "(($ac_try" in
2838  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2839  *) ac_try_echo=$ac_try;;
2840esac
2841eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2842$as_echo "$ac_try_echo"; } >&5
2843  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
2844  ac_status=$?
2845  if test -s conftest.err; then
2846    sed '10a\
2847... rest of stderr output deleted ...
2848         10q' conftest.err >conftest.er1
2849    cat conftest.er1 >&5
2850  fi
2851  rm -f conftest.er1 conftest.err
2852  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2853  test $ac_status = 0; }
2854done
2855
2856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2857/* end confdefs.h.  */
2858
2859int
2860main ()
2861{
2862
2863  ;
2864  return 0;
2865}
2866_ACEOF
2867ac_clean_files_save=$ac_clean_files
2868ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
2869# Try to create an executable without -o first, disregard a.out.
2870# It will help us diagnose broken compilers, and finding out an intuition
2871# of exeext.
2872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
2873$as_echo_n "checking whether the C compiler works... " >&6; }
2874ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2875
2876# The possible output files:
2877ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2878
2879ac_rmfiles=
2880for ac_file in $ac_files
2881do
2882  case $ac_file in
2883    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2884    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2885  esac
2886done
2887rm -f $ac_rmfiles
2888
2889if { { ac_try="$ac_link_default"
2890case "(($ac_try" in
2891  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2892  *) ac_try_echo=$ac_try;;
2893esac
2894eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2895$as_echo "$ac_try_echo"; } >&5
2896  (eval "$ac_link_default") 2>&5
2897  ac_status=$?
2898  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2899  test $ac_status = 0; }; then :
2900  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2901# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2902# in a Makefile.  We should not override ac_cv_exeext if it was cached,
2903# so that the user can short-circuit this test for compilers unknown to
2904# Autoconf.
2905for ac_file in $ac_files ''
2906do
2907  test -f "$ac_file" || continue
2908  case $ac_file in
2909    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
2910	;;
2911    [ab].out )
2912	# We found the default executable, but exeext='' is most
2913	# certainly right.
2914	break;;
2915    *.* )
2916	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2917	then :; else
2918	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2919	fi
2920	# We set ac_cv_exeext here because the later test for it is not
2921	# safe: cross compilers may not add the suffix if given an `-o'
2922	# argument, so we may need to know it at that point already.
2923	# Even if this section looks crufty: it has the advantage of
2924	# actually working.
2925	break;;
2926    * )
2927	break;;
2928  esac
2929done
2930test "$ac_cv_exeext" = no && ac_cv_exeext=
2931
2932else
2933  ac_file=''
2934fi
2935if test -z "$ac_file"; then :
2936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2937$as_echo "no" >&6; }
2938$as_echo "$as_me: failed program was:" >&5
2939sed 's/^/| /' conftest.$ac_ext >&5
2940
2941{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2942$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2943as_fn_error 77 "C compiler cannot create executables
2944See \`config.log' for more details" "$LINENO" 5; }
2945else
2946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2947$as_echo "yes" >&6; }
2948fi
2949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
2950$as_echo_n "checking for C compiler default output file name... " >&6; }
2951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
2952$as_echo "$ac_file" >&6; }
2953ac_exeext=$ac_cv_exeext
2954
2955rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
2956ac_clean_files=$ac_clean_files_save
2957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
2958$as_echo_n "checking for suffix of executables... " >&6; }
2959if { { ac_try="$ac_link"
2960case "(($ac_try" in
2961  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2962  *) ac_try_echo=$ac_try;;
2963esac
2964eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2965$as_echo "$ac_try_echo"; } >&5
2966  (eval "$ac_link") 2>&5
2967  ac_status=$?
2968  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2969  test $ac_status = 0; }; then :
2970  # If both `conftest.exe' and `conftest' are `present' (well, observable)
2971# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2972# work properly (i.e., refer to `conftest.exe'), while it won't with
2973# `rm'.
2974for ac_file in conftest.exe conftest conftest.*; do
2975  test -f "$ac_file" || continue
2976  case $ac_file in
2977    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2978    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2979	  break;;
2980    * ) break;;
2981  esac
2982done
2983else
2984  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2985$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2986as_fn_error $? "cannot compute suffix of executables: cannot compile and link
2987See \`config.log' for more details" "$LINENO" 5; }
2988fi
2989rm -f conftest conftest$ac_cv_exeext
2990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
2991$as_echo "$ac_cv_exeext" >&6; }
2992
2993rm -f conftest.$ac_ext
2994EXEEXT=$ac_cv_exeext
2995ac_exeext=$EXEEXT
2996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2997/* end confdefs.h.  */
2998#include <stdio.h>
2999int
3000main ()
3001{
3002FILE *f = fopen ("conftest.out", "w");
3003 return ferror (f) || fclose (f) != 0;
3004
3005  ;
3006  return 0;
3007}
3008_ACEOF
3009ac_clean_files="$ac_clean_files conftest.out"
3010# Check that the compiler produces executables we can run.  If not, either
3011# the compiler is broken, or we cross compile.
3012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3013$as_echo_n "checking whether we are cross compiling... " >&6; }
3014if test "$cross_compiling" != yes; then
3015  { { ac_try="$ac_link"
3016case "(($ac_try" in
3017  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3018  *) ac_try_echo=$ac_try;;
3019esac
3020eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3021$as_echo "$ac_try_echo"; } >&5
3022  (eval "$ac_link") 2>&5
3023  ac_status=$?
3024  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3025  test $ac_status = 0; }
3026  if { ac_try='./conftest$ac_cv_exeext'
3027  { { case "(($ac_try" in
3028  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3029  *) ac_try_echo=$ac_try;;
3030esac
3031eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3032$as_echo "$ac_try_echo"; } >&5
3033  (eval "$ac_try") 2>&5
3034  ac_status=$?
3035  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3036  test $ac_status = 0; }; }; then
3037    cross_compiling=no
3038  else
3039    if test "$cross_compiling" = maybe; then
3040	cross_compiling=yes
3041    else
3042	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3043$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3044as_fn_error $? "cannot run C compiled programs.
3045If you meant to cross compile, use \`--host'.
3046See \`config.log' for more details" "$LINENO" 5; }
3047    fi
3048  fi
3049fi
3050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3051$as_echo "$cross_compiling" >&6; }
3052
3053rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3054ac_clean_files=$ac_clean_files_save
3055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3056$as_echo_n "checking for suffix of object files... " >&6; }
3057if ${ac_cv_objext+:} false; then :
3058  $as_echo_n "(cached) " >&6
3059else
3060  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3061/* end confdefs.h.  */
3062
3063int
3064main ()
3065{
3066
3067  ;
3068  return 0;
3069}
3070_ACEOF
3071rm -f conftest.o conftest.obj
3072if { { ac_try="$ac_compile"
3073case "(($ac_try" in
3074  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3075  *) ac_try_echo=$ac_try;;
3076esac
3077eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3078$as_echo "$ac_try_echo"; } >&5
3079  (eval "$ac_compile") 2>&5
3080  ac_status=$?
3081  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3082  test $ac_status = 0; }; then :
3083  for ac_file in conftest.o conftest.obj conftest.*; do
3084  test -f "$ac_file" || continue;
3085  case $ac_file in
3086    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3087    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3088       break;;
3089  esac
3090done
3091else
3092  $as_echo "$as_me: failed program was:" >&5
3093sed 's/^/| /' conftest.$ac_ext >&5
3094
3095{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3096$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3097as_fn_error $? "cannot compute suffix of object files: cannot compile
3098See \`config.log' for more details" "$LINENO" 5; }
3099fi
3100rm -f conftest.$ac_cv_objext conftest.$ac_ext
3101fi
3102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3103$as_echo "$ac_cv_objext" >&6; }
3104OBJEXT=$ac_cv_objext
3105ac_objext=$OBJEXT
3106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3107$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3108if ${ac_cv_c_compiler_gnu+:} false; then :
3109  $as_echo_n "(cached) " >&6
3110else
3111  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3112/* end confdefs.h.  */
3113
3114int
3115main ()
3116{
3117#ifndef __GNUC__
3118       choke me
3119#endif
3120
3121  ;
3122  return 0;
3123}
3124_ACEOF
3125if ac_fn_c_try_compile "$LINENO"; then :
3126  ac_compiler_gnu=yes
3127else
3128  ac_compiler_gnu=no
3129fi
3130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3131ac_cv_c_compiler_gnu=$ac_compiler_gnu
3132
3133fi
3134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3135$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3136if test $ac_compiler_gnu = yes; then
3137  GCC=yes
3138else
3139  GCC=
3140fi
3141ac_test_CFLAGS=${CFLAGS+set}
3142ac_save_CFLAGS=$CFLAGS
3143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3144$as_echo_n "checking whether $CC accepts -g... " >&6; }
3145if ${ac_cv_prog_cc_g+:} false; then :
3146  $as_echo_n "(cached) " >&6
3147else
3148  ac_save_c_werror_flag=$ac_c_werror_flag
3149   ac_c_werror_flag=yes
3150   ac_cv_prog_cc_g=no
3151   CFLAGS="-g"
3152   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3153/* end confdefs.h.  */
3154
3155int
3156main ()
3157{
3158
3159  ;
3160  return 0;
3161}
3162_ACEOF
3163if ac_fn_c_try_compile "$LINENO"; then :
3164  ac_cv_prog_cc_g=yes
3165else
3166  CFLAGS=""
3167      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3168/* end confdefs.h.  */
3169
3170int
3171main ()
3172{
3173
3174  ;
3175  return 0;
3176}
3177_ACEOF
3178if ac_fn_c_try_compile "$LINENO"; then :
3179
3180else
3181  ac_c_werror_flag=$ac_save_c_werror_flag
3182	 CFLAGS="-g"
3183	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3184/* end confdefs.h.  */
3185
3186int
3187main ()
3188{
3189
3190  ;
3191  return 0;
3192}
3193_ACEOF
3194if ac_fn_c_try_compile "$LINENO"; then :
3195  ac_cv_prog_cc_g=yes
3196fi
3197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3198fi
3199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3200fi
3201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3202   ac_c_werror_flag=$ac_save_c_werror_flag
3203fi
3204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3205$as_echo "$ac_cv_prog_cc_g" >&6; }
3206if test "$ac_test_CFLAGS" = set; then
3207  CFLAGS=$ac_save_CFLAGS
3208elif test $ac_cv_prog_cc_g = yes; then
3209  if test "$GCC" = yes; then
3210    CFLAGS="-g -O2"
3211  else
3212    CFLAGS="-g"
3213  fi
3214else
3215  if test "$GCC" = yes; then
3216    CFLAGS="-O2"
3217  else
3218    CFLAGS=
3219  fi
3220fi
3221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3222$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3223if ${ac_cv_prog_cc_c89+:} false; then :
3224  $as_echo_n "(cached) " >&6
3225else
3226  ac_cv_prog_cc_c89=no
3227ac_save_CC=$CC
3228cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3229/* end confdefs.h.  */
3230#include <stdarg.h>
3231#include <stdio.h>
3232struct stat;
3233/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3234struct buf { int x; };
3235FILE * (*rcsopen) (struct buf *, struct stat *, int);
3236static char *e (p, i)
3237     char **p;
3238     int i;
3239{
3240  return p[i];
3241}
3242static char *f (char * (*g) (char **, int), char **p, ...)
3243{
3244  char *s;
3245  va_list v;
3246  va_start (v,p);
3247  s = g (p, va_arg (v,int));
3248  va_end (v);
3249  return s;
3250}
3251
3252/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3253   function prototypes and stuff, but not '\xHH' hex character constants.
3254   These don't provoke an error unfortunately, instead are silently treated
3255   as 'x'.  The following induces an error, until -std is added to get
3256   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3257   array size at least.  It's necessary to write '\x00'==0 to get something
3258   that's true only with -std.  */
3259int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3260
3261/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3262   inside strings and character constants.  */
3263#define FOO(x) 'x'
3264int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3265
3266int test (int i, double x);
3267struct s1 {int (*f) (int a);};
3268struct s2 {int (*f) (double a);};
3269int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3270int argc;
3271char **argv;
3272int
3273main ()
3274{
3275return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3276  ;
3277  return 0;
3278}
3279_ACEOF
3280for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3281	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3282do
3283  CC="$ac_save_CC $ac_arg"
3284  if ac_fn_c_try_compile "$LINENO"; then :
3285  ac_cv_prog_cc_c89=$ac_arg
3286fi
3287rm -f core conftest.err conftest.$ac_objext
3288  test "x$ac_cv_prog_cc_c89" != "xno" && break
3289done
3290rm -f conftest.$ac_ext
3291CC=$ac_save_CC
3292
3293fi
3294# AC_CACHE_VAL
3295case "x$ac_cv_prog_cc_c89" in
3296  x)
3297    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3298$as_echo "none needed" >&6; } ;;
3299  xno)
3300    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3301$as_echo "unsupported" >&6; } ;;
3302  *)
3303    CC="$CC $ac_cv_prog_cc_c89"
3304    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3305$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3306esac
3307if test "x$ac_cv_prog_cc_c89" != xno; then :
3308
3309fi
3310
3311ac_ext=c
3312ac_cpp='$CPP $CPPFLAGS'
3313ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3314ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3315ac_compiler_gnu=$ac_cv_c_compiler_gnu
3316
3317
3318
3319    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
3320$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
3321
3322    if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
3323        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
3324$as_echo "loading" >&6; }
3325	. "${TCL_BIN_DIR}/tclConfig.sh"
3326    else
3327        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
3328$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
3329    fi
3330
3331    # eval is required to do the TCL_DBGX substitution
3332    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
3333    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
3334
3335    # If the TCL_BIN_DIR is the build directory (not the install directory),
3336    # then set the common variable name to the value of the build variables.
3337    # For example, the variable TCL_LIB_SPEC will be set to the value
3338    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
3339    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
3340    # installed and uninstalled version of Tcl.
3341    if test -f "${TCL_BIN_DIR}/Makefile" ; then
3342        TCL_LIB_SPEC="${TCL_BUILD_LIB_SPEC}"
3343        TCL_STUB_LIB_SPEC="${TCL_BUILD_STUB_LIB_SPEC}"
3344        TCL_STUB_LIB_PATH="${TCL_BUILD_STUB_LIB_PATH}"
3345    elif test "`uname -s`" = "Darwin"; then
3346	# If Tcl was built as a framework, attempt to use the libraries
3347	# from the framework at the given location so that linking works
3348	# against Tcl.framework installed in an arbitrary location.
3349	case ${TCL_DEFS} in
3350	    *TCL_FRAMEWORK*)
3351		if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
3352		    for i in "`cd "${TCL_BIN_DIR}"; pwd`" \
3353			     "`cd "${TCL_BIN_DIR}"/../..; pwd`"; do
3354			if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
3355			    TCL_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TCL_LIB_FILE}"
3356			    break
3357			fi
3358		    done
3359		fi
3360		if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
3361		    TCL_STUB_LIB_SPEC="-L`echo "${TCL_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
3362		    TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
3363		fi
3364		;;
3365	esac
3366    fi
3367
3368    # eval is required to do the TCL_DBGX substitution
3369    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
3370    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
3371    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
3372    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387    { $as_echo "$as_me:${as_lineno-$LINENO}: checking platform" >&5
3388$as_echo_n "checking platform... " >&6; }
3389    hold_cc=$CC; CC="$TCL_CC"
3390    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3391/* end confdefs.h.  */
3392
3393int
3394main ()
3395{
3396
3397	    #ifdef _WIN32
3398		#error win32
3399	    #endif
3400
3401  ;
3402  return 0;
3403}
3404_ACEOF
3405if ac_fn_c_try_compile "$LINENO"; then :
3406  TEA_PLATFORM="unix"
3407else
3408  TEA_PLATFORM="windows"
3409
3410fi
3411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3412    CC=$hold_cc
3413    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEA_PLATFORM" >&5
3414$as_echo "$TEA_PLATFORM" >&6; }
3415
3416    # The BUILD_$pkg is to define the correct extern storage class
3417    # handling when making this package
3418
3419cat >>confdefs.h <<_ACEOF
3420#define BUILD_${PACKAGE_NAME} /**/
3421_ACEOF
3422
3423    # Do this here as we have fully defined TEA_PLATFORM now
3424    if test "${TEA_PLATFORM}" = "windows" ; then
3425	EXEEXT=".exe"
3426	CLEANFILES="$CLEANFILES *.lib *.dll *.pdb *.exp"
3427    fi
3428
3429    # TEA specific:
3430
3431
3432
3433
3434
3435
3436
3437
3438#--------------------------------------------------------------------
3439# Load the tkConfig.sh file if necessary (Tk extension)
3440#--------------------------------------------------------------------
3441
3442#TEA_PATH_TKCONFIG
3443#TEA_LOAD_TKCONFIG
3444
3445#-----------------------------------------------------------------------
3446# Handle the --prefix=... option by defaulting to what Tcl gave.
3447# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
3448#-----------------------------------------------------------------------
3449
3450
3451    if test "${prefix}" = "NONE"; then
3452	prefix_default=yes
3453	if test x"${TCL_PREFIX}" != x; then
3454	    { $as_echo "$as_me:${as_lineno-$LINENO}: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&5
3455$as_echo "$as_me: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&6;}
3456	    prefix=${TCL_PREFIX}
3457	else
3458	    { $as_echo "$as_me:${as_lineno-$LINENO}: --prefix defaulting to /usr/local" >&5
3459$as_echo "$as_me: --prefix defaulting to /usr/local" >&6;}
3460	    prefix=/usr/local
3461	fi
3462    fi
3463    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \
3464	-o x"${exec_prefix_default}" = x"yes" ; then
3465	if test x"${TCL_EXEC_PREFIX}" != x; then
3466	    { $as_echo "$as_me:${as_lineno-$LINENO}: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&5
3467$as_echo "$as_me: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&6;}
3468	    exec_prefix=${TCL_EXEC_PREFIX}
3469	else
3470	    { $as_echo "$as_me:${as_lineno-$LINENO}: --exec-prefix defaulting to ${prefix}" >&5
3471$as_echo "$as_me: --exec-prefix defaulting to ${prefix}" >&6;}
3472	    exec_prefix=$prefix
3473	fi
3474    fi
3475
3476
3477#-----------------------------------------------------------------------
3478# Standard compiler checks.
3479# This sets up CC by using the CC env var, or looks for gcc otherwise.
3480# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
3481# the basic setup necessary to compile executables.
3482#-----------------------------------------------------------------------
3483
3484
3485    # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE)
3486    # in this macro, they need to go into TEA_SETUP_COMPILER instead.
3487
3488    ac_ext=c
3489ac_cpp='$CPP $CPPFLAGS'
3490ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3491ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3492ac_compiler_gnu=$ac_cv_c_compiler_gnu
3493if test -n "$ac_tool_prefix"; then
3494  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3495set dummy ${ac_tool_prefix}gcc; ac_word=$2
3496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3497$as_echo_n "checking for $ac_word... " >&6; }
3498if ${ac_cv_prog_CC+:} false; then :
3499  $as_echo_n "(cached) " >&6
3500else
3501  if test -n "$CC"; then
3502  ac_cv_prog_CC="$CC" # Let the user override the test.
3503else
3504as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3505for as_dir in $PATH
3506do
3507  IFS=$as_save_IFS
3508  test -z "$as_dir" && as_dir=.
3509    for ac_exec_ext in '' $ac_executable_extensions; do
3510  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3511    ac_cv_prog_CC="${ac_tool_prefix}gcc"
3512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3513    break 2
3514  fi
3515done
3516  done
3517IFS=$as_save_IFS
3518
3519fi
3520fi
3521CC=$ac_cv_prog_CC
3522if test -n "$CC"; then
3523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3524$as_echo "$CC" >&6; }
3525else
3526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3527$as_echo "no" >&6; }
3528fi
3529
3530
3531fi
3532if test -z "$ac_cv_prog_CC"; then
3533  ac_ct_CC=$CC
3534  # Extract the first word of "gcc", so it can be a program name with args.
3535set dummy gcc; ac_word=$2
3536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3537$as_echo_n "checking for $ac_word... " >&6; }
3538if ${ac_cv_prog_ac_ct_CC+:} false; then :
3539  $as_echo_n "(cached) " >&6
3540else
3541  if test -n "$ac_ct_CC"; then
3542  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3543else
3544as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3545for as_dir in $PATH
3546do
3547  IFS=$as_save_IFS
3548  test -z "$as_dir" && as_dir=.
3549    for ac_exec_ext in '' $ac_executable_extensions; do
3550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3551    ac_cv_prog_ac_ct_CC="gcc"
3552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3553    break 2
3554  fi
3555done
3556  done
3557IFS=$as_save_IFS
3558
3559fi
3560fi
3561ac_ct_CC=$ac_cv_prog_ac_ct_CC
3562if test -n "$ac_ct_CC"; then
3563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3564$as_echo "$ac_ct_CC" >&6; }
3565else
3566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3567$as_echo "no" >&6; }
3568fi
3569
3570  if test "x$ac_ct_CC" = x; then
3571    CC=""
3572  else
3573    case $cross_compiling:$ac_tool_warned in
3574yes:)
3575{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3576$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3577ac_tool_warned=yes ;;
3578esac
3579    CC=$ac_ct_CC
3580  fi
3581else
3582  CC="$ac_cv_prog_CC"
3583fi
3584
3585if test -z "$CC"; then
3586          if test -n "$ac_tool_prefix"; then
3587    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3588set dummy ${ac_tool_prefix}cc; ac_word=$2
3589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3590$as_echo_n "checking for $ac_word... " >&6; }
3591if ${ac_cv_prog_CC+:} false; then :
3592  $as_echo_n "(cached) " >&6
3593else
3594  if test -n "$CC"; then
3595  ac_cv_prog_CC="$CC" # Let the user override the test.
3596else
3597as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3598for as_dir in $PATH
3599do
3600  IFS=$as_save_IFS
3601  test -z "$as_dir" && as_dir=.
3602    for ac_exec_ext in '' $ac_executable_extensions; do
3603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3604    ac_cv_prog_CC="${ac_tool_prefix}cc"
3605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3606    break 2
3607  fi
3608done
3609  done
3610IFS=$as_save_IFS
3611
3612fi
3613fi
3614CC=$ac_cv_prog_CC
3615if test -n "$CC"; then
3616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3617$as_echo "$CC" >&6; }
3618else
3619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3620$as_echo "no" >&6; }
3621fi
3622
3623
3624  fi
3625fi
3626if test -z "$CC"; then
3627  # Extract the first word of "cc", so it can be a program name with args.
3628set dummy cc; ac_word=$2
3629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3630$as_echo_n "checking for $ac_word... " >&6; }
3631if ${ac_cv_prog_CC+:} false; then :
3632  $as_echo_n "(cached) " >&6
3633else
3634  if test -n "$CC"; then
3635  ac_cv_prog_CC="$CC" # Let the user override the test.
3636else
3637  ac_prog_rejected=no
3638as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3639for as_dir in $PATH
3640do
3641  IFS=$as_save_IFS
3642  test -z "$as_dir" && as_dir=.
3643    for ac_exec_ext in '' $ac_executable_extensions; do
3644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3645    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3646       ac_prog_rejected=yes
3647       continue
3648     fi
3649    ac_cv_prog_CC="cc"
3650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3651    break 2
3652  fi
3653done
3654  done
3655IFS=$as_save_IFS
3656
3657if test $ac_prog_rejected = yes; then
3658  # We found a bogon in the path, so make sure we never use it.
3659  set dummy $ac_cv_prog_CC
3660  shift
3661  if test $# != 0; then
3662    # We chose a different compiler from the bogus one.
3663    # However, it has the same basename, so the bogon will be chosen
3664    # first if we set CC to just the basename; use the full file name.
3665    shift
3666    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3667  fi
3668fi
3669fi
3670fi
3671CC=$ac_cv_prog_CC
3672if test -n "$CC"; then
3673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3674$as_echo "$CC" >&6; }
3675else
3676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3677$as_echo "no" >&6; }
3678fi
3679
3680
3681fi
3682if test -z "$CC"; then
3683  if test -n "$ac_tool_prefix"; then
3684  for ac_prog in cl.exe
3685  do
3686    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3687set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3689$as_echo_n "checking for $ac_word... " >&6; }
3690if ${ac_cv_prog_CC+:} false; then :
3691  $as_echo_n "(cached) " >&6
3692else
3693  if test -n "$CC"; then
3694  ac_cv_prog_CC="$CC" # Let the user override the test.
3695else
3696as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3697for as_dir in $PATH
3698do
3699  IFS=$as_save_IFS
3700  test -z "$as_dir" && as_dir=.
3701    for ac_exec_ext in '' $ac_executable_extensions; do
3702  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3703    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3704    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3705    break 2
3706  fi
3707done
3708  done
3709IFS=$as_save_IFS
3710
3711fi
3712fi
3713CC=$ac_cv_prog_CC
3714if test -n "$CC"; then
3715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3716$as_echo "$CC" >&6; }
3717else
3718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3719$as_echo "no" >&6; }
3720fi
3721
3722
3723    test -n "$CC" && break
3724  done
3725fi
3726if test -z "$CC"; then
3727  ac_ct_CC=$CC
3728  for ac_prog in cl.exe
3729do
3730  # Extract the first word of "$ac_prog", so it can be a program name with args.
3731set dummy $ac_prog; ac_word=$2
3732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3733$as_echo_n "checking for $ac_word... " >&6; }
3734if ${ac_cv_prog_ac_ct_CC+:} false; then :
3735  $as_echo_n "(cached) " >&6
3736else
3737  if test -n "$ac_ct_CC"; then
3738  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3739else
3740as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3741for as_dir in $PATH
3742do
3743  IFS=$as_save_IFS
3744  test -z "$as_dir" && as_dir=.
3745    for ac_exec_ext in '' $ac_executable_extensions; do
3746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3747    ac_cv_prog_ac_ct_CC="$ac_prog"
3748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3749    break 2
3750  fi
3751done
3752  done
3753IFS=$as_save_IFS
3754
3755fi
3756fi
3757ac_ct_CC=$ac_cv_prog_ac_ct_CC
3758if test -n "$ac_ct_CC"; then
3759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3760$as_echo "$ac_ct_CC" >&6; }
3761else
3762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3763$as_echo "no" >&6; }
3764fi
3765
3766
3767  test -n "$ac_ct_CC" && break
3768done
3769
3770  if test "x$ac_ct_CC" = x; then
3771    CC=""
3772  else
3773    case $cross_compiling:$ac_tool_warned in
3774yes:)
3775{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3776$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3777ac_tool_warned=yes ;;
3778esac
3779    CC=$ac_ct_CC
3780  fi
3781fi
3782
3783fi
3784
3785
3786test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3787$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3788as_fn_error $? "no acceptable C compiler found in \$PATH
3789See \`config.log' for more details" "$LINENO" 5; }
3790
3791# Provide some information about the compiler.
3792$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3793set X $ac_compile
3794ac_compiler=$2
3795for ac_option in --version -v -V -qversion; do
3796  { { ac_try="$ac_compiler $ac_option >&5"
3797case "(($ac_try" in
3798  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3799  *) ac_try_echo=$ac_try;;
3800esac
3801eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3802$as_echo "$ac_try_echo"; } >&5
3803  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3804  ac_status=$?
3805  if test -s conftest.err; then
3806    sed '10a\
3807... rest of stderr output deleted ...
3808         10q' conftest.err >conftest.er1
3809    cat conftest.er1 >&5
3810  fi
3811  rm -f conftest.er1 conftest.err
3812  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3813  test $ac_status = 0; }
3814done
3815
3816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3817$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3818if ${ac_cv_c_compiler_gnu+:} false; then :
3819  $as_echo_n "(cached) " >&6
3820else
3821  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3822/* end confdefs.h.  */
3823
3824int
3825main ()
3826{
3827#ifndef __GNUC__
3828       choke me
3829#endif
3830
3831  ;
3832  return 0;
3833}
3834_ACEOF
3835if ac_fn_c_try_compile "$LINENO"; then :
3836  ac_compiler_gnu=yes
3837else
3838  ac_compiler_gnu=no
3839fi
3840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3841ac_cv_c_compiler_gnu=$ac_compiler_gnu
3842
3843fi
3844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3845$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3846if test $ac_compiler_gnu = yes; then
3847  GCC=yes
3848else
3849  GCC=
3850fi
3851ac_test_CFLAGS=${CFLAGS+set}
3852ac_save_CFLAGS=$CFLAGS
3853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3854$as_echo_n "checking whether $CC accepts -g... " >&6; }
3855if ${ac_cv_prog_cc_g+:} false; then :
3856  $as_echo_n "(cached) " >&6
3857else
3858  ac_save_c_werror_flag=$ac_c_werror_flag
3859   ac_c_werror_flag=yes
3860   ac_cv_prog_cc_g=no
3861   CFLAGS="-g"
3862   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3863/* end confdefs.h.  */
3864
3865int
3866main ()
3867{
3868
3869  ;
3870  return 0;
3871}
3872_ACEOF
3873if ac_fn_c_try_compile "$LINENO"; then :
3874  ac_cv_prog_cc_g=yes
3875else
3876  CFLAGS=""
3877      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3878/* end confdefs.h.  */
3879
3880int
3881main ()
3882{
3883
3884  ;
3885  return 0;
3886}
3887_ACEOF
3888if ac_fn_c_try_compile "$LINENO"; then :
3889
3890else
3891  ac_c_werror_flag=$ac_save_c_werror_flag
3892	 CFLAGS="-g"
3893	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3894/* end confdefs.h.  */
3895
3896int
3897main ()
3898{
3899
3900  ;
3901  return 0;
3902}
3903_ACEOF
3904if ac_fn_c_try_compile "$LINENO"; then :
3905  ac_cv_prog_cc_g=yes
3906fi
3907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3908fi
3909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3910fi
3911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3912   ac_c_werror_flag=$ac_save_c_werror_flag
3913fi
3914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3915$as_echo "$ac_cv_prog_cc_g" >&6; }
3916if test "$ac_test_CFLAGS" = set; then
3917  CFLAGS=$ac_save_CFLAGS
3918elif test $ac_cv_prog_cc_g = yes; then
3919  if test "$GCC" = yes; then
3920    CFLAGS="-g -O2"
3921  else
3922    CFLAGS="-g"
3923  fi
3924else
3925  if test "$GCC" = yes; then
3926    CFLAGS="-O2"
3927  else
3928    CFLAGS=
3929  fi
3930fi
3931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3932$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3933if ${ac_cv_prog_cc_c89+:} false; then :
3934  $as_echo_n "(cached) " >&6
3935else
3936  ac_cv_prog_cc_c89=no
3937ac_save_CC=$CC
3938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3939/* end confdefs.h.  */
3940#include <stdarg.h>
3941#include <stdio.h>
3942struct stat;
3943/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3944struct buf { int x; };
3945FILE * (*rcsopen) (struct buf *, struct stat *, int);
3946static char *e (p, i)
3947     char **p;
3948     int i;
3949{
3950  return p[i];
3951}
3952static char *f (char * (*g) (char **, int), char **p, ...)
3953{
3954  char *s;
3955  va_list v;
3956  va_start (v,p);
3957  s = g (p, va_arg (v,int));
3958  va_end (v);
3959  return s;
3960}
3961
3962/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3963   function prototypes and stuff, but not '\xHH' hex character constants.
3964   These don't provoke an error unfortunately, instead are silently treated
3965   as 'x'.  The following induces an error, until -std is added to get
3966   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3967   array size at least.  It's necessary to write '\x00'==0 to get something
3968   that's true only with -std.  */
3969int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3970
3971/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3972   inside strings and character constants.  */
3973#define FOO(x) 'x'
3974int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3975
3976int test (int i, double x);
3977struct s1 {int (*f) (int a);};
3978struct s2 {int (*f) (double a);};
3979int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3980int argc;
3981char **argv;
3982int
3983main ()
3984{
3985return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3986  ;
3987  return 0;
3988}
3989_ACEOF
3990for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3991	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3992do
3993  CC="$ac_save_CC $ac_arg"
3994  if ac_fn_c_try_compile "$LINENO"; then :
3995  ac_cv_prog_cc_c89=$ac_arg
3996fi
3997rm -f core conftest.err conftest.$ac_objext
3998  test "x$ac_cv_prog_cc_c89" != "xno" && break
3999done
4000rm -f conftest.$ac_ext
4001CC=$ac_save_CC
4002
4003fi
4004# AC_CACHE_VAL
4005case "x$ac_cv_prog_cc_c89" in
4006  x)
4007    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4008$as_echo "none needed" >&6; } ;;
4009  xno)
4010    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4011$as_echo "unsupported" >&6; } ;;
4012  *)
4013    CC="$CC $ac_cv_prog_cc_c89"
4014    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4015$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4016esac
4017if test "x$ac_cv_prog_cc_c89" != xno; then :
4018
4019fi
4020
4021ac_ext=c
4022ac_cpp='$CPP $CPPFLAGS'
4023ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4024ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4025ac_compiler_gnu=$ac_cv_c_compiler_gnu
4026
4027    ac_ext=c
4028ac_cpp='$CPP $CPPFLAGS'
4029ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4030ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4031ac_compiler_gnu=$ac_cv_c_compiler_gnu
4032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4033$as_echo_n "checking how to run the C preprocessor... " >&6; }
4034# On Suns, sometimes $CPP names a directory.
4035if test -n "$CPP" && test -d "$CPP"; then
4036  CPP=
4037fi
4038if test -z "$CPP"; then
4039  if ${ac_cv_prog_CPP+:} false; then :
4040  $as_echo_n "(cached) " >&6
4041else
4042      # Double quotes because CPP needs to be expanded
4043    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4044    do
4045      ac_preproc_ok=false
4046for ac_c_preproc_warn_flag in '' yes
4047do
4048  # Use a header file that comes with gcc, so configuring glibc
4049  # with a fresh cross-compiler works.
4050  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4051  # <limits.h> exists even on freestanding compilers.
4052  # On the NeXT, cc -E runs the code through the compiler's parser,
4053  # not just through cpp. "Syntax error" is here to catch this case.
4054  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4055/* end confdefs.h.  */
4056#ifdef __STDC__
4057# include <limits.h>
4058#else
4059# include <assert.h>
4060#endif
4061		     Syntax error
4062_ACEOF
4063if ac_fn_c_try_cpp "$LINENO"; then :
4064
4065else
4066  # Broken: fails on valid input.
4067continue
4068fi
4069rm -f conftest.err conftest.i conftest.$ac_ext
4070
4071  # OK, works on sane cases.  Now check whether nonexistent headers
4072  # can be detected and how.
4073  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4074/* end confdefs.h.  */
4075#include <ac_nonexistent.h>
4076_ACEOF
4077if ac_fn_c_try_cpp "$LINENO"; then :
4078  # Broken: success on invalid input.
4079continue
4080else
4081  # Passes both tests.
4082ac_preproc_ok=:
4083break
4084fi
4085rm -f conftest.err conftest.i conftest.$ac_ext
4086
4087done
4088# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4089rm -f conftest.i conftest.err conftest.$ac_ext
4090if $ac_preproc_ok; then :
4091  break
4092fi
4093
4094    done
4095    ac_cv_prog_CPP=$CPP
4096
4097fi
4098  CPP=$ac_cv_prog_CPP
4099else
4100  ac_cv_prog_CPP=$CPP
4101fi
4102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4103$as_echo "$CPP" >&6; }
4104ac_preproc_ok=false
4105for ac_c_preproc_warn_flag in '' yes
4106do
4107  # Use a header file that comes with gcc, so configuring glibc
4108  # with a fresh cross-compiler works.
4109  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4110  # <limits.h> exists even on freestanding compilers.
4111  # On the NeXT, cc -E runs the code through the compiler's parser,
4112  # not just through cpp. "Syntax error" is here to catch this case.
4113  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4114/* end confdefs.h.  */
4115#ifdef __STDC__
4116# include <limits.h>
4117#else
4118# include <assert.h>
4119#endif
4120		     Syntax error
4121_ACEOF
4122if ac_fn_c_try_cpp "$LINENO"; then :
4123
4124else
4125  # Broken: fails on valid input.
4126continue
4127fi
4128rm -f conftest.err conftest.i conftest.$ac_ext
4129
4130  # OK, works on sane cases.  Now check whether nonexistent headers
4131  # can be detected and how.
4132  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4133/* end confdefs.h.  */
4134#include <ac_nonexistent.h>
4135_ACEOF
4136if ac_fn_c_try_cpp "$LINENO"; then :
4137  # Broken: success on invalid input.
4138continue
4139else
4140  # Passes both tests.
4141ac_preproc_ok=:
4142break
4143fi
4144rm -f conftest.err conftest.i conftest.$ac_ext
4145
4146done
4147# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4148rm -f conftest.i conftest.err conftest.$ac_ext
4149if $ac_preproc_ok; then :
4150
4151else
4152  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4153$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4154as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4155See \`config.log' for more details" "$LINENO" 5; }
4156fi
4157
4158ac_ext=c
4159ac_cpp='$CPP $CPPFLAGS'
4160ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4161ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4162ac_compiler_gnu=$ac_cv_c_compiler_gnu
4163
4164
4165    INSTALL="\$(SHELL) \$(srcdir)/tclconfig/install-sh -c"
4166
4167    INSTALL_DATA="\${INSTALL} -m 644"
4168
4169    INSTALL_PROGRAM="\${INSTALL}"
4170
4171    INSTALL_SCRIPT="\${INSTALL}"
4172
4173
4174    #--------------------------------------------------------------------
4175    # Checks to see if the make program sets the $MAKE variable.
4176    #--------------------------------------------------------------------
4177
4178    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4179$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4180set x ${MAKE-make}
4181ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4182if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
4183  $as_echo_n "(cached) " >&6
4184else
4185  cat >conftest.make <<\_ACEOF
4186SHELL = /bin/sh
4187all:
4188	@echo '@@@%%%=$(MAKE)=@@@%%%'
4189_ACEOF
4190# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
4191case `${MAKE-make} -f conftest.make 2>/dev/null` in
4192  *@@@%%%=?*=@@@%%%*)
4193    eval ac_cv_prog_make_${ac_make}_set=yes;;
4194  *)
4195    eval ac_cv_prog_make_${ac_make}_set=no;;
4196esac
4197rm -f conftest.make
4198fi
4199if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4201$as_echo "yes" >&6; }
4202  SET_MAKE=
4203else
4204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4205$as_echo "no" >&6; }
4206  SET_MAKE="MAKE=${MAKE-make}"
4207fi
4208
4209
4210    #--------------------------------------------------------------------
4211    # Find ranlib
4212    #--------------------------------------------------------------------
4213
4214    if test -n "$ac_tool_prefix"; then
4215  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4216set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4218$as_echo_n "checking for $ac_word... " >&6; }
4219if ${ac_cv_prog_RANLIB+:} false; then :
4220  $as_echo_n "(cached) " >&6
4221else
4222  if test -n "$RANLIB"; then
4223  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4224else
4225as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4226for as_dir in $PATH
4227do
4228  IFS=$as_save_IFS
4229  test -z "$as_dir" && as_dir=.
4230    for ac_exec_ext in '' $ac_executable_extensions; do
4231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4232    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4234    break 2
4235  fi
4236done
4237  done
4238IFS=$as_save_IFS
4239
4240fi
4241fi
4242RANLIB=$ac_cv_prog_RANLIB
4243if test -n "$RANLIB"; then
4244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4245$as_echo "$RANLIB" >&6; }
4246else
4247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4248$as_echo "no" >&6; }
4249fi
4250
4251
4252fi
4253if test -z "$ac_cv_prog_RANLIB"; then
4254  ac_ct_RANLIB=$RANLIB
4255  # Extract the first word of "ranlib", so it can be a program name with args.
4256set dummy ranlib; ac_word=$2
4257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4258$as_echo_n "checking for $ac_word... " >&6; }
4259if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
4260  $as_echo_n "(cached) " >&6
4261else
4262  if test -n "$ac_ct_RANLIB"; then
4263  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4264else
4265as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4266for as_dir in $PATH
4267do
4268  IFS=$as_save_IFS
4269  test -z "$as_dir" && as_dir=.
4270    for ac_exec_ext in '' $ac_executable_extensions; do
4271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4272    ac_cv_prog_ac_ct_RANLIB="ranlib"
4273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4274    break 2
4275  fi
4276done
4277  done
4278IFS=$as_save_IFS
4279
4280fi
4281fi
4282ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4283if test -n "$ac_ct_RANLIB"; then
4284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4285$as_echo "$ac_ct_RANLIB" >&6; }
4286else
4287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4288$as_echo "no" >&6; }
4289fi
4290
4291  if test "x$ac_ct_RANLIB" = x; then
4292    RANLIB=""
4293  else
4294    case $cross_compiling:$ac_tool_warned in
4295yes:)
4296{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4297$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4298ac_tool_warned=yes ;;
4299esac
4300    RANLIB=$ac_ct_RANLIB
4301  fi
4302else
4303  RANLIB="$ac_cv_prog_RANLIB"
4304fi
4305
4306
4307    #--------------------------------------------------------------------
4308    # Determines the correct binary file extension (.o, .obj, .exe etc.)
4309    #--------------------------------------------------------------------
4310
4311
4312
4313
4314
4315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4316$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4317if ${ac_cv_path_GREP+:} false; then :
4318  $as_echo_n "(cached) " >&6
4319else
4320  if test -z "$GREP"; then
4321  ac_path_GREP_found=false
4322  # Loop through the user's path and test for each of PROGNAME-LIST
4323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4324for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4325do
4326  IFS=$as_save_IFS
4327  test -z "$as_dir" && as_dir=.
4328    for ac_prog in grep ggrep; do
4329    for ac_exec_ext in '' $ac_executable_extensions; do
4330      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4331      as_fn_executable_p "$ac_path_GREP" || continue
4332# Check for GNU ac_path_GREP and select it if it is found.
4333  # Check for GNU $ac_path_GREP
4334case `"$ac_path_GREP" --version 2>&1` in
4335*GNU*)
4336  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4337*)
4338  ac_count=0
4339  $as_echo_n 0123456789 >"conftest.in"
4340  while :
4341  do
4342    cat "conftest.in" "conftest.in" >"conftest.tmp"
4343    mv "conftest.tmp" "conftest.in"
4344    cp "conftest.in" "conftest.nl"
4345    $as_echo 'GREP' >> "conftest.nl"
4346    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4347    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4348    as_fn_arith $ac_count + 1 && ac_count=$as_val
4349    if test $ac_count -gt ${ac_path_GREP_max-0}; then
4350      # Best one so far, save it but keep looking for a better one
4351      ac_cv_path_GREP="$ac_path_GREP"
4352      ac_path_GREP_max=$ac_count
4353    fi
4354    # 10*(2^10) chars as input seems more than enough
4355    test $ac_count -gt 10 && break
4356  done
4357  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4358esac
4359
4360      $ac_path_GREP_found && break 3
4361    done
4362  done
4363  done
4364IFS=$as_save_IFS
4365  if test -z "$ac_cv_path_GREP"; then
4366    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4367  fi
4368else
4369  ac_cv_path_GREP=$GREP
4370fi
4371
4372fi
4373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4374$as_echo "$ac_cv_path_GREP" >&6; }
4375 GREP="$ac_cv_path_GREP"
4376
4377
4378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4379$as_echo_n "checking for egrep... " >&6; }
4380if ${ac_cv_path_EGREP+:} false; then :
4381  $as_echo_n "(cached) " >&6
4382else
4383  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4384   then ac_cv_path_EGREP="$GREP -E"
4385   else
4386     if test -z "$EGREP"; then
4387  ac_path_EGREP_found=false
4388  # Loop through the user's path and test for each of PROGNAME-LIST
4389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4390for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4391do
4392  IFS=$as_save_IFS
4393  test -z "$as_dir" && as_dir=.
4394    for ac_prog in egrep; do
4395    for ac_exec_ext in '' $ac_executable_extensions; do
4396      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4397      as_fn_executable_p "$ac_path_EGREP" || continue
4398# Check for GNU ac_path_EGREP and select it if it is found.
4399  # Check for GNU $ac_path_EGREP
4400case `"$ac_path_EGREP" --version 2>&1` in
4401*GNU*)
4402  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4403*)
4404  ac_count=0
4405  $as_echo_n 0123456789 >"conftest.in"
4406  while :
4407  do
4408    cat "conftest.in" "conftest.in" >"conftest.tmp"
4409    mv "conftest.tmp" "conftest.in"
4410    cp "conftest.in" "conftest.nl"
4411    $as_echo 'EGREP' >> "conftest.nl"
4412    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4413    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4414    as_fn_arith $ac_count + 1 && ac_count=$as_val
4415    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4416      # Best one so far, save it but keep looking for a better one
4417      ac_cv_path_EGREP="$ac_path_EGREP"
4418      ac_path_EGREP_max=$ac_count
4419    fi
4420    # 10*(2^10) chars as input seems more than enough
4421    test $ac_count -gt 10 && break
4422  done
4423  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4424esac
4425
4426      $ac_path_EGREP_found && break 3
4427    done
4428  done
4429  done
4430IFS=$as_save_IFS
4431  if test -z "$ac_cv_path_EGREP"; then
4432    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4433  fi
4434else
4435  ac_cv_path_EGREP=$EGREP
4436fi
4437
4438   fi
4439fi
4440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4441$as_echo "$ac_cv_path_EGREP" >&6; }
4442 EGREP="$ac_cv_path_EGREP"
4443
4444
4445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4446$as_echo_n "checking for ANSI C header files... " >&6; }
4447if ${ac_cv_header_stdc+:} false; then :
4448  $as_echo_n "(cached) " >&6
4449else
4450  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4451/* end confdefs.h.  */
4452#include <stdlib.h>
4453#include <stdarg.h>
4454#include <string.h>
4455#include <float.h>
4456
4457int
4458main ()
4459{
4460
4461  ;
4462  return 0;
4463}
4464_ACEOF
4465if ac_fn_c_try_compile "$LINENO"; then :
4466  ac_cv_header_stdc=yes
4467else
4468  ac_cv_header_stdc=no
4469fi
4470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4471
4472if test $ac_cv_header_stdc = yes; then
4473  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4474  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4475/* end confdefs.h.  */
4476#include <string.h>
4477
4478_ACEOF
4479if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4480  $EGREP "memchr" >/dev/null 2>&1; then :
4481
4482else
4483  ac_cv_header_stdc=no
4484fi
4485rm -f conftest*
4486
4487fi
4488
4489if test $ac_cv_header_stdc = yes; then
4490  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4491  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4492/* end confdefs.h.  */
4493#include <stdlib.h>
4494
4495_ACEOF
4496if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4497  $EGREP "free" >/dev/null 2>&1; then :
4498
4499else
4500  ac_cv_header_stdc=no
4501fi
4502rm -f conftest*
4503
4504fi
4505
4506if test $ac_cv_header_stdc = yes; then
4507  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4508  if test "$cross_compiling" = yes; then :
4509  :
4510else
4511  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4512/* end confdefs.h.  */
4513#include <ctype.h>
4514#include <stdlib.h>
4515#if ((' ' & 0x0FF) == 0x020)
4516# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4517# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4518#else
4519# define ISLOWER(c) \
4520		   (('a' <= (c) && (c) <= 'i') \
4521		     || ('j' <= (c) && (c) <= 'r') \
4522		     || ('s' <= (c) && (c) <= 'z'))
4523# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4524#endif
4525
4526#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4527int
4528main ()
4529{
4530  int i;
4531  for (i = 0; i < 256; i++)
4532    if (XOR (islower (i), ISLOWER (i))
4533	|| toupper (i) != TOUPPER (i))
4534      return 2;
4535  return 0;
4536}
4537_ACEOF
4538if ac_fn_c_try_run "$LINENO"; then :
4539
4540else
4541  ac_cv_header_stdc=no
4542fi
4543rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4544  conftest.$ac_objext conftest.beam conftest.$ac_ext
4545fi
4546
4547fi
4548fi
4549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4550$as_echo "$ac_cv_header_stdc" >&6; }
4551if test $ac_cv_header_stdc = yes; then
4552
4553$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4554
4555fi
4556
4557# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4558for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4559		  inttypes.h stdint.h unistd.h
4560do :
4561  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4562ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4563"
4564if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4565  cat >>confdefs.h <<_ACEOF
4566#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4567_ACEOF
4568
4569fi
4570
4571done
4572
4573
4574
4575    # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here.
4576
4577
4578    #------------------------------------------------------------------------
4579    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
4580    # It makes compiling go faster.  (This is only a performance feature.)
4581    #------------------------------------------------------------------------
4582
4583    if test -z "$no_pipe" -a -n "$GCC"; then
4584	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler understands -pipe" >&5
4585$as_echo_n "checking if the compiler understands -pipe... " >&6; }
4586if ${tcl_cv_cc_pipe+:} false; then :
4587  $as_echo_n "(cached) " >&6
4588else
4589
4590	    hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
4591	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4592/* end confdefs.h.  */
4593
4594int
4595main ()
4596{
4597
4598  ;
4599  return 0;
4600}
4601_ACEOF
4602if ac_fn_c_try_compile "$LINENO"; then :
4603  tcl_cv_cc_pipe=yes
4604else
4605  tcl_cv_cc_pipe=no
4606fi
4607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4608	    CFLAGS=$hold_cflags
4609fi
4610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_pipe" >&5
4611$as_echo "$tcl_cv_cc_pipe" >&6; }
4612	if test $tcl_cv_cc_pipe = yes; then
4613	    CFLAGS="$CFLAGS -pipe"
4614	fi
4615    fi
4616
4617    #--------------------------------------------------------------------
4618    # Common compiler flag setup
4619    #--------------------------------------------------------------------
4620
4621     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
4622$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
4623if ${ac_cv_c_bigendian+:} false; then :
4624  $as_echo_n "(cached) " >&6
4625else
4626  ac_cv_c_bigendian=unknown
4627    # See if we're dealing with a universal compiler.
4628    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4629/* end confdefs.h.  */
4630#ifndef __APPLE_CC__
4631	       not a universal capable compiler
4632	     #endif
4633	     typedef int dummy;
4634
4635_ACEOF
4636if ac_fn_c_try_compile "$LINENO"; then :
4637
4638	# Check for potential -arch flags.  It is not universal unless
4639	# there are at least two -arch flags with different values.
4640	ac_arch=
4641	ac_prev=
4642	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
4643	 if test -n "$ac_prev"; then
4644	   case $ac_word in
4645	     i?86 | x86_64 | ppc | ppc64)
4646	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
4647		 ac_arch=$ac_word
4648	       else
4649		 ac_cv_c_bigendian=universal
4650		 break
4651	       fi
4652	       ;;
4653	   esac
4654	   ac_prev=
4655	 elif test "x$ac_word" = "x-arch"; then
4656	   ac_prev=arch
4657	 fi
4658       done
4659fi
4660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4661    if test $ac_cv_c_bigendian = unknown; then
4662      # See if sys/param.h defines the BYTE_ORDER macro.
4663      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4664/* end confdefs.h.  */
4665#include <sys/types.h>
4666	     #include <sys/param.h>
4667
4668int
4669main ()
4670{
4671#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
4672		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
4673		     && LITTLE_ENDIAN)
4674	      bogus endian macros
4675	     #endif
4676
4677  ;
4678  return 0;
4679}
4680_ACEOF
4681if ac_fn_c_try_compile "$LINENO"; then :
4682  # It does; now see whether it defined to BIG_ENDIAN or not.
4683	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4684/* end confdefs.h.  */
4685#include <sys/types.h>
4686		#include <sys/param.h>
4687
4688int
4689main ()
4690{
4691#if BYTE_ORDER != BIG_ENDIAN
4692		 not big endian
4693		#endif
4694
4695  ;
4696  return 0;
4697}
4698_ACEOF
4699if ac_fn_c_try_compile "$LINENO"; then :
4700  ac_cv_c_bigendian=yes
4701else
4702  ac_cv_c_bigendian=no
4703fi
4704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4705fi
4706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4707    fi
4708    if test $ac_cv_c_bigendian = unknown; then
4709      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
4710      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4711/* end confdefs.h.  */
4712#include <limits.h>
4713
4714int
4715main ()
4716{
4717#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
4718	      bogus endian macros
4719	     #endif
4720
4721  ;
4722  return 0;
4723}
4724_ACEOF
4725if ac_fn_c_try_compile "$LINENO"; then :
4726  # It does; now see whether it defined to _BIG_ENDIAN or not.
4727	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4728/* end confdefs.h.  */
4729#include <limits.h>
4730
4731int
4732main ()
4733{
4734#ifndef _BIG_ENDIAN
4735		 not big endian
4736		#endif
4737
4738  ;
4739  return 0;
4740}
4741_ACEOF
4742if ac_fn_c_try_compile "$LINENO"; then :
4743  ac_cv_c_bigendian=yes
4744else
4745  ac_cv_c_bigendian=no
4746fi
4747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4748fi
4749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4750    fi
4751    if test $ac_cv_c_bigendian = unknown; then
4752      # Compile a test program.
4753      if test "$cross_compiling" = yes; then :
4754  # Try to guess by grepping values from an object file.
4755	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4756/* end confdefs.h.  */
4757short int ascii_mm[] =
4758		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
4759		short int ascii_ii[] =
4760		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
4761		int use_ascii (int i) {
4762		  return ascii_mm[i] + ascii_ii[i];
4763		}
4764		short int ebcdic_ii[] =
4765		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
4766		short int ebcdic_mm[] =
4767		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
4768		int use_ebcdic (int i) {
4769		  return ebcdic_mm[i] + ebcdic_ii[i];
4770		}
4771		extern int foo;
4772
4773int
4774main ()
4775{
4776return use_ascii (foo) == use_ebcdic (foo);
4777  ;
4778  return 0;
4779}
4780_ACEOF
4781if ac_fn_c_try_compile "$LINENO"; then :
4782  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
4783	      ac_cv_c_bigendian=yes
4784	    fi
4785	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
4786	      if test "$ac_cv_c_bigendian" = unknown; then
4787		ac_cv_c_bigendian=no
4788	      else
4789		# finding both strings is unlikely to happen, but who knows?
4790		ac_cv_c_bigendian=unknown
4791	      fi
4792	    fi
4793fi
4794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4795else
4796  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4797/* end confdefs.h.  */
4798$ac_includes_default
4799int
4800main ()
4801{
4802
4803	     /* Are we little or big endian?  From Harbison&Steele.  */
4804	     union
4805	     {
4806	       long int l;
4807	       char c[sizeof (long int)];
4808	     } u;
4809	     u.l = 1;
4810	     return u.c[sizeof (long int) - 1] == 1;
4811
4812  ;
4813  return 0;
4814}
4815_ACEOF
4816if ac_fn_c_try_run "$LINENO"; then :
4817  ac_cv_c_bigendian=no
4818else
4819  ac_cv_c_bigendian=yes
4820fi
4821rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4822  conftest.$ac_objext conftest.beam conftest.$ac_ext
4823fi
4824
4825    fi
4826fi
4827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
4828$as_echo "$ac_cv_c_bigendian" >&6; }
4829 case $ac_cv_c_bigendian in #(
4830   yes)
4831     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
4832;; #(
4833   no)
4834      ;; #(
4835   universal)
4836
4837$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
4838
4839     ;; #(
4840   *)
4841     as_fn_error $? "unknown endianness
4842 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
4843 esac
4844
4845    if test "${TEA_PLATFORM}" = "unix" ; then
4846
4847    #--------------------------------------------------------------------
4848    # On a few very rare systems, all of the libm.a stuff is
4849    # already in libc.a.  Set compiler flags accordingly.
4850    # Also, Linux requires the "ieee" library for math to work
4851    # right (and it must appear before "-lm").
4852    #--------------------------------------------------------------------
4853
4854    ac_fn_c_check_func "$LINENO" "sin" "ac_cv_func_sin"
4855if test "x$ac_cv_func_sin" = xyes; then :
4856  MATH_LIBS=""
4857else
4858  MATH_LIBS="-lm"
4859fi
4860
4861    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lieee" >&5
4862$as_echo_n "checking for main in -lieee... " >&6; }
4863if ${ac_cv_lib_ieee_main+:} false; then :
4864  $as_echo_n "(cached) " >&6
4865else
4866  ac_check_lib_save_LIBS=$LIBS
4867LIBS="-lieee  $LIBS"
4868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4869/* end confdefs.h.  */
4870
4871
4872int
4873main ()
4874{
4875return main ();
4876  ;
4877  return 0;
4878}
4879_ACEOF
4880if ac_fn_c_try_link "$LINENO"; then :
4881  ac_cv_lib_ieee_main=yes
4882else
4883  ac_cv_lib_ieee_main=no
4884fi
4885rm -f core conftest.err conftest.$ac_objext \
4886    conftest$ac_exeext conftest.$ac_ext
4887LIBS=$ac_check_lib_save_LIBS
4888fi
4889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee_main" >&5
4890$as_echo "$ac_cv_lib_ieee_main" >&6; }
4891if test "x$ac_cv_lib_ieee_main" = xyes; then :
4892  MATH_LIBS="-lieee $MATH_LIBS"
4893fi
4894
4895
4896    #--------------------------------------------------------------------
4897    # Interactive UNIX requires -linet instead of -lsocket, plus it
4898    # needs net/errno.h to define the socket-related error codes.
4899    #--------------------------------------------------------------------
4900
4901    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -linet" >&5
4902$as_echo_n "checking for main in -linet... " >&6; }
4903if ${ac_cv_lib_inet_main+:} false; then :
4904  $as_echo_n "(cached) " >&6
4905else
4906  ac_check_lib_save_LIBS=$LIBS
4907LIBS="-linet  $LIBS"
4908cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4909/* end confdefs.h.  */
4910
4911
4912int
4913main ()
4914{
4915return main ();
4916  ;
4917  return 0;
4918}
4919_ACEOF
4920if ac_fn_c_try_link "$LINENO"; then :
4921  ac_cv_lib_inet_main=yes
4922else
4923  ac_cv_lib_inet_main=no
4924fi
4925rm -f core conftest.err conftest.$ac_objext \
4926    conftest$ac_exeext conftest.$ac_ext
4927LIBS=$ac_check_lib_save_LIBS
4928fi
4929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_inet_main" >&5
4930$as_echo "$ac_cv_lib_inet_main" >&6; }
4931if test "x$ac_cv_lib_inet_main" = xyes; then :
4932  LIBS="$LIBS -linet"
4933fi
4934
4935    ac_fn_c_check_header_mongrel "$LINENO" "net/errno.h" "ac_cv_header_net_errno_h" "$ac_includes_default"
4936if test "x$ac_cv_header_net_errno_h" = xyes; then :
4937
4938
4939$as_echo "#define HAVE_NET_ERRNO_H 1" >>confdefs.h
4940
4941fi
4942
4943
4944
4945    #--------------------------------------------------------------------
4946    #	Check for the existence of the -lsocket and -lnsl libraries.
4947    #	The order here is important, so that they end up in the right
4948    #	order in the command line generated by make.  Here are some
4949    #	special considerations:
4950    #	1. Use "connect" and "accept" to check for -lsocket, and
4951    #	   "gethostbyname" to check for -lnsl.
4952    #	2. Use each function name only once:  can't redo a check because
4953    #	   autoconf caches the results of the last check and won't redo it.
4954    #	3. Use -lnsl and -lsocket only if they supply procedures that
4955    #	   aren't already present in the normal libraries.  This is because
4956    #	   IRIX 5.2 has libraries, but they aren't needed and they're
4957    #	   bogus:  they goof up name resolution if used.
4958    #	4. On some SVR4 systems, can't use -lsocket without -lnsl too.
4959    #	   To get around this problem, check for both libraries together
4960    #	   if -lsocket doesn't work by itself.
4961    #--------------------------------------------------------------------
4962
4963    tcl_checkBoth=0
4964    ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
4965if test "x$ac_cv_func_connect" = xyes; then :
4966  tcl_checkSocket=0
4967else
4968  tcl_checkSocket=1
4969fi
4970
4971    if test "$tcl_checkSocket" = 1; then
4972	ac_fn_c_check_func "$LINENO" "setsockopt" "ac_cv_func_setsockopt"
4973if test "x$ac_cv_func_setsockopt" = xyes; then :
4974
4975else
4976  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setsockopt in -lsocket" >&5
4977$as_echo_n "checking for setsockopt in -lsocket... " >&6; }
4978if ${ac_cv_lib_socket_setsockopt+:} false; then :
4979  $as_echo_n "(cached) " >&6
4980else
4981  ac_check_lib_save_LIBS=$LIBS
4982LIBS="-lsocket  $LIBS"
4983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4984/* end confdefs.h.  */
4985
4986/* Override any GCC internal prototype to avoid an error.
4987   Use char because int might match the return type of a GCC
4988   builtin and then its argument prototype would still apply.  */
4989#ifdef __cplusplus
4990extern "C"
4991#endif
4992char setsockopt ();
4993int
4994main ()
4995{
4996return setsockopt ();
4997  ;
4998  return 0;
4999}
5000_ACEOF
5001if ac_fn_c_try_link "$LINENO"; then :
5002  ac_cv_lib_socket_setsockopt=yes
5003else
5004  ac_cv_lib_socket_setsockopt=no
5005fi
5006rm -f core conftest.err conftest.$ac_objext \
5007    conftest$ac_exeext conftest.$ac_ext
5008LIBS=$ac_check_lib_save_LIBS
5009fi
5010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_setsockopt" >&5
5011$as_echo "$ac_cv_lib_socket_setsockopt" >&6; }
5012if test "x$ac_cv_lib_socket_setsockopt" = xyes; then :
5013  LIBS="$LIBS -lsocket"
5014else
5015  tcl_checkBoth=1
5016fi
5017
5018fi
5019
5020    fi
5021    if test "$tcl_checkBoth" = 1; then
5022	tk_oldLibs=$LIBS
5023	LIBS="$LIBS -lsocket -lnsl"
5024	ac_fn_c_check_func "$LINENO" "accept" "ac_cv_func_accept"
5025if test "x$ac_cv_func_accept" = xyes; then :
5026  tcl_checkNsl=0
5027else
5028  LIBS=$tk_oldLibs
5029fi
5030
5031    fi
5032    ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
5033if test "x$ac_cv_func_gethostbyname" = xyes; then :
5034
5035else
5036  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
5037$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
5038if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
5039  $as_echo_n "(cached) " >&6
5040else
5041  ac_check_lib_save_LIBS=$LIBS
5042LIBS="-lnsl  $LIBS"
5043cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5044/* end confdefs.h.  */
5045
5046/* Override any GCC internal prototype to avoid an error.
5047   Use char because int might match the return type of a GCC
5048   builtin and then its argument prototype would still apply.  */
5049#ifdef __cplusplus
5050extern "C"
5051#endif
5052char gethostbyname ();
5053int
5054main ()
5055{
5056return gethostbyname ();
5057  ;
5058  return 0;
5059}
5060_ACEOF
5061if ac_fn_c_try_link "$LINENO"; then :
5062  ac_cv_lib_nsl_gethostbyname=yes
5063else
5064  ac_cv_lib_nsl_gethostbyname=no
5065fi
5066rm -f core conftest.err conftest.$ac_objext \
5067    conftest$ac_exeext conftest.$ac_ext
5068LIBS=$ac_check_lib_save_LIBS
5069fi
5070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
5071$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
5072if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
5073  LIBS="$LIBS -lnsl"
5074fi
5075
5076fi
5077
5078
5079    # TEA specific: Don't perform the eval of the libraries here because
5080    # DL_LIBS won't be set until we call TEA_CONFIG_CFLAGS
5081
5082    TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}'
5083
5084
5085
5086
5087    { $as_echo "$as_me:${as_lineno-$LINENO}: checking dirent.h" >&5
5088$as_echo_n "checking dirent.h... " >&6; }
5089if ${tcl_cv_dirent_h+:} false; then :
5090  $as_echo_n "(cached) " >&6
5091else
5092
5093    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5094/* end confdefs.h.  */
5095#include <sys/types.h>
5096#include <dirent.h>
5097int
5098main ()
5099{
5100
5101#ifndef _POSIX_SOURCE
5102#   ifdef __Lynx__
5103	/*
5104	 * Generate compilation error to make the test fail:  Lynx headers
5105	 * are only valid if really in the POSIX environment.
5106	 */
5107
5108	missing_procedure();
5109#   endif
5110#endif
5111DIR *d;
5112struct dirent *entryPtr;
5113char *p;
5114d = opendir("foobar");
5115entryPtr = readdir(d);
5116p = entryPtr->d_name;
5117closedir(d);
5118
5119  ;
5120  return 0;
5121}
5122_ACEOF
5123if ac_fn_c_try_link "$LINENO"; then :
5124  tcl_cv_dirent_h=yes
5125else
5126  tcl_cv_dirent_h=no
5127fi
5128rm -f core conftest.err conftest.$ac_objext \
5129    conftest$ac_exeext conftest.$ac_ext
5130fi
5131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_dirent_h" >&5
5132$as_echo "$tcl_cv_dirent_h" >&6; }
5133
5134    if test $tcl_cv_dirent_h = no; then
5135
5136$as_echo "#define NO_DIRENT_H 1" >>confdefs.h
5137
5138    fi
5139
5140    # TEA specific:
5141    ac_fn_c_check_header_mongrel "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default"
5142if test "x$ac_cv_header_errno_h" = xyes; then :
5143
5144else
5145
5146$as_echo "#define NO_ERRNO_H 1" >>confdefs.h
5147
5148fi
5149
5150
5151    ac_fn_c_check_header_mongrel "$LINENO" "float.h" "ac_cv_header_float_h" "$ac_includes_default"
5152if test "x$ac_cv_header_float_h" = xyes; then :
5153
5154else
5155
5156$as_echo "#define NO_FLOAT_H 1" >>confdefs.h
5157
5158fi
5159
5160
5161    ac_fn_c_check_header_mongrel "$LINENO" "values.h" "ac_cv_header_values_h" "$ac_includes_default"
5162if test "x$ac_cv_header_values_h" = xyes; then :
5163
5164else
5165
5166$as_echo "#define NO_VALUES_H 1" >>confdefs.h
5167
5168fi
5169
5170
5171    ac_fn_c_check_header_mongrel "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default"
5172if test "x$ac_cv_header_limits_h" = xyes; then :
5173
5174$as_echo "#define HAVE_LIMITS_H 1" >>confdefs.h
5175
5176else
5177
5178$as_echo "#define NO_LIMITS_H 1" >>confdefs.h
5179
5180fi
5181
5182
5183    ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
5184if test "x$ac_cv_header_stdlib_h" = xyes; then :
5185  tcl_ok=1
5186else
5187  tcl_ok=0
5188fi
5189
5190
5191    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5192/* end confdefs.h.  */
5193#include <stdlib.h>
5194
5195_ACEOF
5196if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5197  $EGREP "strtol" >/dev/null 2>&1; then :
5198
5199else
5200  tcl_ok=0
5201fi
5202rm -f conftest*
5203
5204    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5205/* end confdefs.h.  */
5206#include <stdlib.h>
5207
5208_ACEOF
5209if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5210  $EGREP "strtoul" >/dev/null 2>&1; then :
5211
5212else
5213  tcl_ok=0
5214fi
5215rm -f conftest*
5216
5217    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5218/* end confdefs.h.  */
5219#include <stdlib.h>
5220
5221_ACEOF
5222if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5223  $EGREP "strtod" >/dev/null 2>&1; then :
5224
5225else
5226  tcl_ok=0
5227fi
5228rm -f conftest*
5229
5230    if test $tcl_ok = 0; then
5231
5232$as_echo "#define NO_STDLIB_H 1" >>confdefs.h
5233
5234    fi
5235    ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default"
5236if test "x$ac_cv_header_string_h" = xyes; then :
5237  tcl_ok=1
5238else
5239  tcl_ok=0
5240fi
5241
5242
5243    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5244/* end confdefs.h.  */
5245#include <string.h>
5246
5247_ACEOF
5248if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5249  $EGREP "strstr" >/dev/null 2>&1; then :
5250
5251else
5252  tcl_ok=0
5253fi
5254rm -f conftest*
5255
5256    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5257/* end confdefs.h.  */
5258#include <string.h>
5259
5260_ACEOF
5261if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5262  $EGREP "strerror" >/dev/null 2>&1; then :
5263
5264else
5265  tcl_ok=0
5266fi
5267rm -f conftest*
5268
5269
5270    # See also memmove check below for a place where NO_STRING_H can be
5271    # set and why.
5272
5273    if test $tcl_ok = 0; then
5274
5275$as_echo "#define NO_STRING_H 1" >>confdefs.h
5276
5277    fi
5278
5279    ac_fn_c_check_header_mongrel "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default"
5280if test "x$ac_cv_header_sys_wait_h" = xyes; then :
5281
5282else
5283
5284$as_echo "#define NO_SYS_WAIT_H 1" >>confdefs.h
5285
5286fi
5287
5288
5289    ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
5290if test "x$ac_cv_header_dlfcn_h" = xyes; then :
5291
5292else
5293
5294$as_echo "#define NO_DLFCN_H 1" >>confdefs.h
5295
5296fi
5297
5298
5299
5300    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
5301    for ac_header in sys/param.h
5302do :
5303  ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
5304if test "x$ac_cv_header_sys_param_h" = xyes; then :
5305  cat >>confdefs.h <<_ACEOF
5306#define HAVE_SYS_PARAM_H 1
5307_ACEOF
5308
5309fi
5310
5311done
5312
5313
5314	# Let the user call this, because if it triggers, they will
5315	# need a compat/strtod.c that is correct.  Users can also
5316	# use Tcl_GetDouble(FromObj) instead.
5317	#TEA_BUGGY_STRTOD
5318    fi
5319
5320
5321#-----------------------------------------------------------------------
5322# __CHANGE__
5323# Specify the C source files to compile in TEA_ADD_SOURCES,
5324# public headers that need to be installed in TEA_ADD_HEADERS,
5325# stub library C source files to compile in TEA_ADD_STUB_SOURCES,
5326# and runtime Tcl library files in TEA_ADD_TCL_SOURCES.
5327# This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS
5328# and PKG_TCL_SOURCES.
5329#-----------------------------------------------------------------------
5330
5331
5332    vars="tclsqlite3.c"
5333    for i in $vars; do
5334	case $i in
5335	    \$*)
5336		# allow $-var names
5337		PKG_SOURCES="$PKG_SOURCES $i"
5338		PKG_OBJECTS="$PKG_OBJECTS $i"
5339		;;
5340	    *)
5341		# check for existence - allows for generic/win/unix VPATH
5342		# To add more dirs here (like 'src'), you have to update VPATH
5343		# in Makefile.in as well
5344		if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
5345		    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
5346		    -a ! -f "${srcdir}/macosx/$i" \
5347		    ; then
5348		    as_fn_error $? "could not find source file '$i'" "$LINENO" 5
5349		fi
5350		PKG_SOURCES="$PKG_SOURCES $i"
5351		# this assumes it is in a VPATH dir
5352		i=`basename $i`
5353		# handle user calling this before or after TEA_SETUP_COMPILER
5354		if test x"${OBJEXT}" != x ; then
5355		    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
5356		else
5357		    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
5358		fi
5359		PKG_OBJECTS="$PKG_OBJECTS $j"
5360		;;
5361	esac
5362    done
5363
5364
5365
5366
5367    vars=""
5368    for i in $vars; do
5369	# check for existence, be strict because it is installed
5370	if test ! -f "${srcdir}/$i" ; then
5371	    as_fn_error $? "could not find header file '${srcdir}/$i'" "$LINENO" 5
5372	fi
5373	PKG_HEADERS="$PKG_HEADERS $i"
5374    done
5375
5376
5377
5378    vars="-I\"`\${CYGPATH} \${srcdir}/generic`\""
5379    for i in $vars; do
5380	PKG_INCLUDES="$PKG_INCLUDES $i"
5381    done
5382
5383
5384
5385    vars=""
5386    for i in $vars; do
5387	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
5388	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
5389	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
5390	fi
5391	PKG_LIBS="$PKG_LIBS $i"
5392    done
5393
5394
5395
5396    PKG_CFLAGS="$PKG_CFLAGS -DSQLITE_ENABLE_FTS3=1"
5397
5398
5399
5400    PKG_CFLAGS="$PKG_CFLAGS -DSQLITE_3_SUFFIX_ONLY=1"
5401
5402
5403
5404    PKG_CFLAGS="$PKG_CFLAGS -DSQLITE_ENABLE_RTREE=1"
5405
5406
5407
5408    vars=""
5409    for i in $vars; do
5410	# check for existence - allows for generic/win/unix VPATH
5411	if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
5412	    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
5413	    -a ! -f "${srcdir}/macosx/$i" \
5414	    ; then
5415	    as_fn_error $? "could not find stub source file '$i'" "$LINENO" 5
5416	fi
5417	PKG_STUB_SOURCES="$PKG_STUB_SOURCES $i"
5418	# this assumes it is in a VPATH dir
5419	i=`basename $i`
5420	# handle user calling this before or after TEA_SETUP_COMPILER
5421	if test x"${OBJEXT}" != x ; then
5422	    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
5423	else
5424	    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
5425	fi
5426	PKG_STUB_OBJECTS="$PKG_STUB_OBJECTS $j"
5427    done
5428
5429
5430
5431
5432    vars=""
5433    for i in $vars; do
5434	# check for existence, be strict because it is installed
5435	if test ! -f "${srcdir}/$i" ; then
5436	    as_fn_error $? "could not find tcl source file '${srcdir}/$i'" "$LINENO" 5
5437	fi
5438	PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
5439    done
5440
5441
5442
5443#--------------------------------------------------------------------
5444# The --with-system-sqlite causes the TCL bindings to SQLite to use
5445# the system shared library for SQLite rather than statically linking
5446# against its own private copy.  This is dangerous and leads to
5447# undersirable dependences and is not recommended.
5448# Patchs from rmax.
5449#--------------------------------------------------------------------
5450
5451# Check whether --with-system-sqlite was given.
5452if test "${with_system_sqlite+set}" = set; then :
5453  withval=$with_system_sqlite;
5454else
5455  with_system_sqlite=no
5456fi
5457
5458if test x$with_system_sqlite != xno; then
5459 ac_fn_c_check_header_mongrel "$LINENO" "sqlite3.h" "ac_cv_header_sqlite3_h" "$ac_includes_default"
5460if test "x$ac_cv_header_sqlite3_h" = xyes; then :
5461  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_initialize in -lsqlite3" >&5
5462$as_echo_n "checking for sqlite3_initialize in -lsqlite3... " >&6; }
5463if ${ac_cv_lib_sqlite3_sqlite3_initialize+:} false; then :
5464  $as_echo_n "(cached) " >&6
5465else
5466  ac_check_lib_save_LIBS=$LIBS
5467LIBS="-lsqlite3  $LIBS"
5468cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5469/* end confdefs.h.  */
5470
5471/* Override any GCC internal prototype to avoid an error.
5472   Use char because int might match the return type of a GCC
5473   builtin and then its argument prototype would still apply.  */
5474#ifdef __cplusplus
5475extern "C"
5476#endif
5477char sqlite3_initialize ();
5478int
5479main ()
5480{
5481return sqlite3_initialize ();
5482  ;
5483  return 0;
5484}
5485_ACEOF
5486if ac_fn_c_try_link "$LINENO"; then :
5487  ac_cv_lib_sqlite3_sqlite3_initialize=yes
5488else
5489  ac_cv_lib_sqlite3_sqlite3_initialize=no
5490fi
5491rm -f core conftest.err conftest.$ac_objext \
5492    conftest$ac_exeext conftest.$ac_ext
5493LIBS=$ac_check_lib_save_LIBS
5494fi
5495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_initialize" >&5
5496$as_echo "$ac_cv_lib_sqlite3_sqlite3_initialize" >&6; }
5497if test "x$ac_cv_lib_sqlite3_sqlite3_initialize" = xyes; then :
5498  $as_echo "#define USE_SYSTEM_SQLITE 1" >>confdefs.h
5499
5500      LIBS="$LIBS -lsqlite3"
5501fi
5502
5503fi
5504
5505
5506fi
5507
5508#--------------------------------------------------------------------
5509# __CHANGE__
5510# Choose which headers you need.  Extension authors should try very
5511# hard to only rely on the Tcl public header files.  Internal headers
5512# contain private data structures and are subject to change without
5513# notice.
5514# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
5515#--------------------------------------------------------------------
5516
5517
5518    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl public headers" >&5
5519$as_echo_n "checking for Tcl public headers... " >&6; }
5520
5521
5522# Check whether --with-tclinclude was given.
5523if test "${with_tclinclude+set}" = set; then :
5524  withval=$with_tclinclude; with_tclinclude=${withval}
5525fi
5526
5527
5528    if ${ac_cv_c_tclh+:} false; then :
5529  $as_echo_n "(cached) " >&6
5530else
5531
5532	# Use the value from --with-tclinclude, if it was given
5533
5534	if test x"${with_tclinclude}" != x ; then
5535	    if test -f "${with_tclinclude}/tcl.h" ; then
5536		ac_cv_c_tclh=${with_tclinclude}
5537	    else
5538		as_fn_error $? "${with_tclinclude} directory does not contain tcl.h" "$LINENO" 5
5539	    fi
5540	else
5541	    list=""
5542	    if test "`uname -s`" = "Darwin"; then
5543		# If Tcl was built as a framework, attempt to use
5544		# the framework's Headers directory
5545		case ${TCL_DEFS} in
5546		    *TCL_FRAMEWORK*)
5547			list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
5548			;;
5549		esac
5550	    fi
5551
5552	    # Look in the source dir only if Tcl is not installed,
5553	    # and in that situation, look there before installed locations.
5554	    if test -f "${TCL_BIN_DIR}/Makefile" ; then
5555		list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
5556	    fi
5557
5558	    # Check order: pkg --prefix location, Tcl's --prefix location,
5559	    # relative to directory of tclConfig.sh.
5560
5561	    eval "temp_includedir=${includedir}"
5562	    list="$list \
5563		`ls -d ${temp_includedir}        2>/dev/null` \
5564		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
5565		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
5566	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
5567		list="$list /usr/local/include /usr/include"
5568		if test x"${TCL_INCLUDE_SPEC}" != x ; then
5569		    d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
5570		    list="$list `ls -d ${d} 2>/dev/null`"
5571		fi
5572	    fi
5573	    for i in $list ; do
5574		if test -f "$i/tcl.h" ; then
5575		    ac_cv_c_tclh=$i
5576		    break
5577		fi
5578	    done
5579	fi
5580
5581fi
5582
5583
5584    # Print a message based on how we determined the include path
5585
5586    if test x"${ac_cv_c_tclh}" = x ; then
5587	as_fn_error $? "tcl.h not found.  Please specify its location with --with-tclinclude" "$LINENO" 5
5588    else
5589	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_c_tclh}" >&5
5590$as_echo "${ac_cv_c_tclh}" >&6; }
5591    fi
5592
5593    # Convert to a native path and substitute into the output files.
5594
5595    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
5596
5597    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
5598
5599
5600
5601#TEA_PRIVATE_TCL_HEADERS
5602
5603#TEA_PUBLIC_TK_HEADERS
5604#TEA_PRIVATE_TK_HEADERS
5605#TEA_PATH_X
5606
5607#--------------------------------------------------------------------
5608# Check whether --enable-threads or --disable-threads was given.
5609# This auto-enables if Tcl was compiled threaded.
5610#--------------------------------------------------------------------
5611
5612
5613    # Check whether --enable-threads was given.
5614if test "${enable_threads+set}" = set; then :
5615  enableval=$enable_threads; tcl_ok=$enableval
5616else
5617  tcl_ok=yes
5618fi
5619
5620
5621    if test "${enable_threads+set}" = set; then
5622	enableval="$enable_threads"
5623	tcl_ok=$enableval
5624    else
5625	tcl_ok=yes
5626    fi
5627
5628    if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
5629	TCL_THREADS=1
5630
5631	if test "${TEA_PLATFORM}" != "windows" ; then
5632	    # We are always OK on Windows, so check what this platform wants:
5633
5634	    # USE_THREAD_ALLOC tells us to try the special thread-based
5635	    # allocator that significantly reduces lock contention
5636
5637$as_echo "#define USE_THREAD_ALLOC 1" >>confdefs.h
5638
5639
5640$as_echo "#define _REENTRANT 1" >>confdefs.h
5641
5642	    if test "`uname -s`" = "SunOS" ; then
5643
5644$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5645
5646	    fi
5647
5648$as_echo "#define _THREAD_SAFE 1" >>confdefs.h
5649
5650	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthread" >&5
5651$as_echo_n "checking for pthread_mutex_init in -lpthread... " >&6; }
5652if ${ac_cv_lib_pthread_pthread_mutex_init+:} false; then :
5653  $as_echo_n "(cached) " >&6
5654else
5655  ac_check_lib_save_LIBS=$LIBS
5656LIBS="-lpthread  $LIBS"
5657cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5658/* end confdefs.h.  */
5659
5660/* Override any GCC internal prototype to avoid an error.
5661   Use char because int might match the return type of a GCC
5662   builtin and then its argument prototype would still apply.  */
5663#ifdef __cplusplus
5664extern "C"
5665#endif
5666char pthread_mutex_init ();
5667int
5668main ()
5669{
5670return pthread_mutex_init ();
5671  ;
5672  return 0;
5673}
5674_ACEOF
5675if ac_fn_c_try_link "$LINENO"; then :
5676  ac_cv_lib_pthread_pthread_mutex_init=yes
5677else
5678  ac_cv_lib_pthread_pthread_mutex_init=no
5679fi
5680rm -f core conftest.err conftest.$ac_objext \
5681    conftest$ac_exeext conftest.$ac_ext
5682LIBS=$ac_check_lib_save_LIBS
5683fi
5684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5
5685$as_echo "$ac_cv_lib_pthread_pthread_mutex_init" >&6; }
5686if test "x$ac_cv_lib_pthread_pthread_mutex_init" = xyes; then :
5687  tcl_ok=yes
5688else
5689  tcl_ok=no
5690fi
5691
5692	    if test "$tcl_ok" = "no"; then
5693		# Check a little harder for __pthread_mutex_init in the same
5694		# library, as some systems hide it there until pthread.h is
5695		# defined.  We could alternatively do an AC_TRY_COMPILE with
5696		# pthread.h, but that will work with libpthread really doesn't
5697		# exist, like AIX 4.2.  [Bug: 4359]
5698		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_mutex_init in -lpthread" >&5
5699$as_echo_n "checking for __pthread_mutex_init in -lpthread... " >&6; }
5700if ${ac_cv_lib_pthread___pthread_mutex_init+:} false; then :
5701  $as_echo_n "(cached) " >&6
5702else
5703  ac_check_lib_save_LIBS=$LIBS
5704LIBS="-lpthread  $LIBS"
5705cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5706/* end confdefs.h.  */
5707
5708/* Override any GCC internal prototype to avoid an error.
5709   Use char because int might match the return type of a GCC
5710   builtin and then its argument prototype would still apply.  */
5711#ifdef __cplusplus
5712extern "C"
5713#endif
5714char __pthread_mutex_init ();
5715int
5716main ()
5717{
5718return __pthread_mutex_init ();
5719  ;
5720  return 0;
5721}
5722_ACEOF
5723if ac_fn_c_try_link "$LINENO"; then :
5724  ac_cv_lib_pthread___pthread_mutex_init=yes
5725else
5726  ac_cv_lib_pthread___pthread_mutex_init=no
5727fi
5728rm -f core conftest.err conftest.$ac_objext \
5729    conftest$ac_exeext conftest.$ac_ext
5730LIBS=$ac_check_lib_save_LIBS
5731fi
5732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5
5733$as_echo "$ac_cv_lib_pthread___pthread_mutex_init" >&6; }
5734if test "x$ac_cv_lib_pthread___pthread_mutex_init" = xyes; then :
5735  tcl_ok=yes
5736else
5737  tcl_ok=no
5738fi
5739
5740	    fi
5741
5742	    if test "$tcl_ok" = "yes"; then
5743		# The space is needed
5744		THREADS_LIBS=" -lpthread"
5745	    else
5746		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthreads" >&5
5747$as_echo_n "checking for pthread_mutex_init in -lpthreads... " >&6; }
5748if ${ac_cv_lib_pthreads_pthread_mutex_init+:} false; then :
5749  $as_echo_n "(cached) " >&6
5750else
5751  ac_check_lib_save_LIBS=$LIBS
5752LIBS="-lpthreads  $LIBS"
5753cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5754/* end confdefs.h.  */
5755
5756/* Override any GCC internal prototype to avoid an error.
5757   Use char because int might match the return type of a GCC
5758   builtin and then its argument prototype would still apply.  */
5759#ifdef __cplusplus
5760extern "C"
5761#endif
5762char pthread_mutex_init ();
5763int
5764main ()
5765{
5766return pthread_mutex_init ();
5767  ;
5768  return 0;
5769}
5770_ACEOF
5771if ac_fn_c_try_link "$LINENO"; then :
5772  ac_cv_lib_pthreads_pthread_mutex_init=yes
5773else
5774  ac_cv_lib_pthreads_pthread_mutex_init=no
5775fi
5776rm -f core conftest.err conftest.$ac_objext \
5777    conftest$ac_exeext conftest.$ac_ext
5778LIBS=$ac_check_lib_save_LIBS
5779fi
5780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5
5781$as_echo "$ac_cv_lib_pthreads_pthread_mutex_init" >&6; }
5782if test "x$ac_cv_lib_pthreads_pthread_mutex_init" = xyes; then :
5783  tcl_ok=yes
5784else
5785  tcl_ok=no
5786fi
5787
5788		if test "$tcl_ok" = "yes"; then
5789		    # The space is needed
5790		    THREADS_LIBS=" -lpthreads"
5791		else
5792		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lc" >&5
5793$as_echo_n "checking for pthread_mutex_init in -lc... " >&6; }
5794if ${ac_cv_lib_c_pthread_mutex_init+:} false; then :
5795  $as_echo_n "(cached) " >&6
5796else
5797  ac_check_lib_save_LIBS=$LIBS
5798LIBS="-lc  $LIBS"
5799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5800/* end confdefs.h.  */
5801
5802/* Override any GCC internal prototype to avoid an error.
5803   Use char because int might match the return type of a GCC
5804   builtin and then its argument prototype would still apply.  */
5805#ifdef __cplusplus
5806extern "C"
5807#endif
5808char pthread_mutex_init ();
5809int
5810main ()
5811{
5812return pthread_mutex_init ();
5813  ;
5814  return 0;
5815}
5816_ACEOF
5817if ac_fn_c_try_link "$LINENO"; then :
5818  ac_cv_lib_c_pthread_mutex_init=yes
5819else
5820  ac_cv_lib_c_pthread_mutex_init=no
5821fi
5822rm -f core conftest.err conftest.$ac_objext \
5823    conftest$ac_exeext conftest.$ac_ext
5824LIBS=$ac_check_lib_save_LIBS
5825fi
5826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_pthread_mutex_init" >&5
5827$as_echo "$ac_cv_lib_c_pthread_mutex_init" >&6; }
5828if test "x$ac_cv_lib_c_pthread_mutex_init" = xyes; then :
5829  tcl_ok=yes
5830else
5831  tcl_ok=no
5832fi
5833
5834		    if test "$tcl_ok" = "no"; then
5835			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lc_r" >&5
5836$as_echo_n "checking for pthread_mutex_init in -lc_r... " >&6; }
5837if ${ac_cv_lib_c_r_pthread_mutex_init+:} false; then :
5838  $as_echo_n "(cached) " >&6
5839else
5840  ac_check_lib_save_LIBS=$LIBS
5841LIBS="-lc_r  $LIBS"
5842cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5843/* end confdefs.h.  */
5844
5845/* Override any GCC internal prototype to avoid an error.
5846   Use char because int might match the return type of a GCC
5847   builtin and then its argument prototype would still apply.  */
5848#ifdef __cplusplus
5849extern "C"
5850#endif
5851char pthread_mutex_init ();
5852int
5853main ()
5854{
5855return pthread_mutex_init ();
5856  ;
5857  return 0;
5858}
5859_ACEOF
5860if ac_fn_c_try_link "$LINENO"; then :
5861  ac_cv_lib_c_r_pthread_mutex_init=yes
5862else
5863  ac_cv_lib_c_r_pthread_mutex_init=no
5864fi
5865rm -f core conftest.err conftest.$ac_objext \
5866    conftest$ac_exeext conftest.$ac_ext
5867LIBS=$ac_check_lib_save_LIBS
5868fi
5869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5
5870$as_echo "$ac_cv_lib_c_r_pthread_mutex_init" >&6; }
5871if test "x$ac_cv_lib_c_r_pthread_mutex_init" = xyes; then :
5872  tcl_ok=yes
5873else
5874  tcl_ok=no
5875fi
5876
5877			if test "$tcl_ok" = "yes"; then
5878			    # The space is needed
5879			    THREADS_LIBS=" -pthread"
5880			else
5881			    TCL_THREADS=0
5882			    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&5
5883$as_echo "$as_me: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&2;}
5884			fi
5885		    fi
5886		fi
5887	    fi
5888	fi
5889    else
5890	TCL_THREADS=0
5891    fi
5892    # Do checking message here to not mess up interleaved configure output
5893    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for building with threads" >&5
5894$as_echo_n "checking for building with threads... " >&6; }
5895    if test "${TCL_THREADS}" = 1; then
5896
5897$as_echo "#define TCL_THREADS 1" >>confdefs.h
5898
5899	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
5900$as_echo "yes (default)" >&6; }
5901    else
5902	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5903$as_echo "no" >&6; }
5904    fi
5905    # TCL_THREADS sanity checking.  See if our request for building with
5906    # threads is the same as the way Tcl was built.  If not, warn the user.
5907    case ${TCL_DEFS} in
5908	*THREADS=1*)
5909	    if test "${TCL_THREADS}" = "0"; then
5910		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
5911    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
5912    that IS thread-enabled.  It is recommended to use --enable-threads." >&5
5913$as_echo "$as_me: WARNING:
5914    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
5915    that IS thread-enabled.  It is recommended to use --enable-threads." >&2;}
5916	    fi
5917	    ;;
5918	*)
5919	    if test "${TCL_THREADS}" = "1"; then
5920		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
5921    --enable-threads requested, but building against a Tcl that is NOT
5922    thread-enabled.  This is an OK configuration that will also run in
5923    a thread-enabled core." >&5
5924$as_echo "$as_me: WARNING:
5925    --enable-threads requested, but building against a Tcl that is NOT
5926    thread-enabled.  This is an OK configuration that will also run in
5927    a thread-enabled core." >&2;}
5928	    fi
5929	    ;;
5930    esac
5931
5932
5933if test "${TCL_THREADS}" = "1" ; then
5934
5935$as_echo "#define SQLITE_THREADSAFE 1" >>confdefs.h
5936
5937    # Not automatically added by Tcl because its assumed Tcl links to them,
5938    # but it may not if it isn't really a threaded build.
5939
5940    vars="$THREADS_LIBS"
5941    for i in $vars; do
5942	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
5943	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
5944	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
5945	fi
5946	PKG_LIBS="$PKG_LIBS $i"
5947    done
5948
5949
5950else
5951
5952$as_echo "#define SQLITE_THREADSAFE 0" >>confdefs.h
5953
5954fi
5955
5956#--------------------------------------------------------------------
5957# The statement below defines a collection of symbols related to
5958# building as a shared library instead of a static library.
5959#--------------------------------------------------------------------
5960
5961
5962    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to build libraries" >&5
5963$as_echo_n "checking how to build libraries... " >&6; }
5964    # Check whether --enable-shared was given.
5965if test "${enable_shared+set}" = set; then :
5966  enableval=$enable_shared; tcl_ok=$enableval
5967else
5968  tcl_ok=yes
5969fi
5970
5971
5972    if test "${enable_shared+set}" = set; then
5973	enableval="$enable_shared"
5974	tcl_ok=$enableval
5975    else
5976	tcl_ok=yes
5977    fi
5978
5979    if test "$tcl_ok" = "yes" ; then
5980	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: shared" >&5
5981$as_echo "shared" >&6; }
5982	SHARED_BUILD=1
5983    else
5984	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
5985$as_echo "static" >&6; }
5986	SHARED_BUILD=0
5987
5988$as_echo "#define STATIC_BUILD 1" >>confdefs.h
5989
5990    fi
5991
5992
5993
5994#--------------------------------------------------------------------
5995# This macro figures out what flags to use with the compiler/linker
5996# when building shared/static debug/optimized objects.  This information
5997# can be taken from the tclConfig.sh file, but this figures it all out.
5998#--------------------------------------------------------------------
5999
6000if test -n "$ac_tool_prefix"; then
6001  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6002set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6004$as_echo_n "checking for $ac_word... " >&6; }
6005if ${ac_cv_prog_RANLIB+:} false; then :
6006  $as_echo_n "(cached) " >&6
6007else
6008  if test -n "$RANLIB"; then
6009  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6010else
6011as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6012for as_dir in $PATH
6013do
6014  IFS=$as_save_IFS
6015  test -z "$as_dir" && as_dir=.
6016    for ac_exec_ext in '' $ac_executable_extensions; do
6017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6018    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6020    break 2
6021  fi
6022done
6023  done
6024IFS=$as_save_IFS
6025
6026fi
6027fi
6028RANLIB=$ac_cv_prog_RANLIB
6029if test -n "$RANLIB"; then
6030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6031$as_echo "$RANLIB" >&6; }
6032else
6033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6034$as_echo "no" >&6; }
6035fi
6036
6037
6038fi
6039if test -z "$ac_cv_prog_RANLIB"; then
6040  ac_ct_RANLIB=$RANLIB
6041  # Extract the first word of "ranlib", so it can be a program name with args.
6042set dummy ranlib; ac_word=$2
6043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6044$as_echo_n "checking for $ac_word... " >&6; }
6045if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6046  $as_echo_n "(cached) " >&6
6047else
6048  if test -n "$ac_ct_RANLIB"; then
6049  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6050else
6051as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6052for as_dir in $PATH
6053do
6054  IFS=$as_save_IFS
6055  test -z "$as_dir" && as_dir=.
6056    for ac_exec_ext in '' $ac_executable_extensions; do
6057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6058    ac_cv_prog_ac_ct_RANLIB="ranlib"
6059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6060    break 2
6061  fi
6062done
6063  done
6064IFS=$as_save_IFS
6065
6066fi
6067fi
6068ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6069if test -n "$ac_ct_RANLIB"; then
6070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6071$as_echo "$ac_ct_RANLIB" >&6; }
6072else
6073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6074$as_echo "no" >&6; }
6075fi
6076
6077  if test "x$ac_ct_RANLIB" = x; then
6078    RANLIB=":"
6079  else
6080    case $cross_compiling:$ac_tool_warned in
6081yes:)
6082{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6083$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6084ac_tool_warned=yes ;;
6085esac
6086    RANLIB=$ac_ct_RANLIB
6087  fi
6088else
6089  RANLIB="$ac_cv_prog_RANLIB"
6090fi
6091
6092
6093
6094
6095    # Step 0.a: Enable 64 bit support?
6096
6097    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 64bit support is requested" >&5
6098$as_echo_n "checking if 64bit support is requested... " >&6; }
6099    # Check whether --enable-64bit was given.
6100if test "${enable_64bit+set}" = set; then :
6101  enableval=$enable_64bit; do64bit=$enableval
6102else
6103  do64bit=no
6104fi
6105
6106    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $do64bit" >&5
6107$as_echo "$do64bit" >&6; }
6108
6109    # Step 0.b: Enable Solaris 64 bit VIS support?
6110
6111    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 64bit Sparc VIS support is requested" >&5
6112$as_echo_n "checking if 64bit Sparc VIS support is requested... " >&6; }
6113    # Check whether --enable-64bit-vis was given.
6114if test "${enable_64bit_vis+set}" = set; then :
6115  enableval=$enable_64bit_vis; do64bitVIS=$enableval
6116else
6117  do64bitVIS=no
6118fi
6119
6120    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $do64bitVIS" >&5
6121$as_echo "$do64bitVIS" >&6; }
6122    # Force 64bit on with VIS
6123    if test "$do64bitVIS" = "yes"; then :
6124  do64bit=yes
6125fi
6126
6127    # Step 0.c: Check if visibility support is available. Do this here so
6128    # that platform specific alternatives can be used below if this fails.
6129
6130    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports visibility \"hidden\"" >&5
6131$as_echo_n "checking if compiler supports visibility \"hidden\"... " >&6; }
6132if ${tcl_cv_cc_visibility_hidden+:} false; then :
6133  $as_echo_n "(cached) " >&6
6134else
6135
6136	hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
6137	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6138/* end confdefs.h.  */
6139
6140	    extern __attribute__((__visibility__("hidden"))) void f(void);
6141	    void f(void) {}
6142int
6143main ()
6144{
6145f();
6146  ;
6147  return 0;
6148}
6149_ACEOF
6150if ac_fn_c_try_link "$LINENO"; then :
6151  tcl_cv_cc_visibility_hidden=yes
6152else
6153  tcl_cv_cc_visibility_hidden=no
6154fi
6155rm -f core conftest.err conftest.$ac_objext \
6156    conftest$ac_exeext conftest.$ac_ext
6157	CFLAGS=$hold_cflags
6158fi
6159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_visibility_hidden" >&5
6160$as_echo "$tcl_cv_cc_visibility_hidden" >&6; }
6161    if test $tcl_cv_cc_visibility_hidden = yes; then :
6162
6163
6164$as_echo "#define MODULE_SCOPE extern __attribute__((__visibility__(\"hidden\")))" >>confdefs.h
6165
6166
6167$as_echo "#define HAVE_HIDDEN 1" >>confdefs.h
6168
6169
6170fi
6171
6172    # Step 0.d: Disable -rpath support?
6173
6174    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if rpath support is requested" >&5
6175$as_echo_n "checking if rpath support is requested... " >&6; }
6176    # Check whether --enable-rpath was given.
6177if test "${enable_rpath+set}" = set; then :
6178  enableval=$enable_rpath; doRpath=$enableval
6179else
6180  doRpath=yes
6181fi
6182
6183    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doRpath" >&5
6184$as_echo "$doRpath" >&6; }
6185
6186    # TEA specific: Cross-compiling options for Windows/CE builds?
6187
6188    if test "${TEA_PLATFORM}" = windows; then :
6189
6190	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Windows/CE build is requested" >&5
6191$as_echo_n "checking if Windows/CE build is requested... " >&6; }
6192	# Check whether --enable-wince was given.
6193if test "${enable_wince+set}" = set; then :
6194  enableval=$enable_wince; doWince=$enableval
6195else
6196  doWince=no
6197fi
6198
6199	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $doWince" >&5
6200$as_echo "$doWince" >&6; }
6201
6202fi
6203
6204    # Set the variable "system" to hold the name and version number
6205    # for the system.
6206
6207
6208    { $as_echo "$as_me:${as_lineno-$LINENO}: checking system version" >&5
6209$as_echo_n "checking system version... " >&6; }
6210if ${tcl_cv_sys_version+:} false; then :
6211  $as_echo_n "(cached) " >&6
6212else
6213
6214	# TEA specific:
6215	if test "${TEA_PLATFORM}" = "windows" ; then
6216	    tcl_cv_sys_version=windows
6217	else
6218	    tcl_cv_sys_version=`uname -s`-`uname -r`
6219	    if test "$?" -ne 0 ; then
6220		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: can't find uname command" >&5
6221$as_echo "$as_me: WARNING: can't find uname command" >&2;}
6222		tcl_cv_sys_version=unknown
6223	    else
6224		if test "`uname -s`" = "AIX" ; then
6225		    tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
6226		fi
6227	    fi
6228	fi
6229
6230fi
6231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_sys_version" >&5
6232$as_echo "$tcl_cv_sys_version" >&6; }
6233    system=$tcl_cv_sys_version
6234
6235
6236    # Require ranlib early so we can override it in special cases below.
6237
6238
6239
6240    # Set configuration options based on system name and version.
6241    # This is similar to Tcl's unix/tcl.m4 except that we've added a
6242    # "windows" case and removed some core-only vars.
6243
6244    do64bit_ok=no
6245    # default to '{$LIBS}' and set to "" on per-platform necessary basis
6246    SHLIB_LD_LIBS='${LIBS}'
6247    # When ld needs options to work in 64-bit mode, put them in
6248    # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
6249    # is disabled by the user. [Bug 1016796]
6250    LDFLAGS_ARCH=""
6251    UNSHARED_LIB_SUFFIX=""
6252    # TEA specific: use PACKAGE_VERSION instead of VERSION
6253    TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
6254    ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
6255    TCL_LIB_VERSIONS_OK=ok
6256    CFLAGS_DEBUG=-g
6257    if test "$GCC" = yes; then :
6258
6259	CFLAGS_OPTIMIZE=-O2
6260	CFLAGS_WARNING="-Wall"
6261
6262else
6263
6264	CFLAGS_OPTIMIZE=-O
6265	CFLAGS_WARNING=""
6266
6267fi
6268    if test -n "$ac_tool_prefix"; then
6269  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6270set dummy ${ac_tool_prefix}ar; ac_word=$2
6271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6272$as_echo_n "checking for $ac_word... " >&6; }
6273if ${ac_cv_prog_AR+:} false; then :
6274  $as_echo_n "(cached) " >&6
6275else
6276  if test -n "$AR"; then
6277  ac_cv_prog_AR="$AR" # Let the user override the test.
6278else
6279as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6280for as_dir in $PATH
6281do
6282  IFS=$as_save_IFS
6283  test -z "$as_dir" && as_dir=.
6284    for ac_exec_ext in '' $ac_executable_extensions; do
6285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6286    ac_cv_prog_AR="${ac_tool_prefix}ar"
6287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6288    break 2
6289  fi
6290done
6291  done
6292IFS=$as_save_IFS
6293
6294fi
6295fi
6296AR=$ac_cv_prog_AR
6297if test -n "$AR"; then
6298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6299$as_echo "$AR" >&6; }
6300else
6301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6302$as_echo "no" >&6; }
6303fi
6304
6305
6306fi
6307if test -z "$ac_cv_prog_AR"; then
6308  ac_ct_AR=$AR
6309  # Extract the first word of "ar", so it can be a program name with args.
6310set dummy ar; ac_word=$2
6311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6312$as_echo_n "checking for $ac_word... " >&6; }
6313if ${ac_cv_prog_ac_ct_AR+:} false; then :
6314  $as_echo_n "(cached) " >&6
6315else
6316  if test -n "$ac_ct_AR"; then
6317  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6318else
6319as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6320for as_dir in $PATH
6321do
6322  IFS=$as_save_IFS
6323  test -z "$as_dir" && as_dir=.
6324    for ac_exec_ext in '' $ac_executable_extensions; do
6325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6326    ac_cv_prog_ac_ct_AR="ar"
6327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6328    break 2
6329  fi
6330done
6331  done
6332IFS=$as_save_IFS
6333
6334fi
6335fi
6336ac_ct_AR=$ac_cv_prog_ac_ct_AR
6337if test -n "$ac_ct_AR"; then
6338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6339$as_echo "$ac_ct_AR" >&6; }
6340else
6341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6342$as_echo "no" >&6; }
6343fi
6344
6345  if test "x$ac_ct_AR" = x; then
6346    AR=""
6347  else
6348    case $cross_compiling:$ac_tool_warned in
6349yes:)
6350{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6351$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6352ac_tool_warned=yes ;;
6353esac
6354    AR=$ac_ct_AR
6355  fi
6356else
6357  AR="$ac_cv_prog_AR"
6358fi
6359
6360    STLIB_LD='${AR} cr'
6361    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
6362    if test "x$SHLIB_VERSION" = x; then :
6363  SHLIB_VERSION="1.0"
6364fi
6365    case $system in
6366	# TEA specific:
6367	windows)
6368	    # This is a 2-stage check to make sure we have the 64-bit SDK
6369	    # We have to know where the SDK is installed.
6370	    # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
6371	    # MACHINE is IX86 for LINK, but this is used by the manifest,
6372	    # which requires x86|amd64|ia64.
6373	    MACHINE="X86"
6374	    if test "$do64bit" != "no" ; then
6375		if test "x${MSSDK}x" = "xx" ; then
6376		    MSSDK="C:/Progra~1/Microsoft Platform SDK"
6377		fi
6378		MSSDK=`echo "$MSSDK" | sed -e  's!\\\!/!g'`
6379		PATH64=""
6380		case "$do64bit" in
6381		    amd64|x64|yes)
6382			MACHINE="AMD64" ; # default to AMD64 64-bit build
6383			PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
6384			;;
6385		    ia64)
6386			MACHINE="IA64"
6387			PATH64="${MSSDK}/Bin/Win64"
6388			;;
6389		esac
6390		if test "$GCC" != "yes" -a ! -d "${PATH64}" ; then
6391		    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&5
6392$as_echo "$as_me: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&2;}
6393		    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ensure latest Platform SDK is installed" >&5
6394$as_echo "$as_me: WARNING: Ensure latest Platform SDK is installed" >&2;}
6395		    do64bit="no"
6396		else
6397		    { $as_echo "$as_me:${as_lineno-$LINENO}: result:    Using 64-bit $MACHINE mode" >&5
6398$as_echo "   Using 64-bit $MACHINE mode" >&6; }
6399		    do64bit_ok="yes"
6400		fi
6401	    fi
6402
6403	    if test "$doWince" != "no" ; then
6404		if test "$do64bit" != "no" ; then
6405		    as_fn_error $? "Windows/CE and 64-bit builds incompatible" "$LINENO" 5
6406		fi
6407		if test "$GCC" = "yes" ; then
6408		    as_fn_error $? "Windows/CE and GCC builds incompatible" "$LINENO" 5
6409		fi
6410
6411    # First, look for one uninstalled.
6412    # the alternative search directory is invoked by --with-celib
6413
6414    if test x"${no_celib}" = x ; then
6415	# we reset no_celib in case something fails here
6416	no_celib=true
6417
6418# Check whether --with-celib was given.
6419if test "${with_celib+set}" = set; then :
6420  withval=$with_celib; with_celibconfig=${withval}
6421fi
6422
6423	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Windows/CE celib directory" >&5
6424$as_echo_n "checking for Windows/CE celib directory... " >&6; }
6425	if ${ac_cv_c_celibconfig+:} false; then :
6426  $as_echo_n "(cached) " >&6
6427else
6428
6429	    # First check to see if --with-celibconfig was specified.
6430	    if test x"${with_celibconfig}" != x ; then
6431		if test -d "${with_celibconfig}/inc" ; then
6432		    ac_cv_c_celibconfig=`(cd ${with_celibconfig}; pwd)`
6433		else
6434		    as_fn_error $? "${with_celibconfig} directory doesn't contain inc directory" "$LINENO" 5
6435		fi
6436	    fi
6437
6438	    # then check for a celib library
6439	    if test x"${ac_cv_c_celibconfig}" = x ; then
6440		for i in \
6441			../celib-palm-3.0 \
6442			../celib \
6443			../../celib-palm-3.0 \
6444			../../celib \
6445			`ls -dr ../celib-*3.[0-9]* 2>/dev/null` \
6446			${srcdir}/../celib-palm-3.0 \
6447			${srcdir}/../celib \
6448			`ls -dr ${srcdir}/../celib-*3.[0-9]* 2>/dev/null` \
6449			; do
6450		    if test -d "$i/inc" ; then
6451			ac_cv_c_celibconfig=`(cd $i; pwd)`
6452			break
6453		    fi
6454		done
6455	    fi
6456
6457fi
6458
6459	if test x"${ac_cv_c_celibconfig}" = x ; then
6460	    as_fn_error $? "Cannot find celib support library directory" "$LINENO" 5
6461	else
6462	    no_celib=
6463	    CELIB_DIR=${ac_cv_c_celibconfig}
6464	    CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
6465	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found $CELIB_DIR" >&5
6466$as_echo "found $CELIB_DIR" >&6; }
6467	fi
6468    fi
6469
6470		# Set defaults for common evc4/PPC2003 setup
6471		# Currently Tcl requires 300+, possibly 420+ for sockets
6472		CEVERSION=420; 		# could be 211 300 301 400 420 ...
6473		TARGETCPU=ARMV4;	# could be ARMV4 ARM MIPS SH3 X86 ...
6474		ARCH=ARM;		# could be ARM MIPS X86EM ...
6475		PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002"
6476		if test "$doWince" != "yes"; then
6477		    # If !yes then the user specified something
6478		    # Reset ARCH to allow user to skip specifying it
6479		    ARCH=
6480		    eval `echo $doWince | awk -F, '{ \
6481	    if (length($1)) { printf "CEVERSION=\"%s\"\n", $1; \
6482	    if ($1 < 400)   { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \
6483	    if (length($2)) { printf "TARGETCPU=\"%s\"\n", toupper($2) }; \
6484	    if (length($3)) { printf "ARCH=\"%s\"\n", toupper($3) }; \
6485	    if (length($4)) { printf "PLATFORM=\"%s\"\n", $4 }; \
6486		    }'`
6487		    if test "x${ARCH}" = "x" ; then
6488			ARCH=$TARGETCPU;
6489		    fi
6490		fi
6491		OSVERSION=WCE$CEVERSION;
6492	    	if test "x${WCEROOT}" = "x" ; then
6493			WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0"
6494		    if test ! -d "${WCEROOT}" ; then
6495			WCEROOT="C:/Program Files/Microsoft eMbedded Tools"
6496		    fi
6497		fi
6498		if test "x${SDKROOT}" = "x" ; then
6499		    SDKROOT="C:/Program Files/Windows CE Tools"
6500		    if test ! -d "${SDKROOT}" ; then
6501			SDKROOT="C:/Windows CE Tools"
6502		    fi
6503		fi
6504		WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'`
6505		SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
6506		if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \
6507		    -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then
6508		    as_fn_error $? "could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" "$LINENO" 5
6509		    doWince="no"
6510		else
6511		    # We could PATH_NOSPACE these, but that's not important,
6512		    # as long as we quote them when used.
6513		    CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include"
6514		    if test -d "${CEINCLUDE}/${TARGETCPU}" ; then
6515			CEINCLUDE="${CEINCLUDE}/${TARGETCPU}"
6516		    fi
6517		    CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}"
6518    		fi
6519	    fi
6520
6521	    if test "$GCC" != "yes" ; then
6522	        if test "${SHARED_BUILD}" = "0" ; then
6523		    runtime=-MT
6524	        else
6525		    runtime=-MD
6526	        fi
6527
6528                if test "$do64bit" != "no" ; then
6529		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
6530		    CC="\"${PATH64}/cl.exe\""
6531		    CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
6532		    RC="\"${MSSDK}/bin/rc.exe\""
6533		    lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
6534		    LINKBIN="\"${PATH64}/link.exe\""
6535		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
6536		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
6537		    # Avoid 'unresolved external symbol __security_cookie'
6538		    # errors, c.f. http://support.microsoft.com/?id=894573
6539
6540    vars="bufferoverflowU.lib"
6541    for i in $vars; do
6542	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
6543	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
6544	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
6545	fi
6546	PKG_LIBS="$PKG_LIBS $i"
6547    done
6548
6549
6550		elif test "$doWince" != "no" ; then
6551		    CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin"
6552		    if test "${TARGETCPU}" = "X86"; then
6553			CC="\"${CEBINROOT}/cl.exe\""
6554		    else
6555			CC="\"${CEBINROOT}/cl${ARCH}.exe\""
6556		    fi
6557		    CFLAGS="$CFLAGS -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\""
6558		    RC="\"${WCEROOT}/Common/EVC/bin/rc.exe\""
6559		    arch=`echo ${ARCH} | awk '{print tolower($0)}'`
6560		    defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _WINDOWS"
6561		    if test "${SHARED_BUILD}" = "1" ; then
6562			# Static CE builds require static celib as well
6563		    	defs="${defs} _DLL"
6564		    fi
6565		    for i in $defs ; do
6566
6567cat >>confdefs.h <<_ACEOF
6568#define $i 1
6569_ACEOF
6570
6571		    done
6572
6573cat >>confdefs.h <<_ACEOF
6574#define _WIN32_WCE $CEVERSION
6575_ACEOF
6576
6577
6578cat >>confdefs.h <<_ACEOF
6579#define UNDER_CE $CEVERSION
6580_ACEOF
6581
6582		    CFLAGS_DEBUG="-nologo -Zi -Od"
6583		    CFLAGS_OPTIMIZE="-nologo -Ox"
6584		    lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'`
6585		    lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
6586		    LINKBIN="\"${CEBINROOT}/link.exe\""
6587
6588		else
6589		    RC="rc"
6590		    lflags="-nologo"
6591		    LINKBIN="link"
6592		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
6593		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
6594		fi
6595	    fi
6596
6597	    if test "$GCC" = "yes"; then
6598		# mingw gcc mode
6599		if test -n "$ac_tool_prefix"; then
6600  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6601set dummy ${ac_tool_prefix}windres; ac_word=$2
6602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6603$as_echo_n "checking for $ac_word... " >&6; }
6604if ${ac_cv_prog_RC+:} false; then :
6605  $as_echo_n "(cached) " >&6
6606else
6607  if test -n "$RC"; then
6608  ac_cv_prog_RC="$RC" # Let the user override the test.
6609else
6610as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6611for as_dir in $PATH
6612do
6613  IFS=$as_save_IFS
6614  test -z "$as_dir" && as_dir=.
6615    for ac_exec_ext in '' $ac_executable_extensions; do
6616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6617    ac_cv_prog_RC="${ac_tool_prefix}windres"
6618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6619    break 2
6620  fi
6621done
6622  done
6623IFS=$as_save_IFS
6624
6625fi
6626fi
6627RC=$ac_cv_prog_RC
6628if test -n "$RC"; then
6629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
6630$as_echo "$RC" >&6; }
6631else
6632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6633$as_echo "no" >&6; }
6634fi
6635
6636
6637fi
6638if test -z "$ac_cv_prog_RC"; then
6639  ac_ct_RC=$RC
6640  # Extract the first word of "windres", so it can be a program name with args.
6641set dummy windres; ac_word=$2
6642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6643$as_echo_n "checking for $ac_word... " >&6; }
6644if ${ac_cv_prog_ac_ct_RC+:} false; then :
6645  $as_echo_n "(cached) " >&6
6646else
6647  if test -n "$ac_ct_RC"; then
6648  ac_cv_prog_ac_ct_RC="$ac_ct_RC" # Let the user override the test.
6649else
6650as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6651for as_dir in $PATH
6652do
6653  IFS=$as_save_IFS
6654  test -z "$as_dir" && as_dir=.
6655    for ac_exec_ext in '' $ac_executable_extensions; do
6656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6657    ac_cv_prog_ac_ct_RC="windres"
6658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6659    break 2
6660  fi
6661done
6662  done
6663IFS=$as_save_IFS
6664
6665fi
6666fi
6667ac_ct_RC=$ac_cv_prog_ac_ct_RC
6668if test -n "$ac_ct_RC"; then
6669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RC" >&5
6670$as_echo "$ac_ct_RC" >&6; }
6671else
6672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6673$as_echo "no" >&6; }
6674fi
6675
6676  if test "x$ac_ct_RC" = x; then
6677    RC=""
6678  else
6679    case $cross_compiling:$ac_tool_warned in
6680yes:)
6681{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6682$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6683ac_tool_warned=yes ;;
6684esac
6685    RC=$ac_ct_RC
6686  fi
6687else
6688  RC="$ac_cv_prog_RC"
6689fi
6690
6691		CFLAGS_DEBUG="-g"
6692		CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
6693		SHLIB_LD='${CC} -shared'
6694		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
6695		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
6696		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
6697
6698		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cross-compile version of gcc" >&5
6699$as_echo_n "checking for cross-compile version of gcc... " >&6; }
6700if ${ac_cv_cross+:} false; then :
6701  $as_echo_n "(cached) " >&6
6702else
6703  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6704/* end confdefs.h.  */
6705
6706			    #ifdef _WIN32
6707				#error cross-compiler
6708			    #endif
6709
6710int
6711main ()
6712{
6713
6714  ;
6715  return 0;
6716}
6717_ACEOF
6718if ac_fn_c_try_compile "$LINENO"; then :
6719  ac_cv_cross=yes
6720else
6721  ac_cv_cross=no
6722fi
6723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6724
6725fi
6726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cross" >&5
6727$as_echo "$ac_cv_cross" >&6; }
6728		      if test "$ac_cv_cross" = "yes"; then
6729			case "$do64bit" in
6730			    amd64|x64|yes)
6731				CC="x86_64-w64-mingw32-gcc"
6732				LD="x86_64-w64-mingw32-ld"
6733				AR="x86_64-w64-mingw32-ar"
6734				RANLIB="x86_64-w64-mingw32-ranlib"
6735				RC="x86_64-w64-mingw32-windres"
6736			    ;;
6737			    *)
6738				CC="i686-w64-mingw32-gcc"
6739				LD="i686-w64-mingw32-ld"
6740				AR="i686-w64-mingw32-ar"
6741				RANLIB="i686-w64-mingw32-ranlib"
6742				RC="i686-w64-mingw32-windres"
6743			    ;;
6744			esac
6745		fi
6746
6747	    else
6748		SHLIB_LD="${LINKBIN} -dll ${lflags}"
6749		# link -lib only works when -lib is the first arg
6750		STLIB_LD="${LINKBIN} -lib ${lflags}"
6751		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib'
6752		PATHTYPE=-w
6753		# For information on what debugtype is most useful, see:
6754		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
6755		# and also
6756		# http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx
6757		# This essentially turns it all on.
6758		LDFLAGS_DEBUG="-debug -debugtype:cv"
6759		LDFLAGS_OPTIMIZE="-release"
6760		if test "$doWince" != "no" ; then
6761		    LDFLAGS_CONSOLE="-link ${lflags}"
6762		    LDFLAGS_WINDOW=${LDFLAGS_CONSOLE}
6763		else
6764		    LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
6765		    LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
6766		fi
6767	    fi
6768
6769	    SHLIB_SUFFIX=".dll"
6770	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
6771
6772	    TCL_LIB_VERSIONS_OK=nodots
6773    	    ;;
6774	AIX-*)
6775	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"; then :
6776
6777		# AIX requires the _r compiler when gcc isn't being used
6778		case "${CC}" in
6779		    *_r|*_r\ *)
6780			# ok ...
6781			;;
6782		    *)
6783			# Make sure only first arg gets _r
6784		    	CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'`
6785			;;
6786		esac
6787		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Using $CC for compiling with threads" >&5
6788$as_echo "Using $CC for compiling with threads" >&6; }
6789
6790fi
6791	    LIBS="$LIBS -lc"
6792	    SHLIB_CFLAGS=""
6793	    SHLIB_SUFFIX=".so"
6794
6795	    LD_LIBRARY_PATH_VAR="LIBPATH"
6796
6797	    # Check to enable 64-bit flags for compiler/linker
6798	    if test "$do64bit" = yes; then :
6799
6800		if test "$GCC" = yes; then :
6801
6802		    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
6803$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
6804
6805else
6806
6807		    do64bit_ok=yes
6808		    CFLAGS="$CFLAGS -q64"
6809		    LDFLAGS_ARCH="-q64"
6810		    RANLIB="${RANLIB} -X64"
6811		    AR="${AR} -X64"
6812		    SHLIB_LD_FLAGS="-b64"
6813
6814fi
6815
6816fi
6817
6818	    if test "`uname -m`" = ia64; then :
6819
6820		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
6821		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
6822		if test "$GCC" = yes; then :
6823
6824		    CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
6825
6826else
6827
6828		    CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
6829
6830fi
6831		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
6832
6833else
6834
6835		if test "$GCC" = yes; then :
6836
6837		    SHLIB_LD='${CC} -shared -Wl,-bexpall'
6838
6839else
6840
6841		    SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bexpall -H512 -T512 -bnoentry"
6842		    LDFLAGS="$LDFLAGS -brtl"
6843
6844fi
6845		SHLIB_LD="${SHLIB_LD} ${SHLIB_LD_FLAGS}"
6846		CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
6847		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
6848
6849fi
6850	    ;;
6851	BeOS*)
6852	    SHLIB_CFLAGS="-fPIC"
6853	    SHLIB_LD='${CC} -nostart'
6854	    SHLIB_SUFFIX=".so"
6855
6856	    #-----------------------------------------------------------
6857	    # Check for inet_ntoa in -lbind, for BeOS (which also needs
6858	    # -lsocket, even if the network functions are in -lnet which
6859	    # is always linked to, for compatibility.
6860	    #-----------------------------------------------------------
6861	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lbind" >&5
6862$as_echo_n "checking for inet_ntoa in -lbind... " >&6; }
6863if ${ac_cv_lib_bind_inet_ntoa+:} false; then :
6864  $as_echo_n "(cached) " >&6
6865else
6866  ac_check_lib_save_LIBS=$LIBS
6867LIBS="-lbind  $LIBS"
6868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6869/* end confdefs.h.  */
6870
6871/* Override any GCC internal prototype to avoid an error.
6872   Use char because int might match the return type of a GCC
6873   builtin and then its argument prototype would still apply.  */
6874#ifdef __cplusplus
6875extern "C"
6876#endif
6877char inet_ntoa ();
6878int
6879main ()
6880{
6881return inet_ntoa ();
6882  ;
6883  return 0;
6884}
6885_ACEOF
6886if ac_fn_c_try_link "$LINENO"; then :
6887  ac_cv_lib_bind_inet_ntoa=yes
6888else
6889  ac_cv_lib_bind_inet_ntoa=no
6890fi
6891rm -f core conftest.err conftest.$ac_objext \
6892    conftest$ac_exeext conftest.$ac_ext
6893LIBS=$ac_check_lib_save_LIBS
6894fi
6895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind_inet_ntoa" >&5
6896$as_echo "$ac_cv_lib_bind_inet_ntoa" >&6; }
6897if test "x$ac_cv_lib_bind_inet_ntoa" = xyes; then :
6898  LIBS="$LIBS -lbind -lsocket"
6899fi
6900
6901	    ;;
6902	BSD/OS-4.*)
6903	    SHLIB_CFLAGS="-export-dynamic -fPIC"
6904	    SHLIB_LD='${CC} -shared'
6905	    SHLIB_SUFFIX=".so"
6906	    LDFLAGS="$LDFLAGS -export-dynamic"
6907	    CC_SEARCH_FLAGS=""
6908	    LD_SEARCH_FLAGS=""
6909	    ;;
6910	CYGWIN_*)
6911	    SHLIB_CFLAGS=""
6912	    SHLIB_LD='${CC} -shared'
6913	    SHLIB_SUFFIX=".dll"
6914	    EXEEXT=".exe"
6915	    do64bit_ok=yes
6916	    CC_SEARCH_FLAGS=""
6917	    LD_SEARCH_FLAGS=""
6918	    ;;
6919	Haiku*)
6920	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
6921	    SHLIB_CFLAGS="-fPIC"
6922	    SHLIB_SUFFIX=".so"
6923	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
6924	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lnetwork" >&5
6925$as_echo_n "checking for inet_ntoa in -lnetwork... " >&6; }
6926if ${ac_cv_lib_network_inet_ntoa+:} false; then :
6927  $as_echo_n "(cached) " >&6
6928else
6929  ac_check_lib_save_LIBS=$LIBS
6930LIBS="-lnetwork  $LIBS"
6931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6932/* end confdefs.h.  */
6933
6934/* Override any GCC internal prototype to avoid an error.
6935   Use char because int might match the return type of a GCC
6936   builtin and then its argument prototype would still apply.  */
6937#ifdef __cplusplus
6938extern "C"
6939#endif
6940char inet_ntoa ();
6941int
6942main ()
6943{
6944return inet_ntoa ();
6945  ;
6946  return 0;
6947}
6948_ACEOF
6949if ac_fn_c_try_link "$LINENO"; then :
6950  ac_cv_lib_network_inet_ntoa=yes
6951else
6952  ac_cv_lib_network_inet_ntoa=no
6953fi
6954rm -f core conftest.err conftest.$ac_objext \
6955    conftest$ac_exeext conftest.$ac_ext
6956LIBS=$ac_check_lib_save_LIBS
6957fi
6958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_inet_ntoa" >&5
6959$as_echo "$ac_cv_lib_network_inet_ntoa" >&6; }
6960if test "x$ac_cv_lib_network_inet_ntoa" = xyes; then :
6961  LIBS="$LIBS -lnetwork"
6962fi
6963
6964	    ;;
6965	HP-UX-*.11.*)
6966	    # Use updated header definitions where possible
6967
6968$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
6969
6970	    # TEA specific: Needed by Tcl, but not most extensions
6971	    #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
6972	    #LIBS="$LIBS -lxnet"               # Use the XOPEN network library
6973
6974	    if test "`uname -m`" = ia64; then :
6975
6976		SHLIB_SUFFIX=".so"
6977		# Use newer C++ library for C++ extensions
6978		#if test "$GCC" != "yes" ; then
6979		#   CPPFLAGS="-AA"
6980		#fi
6981
6982else
6983
6984		SHLIB_SUFFIX=".sl"
6985
6986fi
6987	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
6988$as_echo_n "checking for shl_load in -ldld... " >&6; }
6989if ${ac_cv_lib_dld_shl_load+:} false; then :
6990  $as_echo_n "(cached) " >&6
6991else
6992  ac_check_lib_save_LIBS=$LIBS
6993LIBS="-ldld  $LIBS"
6994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6995/* end confdefs.h.  */
6996
6997/* Override any GCC internal prototype to avoid an error.
6998   Use char because int might match the return type of a GCC
6999   builtin and then its argument prototype would still apply.  */
7000#ifdef __cplusplus
7001extern "C"
7002#endif
7003char shl_load ();
7004int
7005main ()
7006{
7007return shl_load ();
7008  ;
7009  return 0;
7010}
7011_ACEOF
7012if ac_fn_c_try_link "$LINENO"; then :
7013  ac_cv_lib_dld_shl_load=yes
7014else
7015  ac_cv_lib_dld_shl_load=no
7016fi
7017rm -f core conftest.err conftest.$ac_objext \
7018    conftest$ac_exeext conftest.$ac_ext
7019LIBS=$ac_check_lib_save_LIBS
7020fi
7021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7022$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
7023if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
7024  tcl_ok=yes
7025else
7026  tcl_ok=no
7027fi
7028
7029	    if test "$tcl_ok" = yes; then :
7030
7031		LDFLAGS="$LDFLAGS -Wl,-E"
7032		CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
7033		LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
7034		LD_LIBRARY_PATH_VAR="SHLIB_PATH"
7035
7036fi
7037	    if test "$GCC" = yes; then :
7038
7039		SHLIB_LD='${CC} -shared'
7040		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7041
7042else
7043
7044		CFLAGS="$CFLAGS -z"
7045		# Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
7046		#CFLAGS="$CFLAGS +DAportable"
7047		SHLIB_CFLAGS="+z"
7048		SHLIB_LD="ld -b"
7049
7050fi
7051
7052	    # Check to enable 64-bit flags for compiler/linker
7053	    if test "$do64bit" = "yes"; then :
7054
7055		if test "$GCC" = yes; then :
7056
7057		    case `${CC} -dumpmachine` in
7058			hppa64*)
7059			    # 64-bit gcc in use.  Fix flags for GNU ld.
7060			    do64bit_ok=yes
7061			    SHLIB_LD='${CC} -shared'
7062			    if test $doRpath = yes; then :
7063
7064				CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7065fi
7066			    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7067			    ;;
7068			*)
7069			    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
7070$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
7071			    ;;
7072		    esac
7073
7074else
7075
7076		    do64bit_ok=yes
7077		    CFLAGS="$CFLAGS +DD64"
7078		    LDFLAGS_ARCH="+DD64"
7079
7080fi
7081
7082fi ;;
7083	IRIX-6.*)
7084	    SHLIB_CFLAGS=""
7085	    SHLIB_LD="ld -n32 -shared -rdata_shared"
7086	    SHLIB_SUFFIX=".so"
7087	    if test $doRpath = yes; then :
7088
7089		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7090		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
7091fi
7092	    if test "$GCC" = yes; then :
7093
7094		CFLAGS="$CFLAGS -mabi=n32"
7095		LDFLAGS="$LDFLAGS -mabi=n32"
7096
7097else
7098
7099		case $system in
7100		    IRIX-6.3)
7101			# Use to build 6.2 compatible binaries on 6.3.
7102			CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
7103			;;
7104		    *)
7105			CFLAGS="$CFLAGS -n32"
7106			;;
7107		esac
7108		LDFLAGS="$LDFLAGS -n32"
7109
7110fi
7111	    ;;
7112	IRIX64-6.*)
7113	    SHLIB_CFLAGS=""
7114	    SHLIB_LD="ld -n32 -shared -rdata_shared"
7115	    SHLIB_SUFFIX=".so"
7116	    if test $doRpath = yes; then :
7117
7118		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7119		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
7120fi
7121
7122	    # Check to enable 64-bit flags for compiler/linker
7123
7124	    if test "$do64bit" = yes; then :
7125
7126	        if test "$GCC" = yes; then :
7127
7128	            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported by gcc" >&5
7129$as_echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;}
7130
7131else
7132
7133	            do64bit_ok=yes
7134	            SHLIB_LD="ld -64 -shared -rdata_shared"
7135	            CFLAGS="$CFLAGS -64"
7136	            LDFLAGS_ARCH="-64"
7137
7138fi
7139
7140fi
7141	    ;;
7142	Linux*|GNU*|NetBSD-Debian)
7143	    SHLIB_CFLAGS="-fPIC"
7144	    SHLIB_SUFFIX=".so"
7145
7146	    # TEA specific:
7147	    CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
7148
7149	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
7150	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}'
7151	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
7152	    if test $doRpath = yes; then :
7153
7154		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7155fi
7156	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7157	    if test "`uname -m`" = "alpha"; then :
7158  CFLAGS="$CFLAGS -mieee"
7159fi
7160	    if test $do64bit = yes; then :
7161
7162		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -m64 flag" >&5
7163$as_echo_n "checking if compiler accepts -m64 flag... " >&6; }
7164if ${tcl_cv_cc_m64+:} false; then :
7165  $as_echo_n "(cached) " >&6
7166else
7167
7168		    hold_cflags=$CFLAGS
7169		    CFLAGS="$CFLAGS -m64"
7170		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7171/* end confdefs.h.  */
7172
7173int
7174main ()
7175{
7176
7177  ;
7178  return 0;
7179}
7180_ACEOF
7181if ac_fn_c_try_link "$LINENO"; then :
7182  tcl_cv_cc_m64=yes
7183else
7184  tcl_cv_cc_m64=no
7185fi
7186rm -f core conftest.err conftest.$ac_objext \
7187    conftest$ac_exeext conftest.$ac_ext
7188		    CFLAGS=$hold_cflags
7189fi
7190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_m64" >&5
7191$as_echo "$tcl_cv_cc_m64" >&6; }
7192		if test $tcl_cv_cc_m64 = yes; then :
7193
7194		    CFLAGS="$CFLAGS -m64"
7195		    do64bit_ok=yes
7196
7197fi
7198
7199fi
7200
7201	    # The combo of gcc + glibc has a bug related to inlining of
7202	    # functions like strtod(). The -fno-builtin flag should address
7203	    # this problem but it does not work. The -fno-inline flag is kind
7204	    # of overkill but it works. Disable inlining only when one of the
7205	    # files in compat/*.c is being linked in.
7206
7207	    if test x"${USE_COMPAT}" != x; then :
7208  CFLAGS="$CFLAGS -fno-inline"
7209fi
7210	    ;;
7211	Lynx*)
7212	    SHLIB_CFLAGS="-fPIC"
7213	    SHLIB_SUFFIX=".so"
7214	    CFLAGS_OPTIMIZE=-02
7215	    SHLIB_LD='${CC} -shared'
7216	    LD_FLAGS="-Wl,--export-dynamic"
7217	    if test $doRpath = yes; then :
7218
7219		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7220		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7221fi
7222	    ;;
7223	OpenBSD-*)
7224	    arch=`arch -s`
7225	    case "$arch" in
7226	    vax)
7227		SHLIB_SUFFIX=""
7228		SHARED_LIB_SUFFIX=""
7229		LDFLAGS=""
7230		;;
7231	    *)
7232		SHLIB_CFLAGS="-fPIC"
7233		SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
7234		SHLIB_SUFFIX=".so"
7235		if test $doRpath = yes; then :
7236
7237		    CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7238fi
7239		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7240		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
7241		LDFLAGS="-Wl,-export-dynamic"
7242		;;
7243	    esac
7244	    case "$arch" in
7245	    vax)
7246		CFLAGS_OPTIMIZE="-O1"
7247		;;
7248	    *)
7249		CFLAGS_OPTIMIZE="-O2"
7250		;;
7251	    esac
7252	    if test "${TCL_THREADS}" = "1"; then :
7253
7254		# On OpenBSD:	Compile with -pthread
7255		#		Don't link with -lpthread
7256		LIBS=`echo $LIBS | sed s/-lpthread//`
7257		CFLAGS="$CFLAGS -pthread"
7258
7259fi
7260	    # OpenBSD doesn't do version numbers with dots.
7261	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
7262	    TCL_LIB_VERSIONS_OK=nodots
7263	    ;;
7264	NetBSD-*)
7265	    # NetBSD has ELF and can use 'cc -shared' to build shared libs
7266	    SHLIB_CFLAGS="-fPIC"
7267	    SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
7268	    SHLIB_SUFFIX=".so"
7269	    LDFLAGS="$LDFLAGS -export-dynamic"
7270	    if test $doRpath = yes; then :
7271
7272		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7273fi
7274	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7275	    if test "${TCL_THREADS}" = "1"; then :
7276
7277		# The -pthread needs to go in the CFLAGS, not LIBS
7278		LIBS=`echo $LIBS | sed s/-pthread//`
7279		CFLAGS="$CFLAGS -pthread"
7280	    	LDFLAGS="$LDFLAGS -pthread"
7281
7282fi
7283	    ;;
7284	FreeBSD-*)
7285	    # This configuration from FreeBSD Ports.
7286	    SHLIB_CFLAGS="-fPIC"
7287	    SHLIB_LD="${CC} -shared"
7288	    TCL_SHLIB_LD_EXTRAS="-Wl,-soname=\$@"
7289	    TK_SHLIB_LD_EXTRAS="-Wl,-soname,\$@"
7290	    SHLIB_SUFFIX=".so"
7291	    LDFLAGS=""
7292	    if test $doRpath = yes; then :
7293
7294		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7295		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7296fi
7297	    if test "${TCL_THREADS}" = "1"; then :
7298
7299		# The -pthread needs to go in the LDFLAGS, not LIBS
7300		LIBS=`echo $LIBS | sed s/-pthread//`
7301		CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
7302		LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
7303fi
7304	    case $system in
7305	    FreeBSD-3.*)
7306		# Version numbers are dot-stripped by system policy.
7307		TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .`
7308		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
7309		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
7310		TCL_LIB_VERSIONS_OK=nodots
7311		;;
7312	    esac
7313	    ;;
7314	Darwin-*)
7315	    CFLAGS_OPTIMIZE="-Os"
7316	    SHLIB_CFLAGS="-fno-common"
7317	    # To avoid discrepancies between what headers configure sees during
7318	    # preprocessing tests and compiling tests, move any -isysroot and
7319	    # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
7320	    CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
7321		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
7322		if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`"
7323	    CFLAGS="`echo " ${CFLAGS}" | \
7324		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
7325		if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`"
7326	    if test $do64bit = yes; then :
7327
7328		case `arch` in
7329		    ppc)
7330			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch ppc64 flag" >&5
7331$as_echo_n "checking if compiler accepts -arch ppc64 flag... " >&6; }
7332if ${tcl_cv_cc_arch_ppc64+:} false; then :
7333  $as_echo_n "(cached) " >&6
7334else
7335
7336			    hold_cflags=$CFLAGS
7337			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
7338			    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7339/* end confdefs.h.  */
7340
7341int
7342main ()
7343{
7344
7345  ;
7346  return 0;
7347}
7348_ACEOF
7349if ac_fn_c_try_link "$LINENO"; then :
7350  tcl_cv_cc_arch_ppc64=yes
7351else
7352  tcl_cv_cc_arch_ppc64=no
7353fi
7354rm -f core conftest.err conftest.$ac_objext \
7355    conftest$ac_exeext conftest.$ac_ext
7356			    CFLAGS=$hold_cflags
7357fi
7358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_ppc64" >&5
7359$as_echo "$tcl_cv_cc_arch_ppc64" >&6; }
7360			if test $tcl_cv_cc_arch_ppc64 = yes; then :
7361
7362			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
7363			    do64bit_ok=yes
7364
7365fi;;
7366		    i386)
7367			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch x86_64 flag" >&5
7368$as_echo_n "checking if compiler accepts -arch x86_64 flag... " >&6; }
7369if ${tcl_cv_cc_arch_x86_64+:} false; then :
7370  $as_echo_n "(cached) " >&6
7371else
7372
7373			    hold_cflags=$CFLAGS
7374			    CFLAGS="$CFLAGS -arch x86_64"
7375			    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7376/* end confdefs.h.  */
7377
7378int
7379main ()
7380{
7381
7382  ;
7383  return 0;
7384}
7385_ACEOF
7386if ac_fn_c_try_link "$LINENO"; then :
7387  tcl_cv_cc_arch_x86_64=yes
7388else
7389  tcl_cv_cc_arch_x86_64=no
7390fi
7391rm -f core conftest.err conftest.$ac_objext \
7392    conftest$ac_exeext conftest.$ac_ext
7393			    CFLAGS=$hold_cflags
7394fi
7395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_x86_64" >&5
7396$as_echo "$tcl_cv_cc_arch_x86_64" >&6; }
7397			if test $tcl_cv_cc_arch_x86_64 = yes; then :
7398
7399			    CFLAGS="$CFLAGS -arch x86_64"
7400			    do64bit_ok=yes
7401
7402fi;;
7403		    *)
7404			{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5
7405$as_echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};;
7406		esac
7407
7408else
7409
7410		# Check for combined 32-bit and 64-bit fat build
7411		if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
7412		    && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '; then :
7413
7414		    fat_32_64=yes
7415fi
7416
7417fi
7418	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
7419	    SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
7420	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -single_module flag" >&5
7421$as_echo_n "checking if ld accepts -single_module flag... " >&6; }
7422if ${tcl_cv_ld_single_module+:} false; then :
7423  $as_echo_n "(cached) " >&6
7424else
7425
7426		hold_ldflags=$LDFLAGS
7427		LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
7428		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7429/* end confdefs.h.  */
7430
7431int
7432main ()
7433{
7434int i;
7435  ;
7436  return 0;
7437}
7438_ACEOF
7439if ac_fn_c_try_link "$LINENO"; then :
7440  tcl_cv_ld_single_module=yes
7441else
7442  tcl_cv_ld_single_module=no
7443fi
7444rm -f core conftest.err conftest.$ac_objext \
7445    conftest$ac_exeext conftest.$ac_ext
7446		LDFLAGS=$hold_ldflags
7447fi
7448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_single_module" >&5
7449$as_echo "$tcl_cv_ld_single_module" >&6; }
7450	    if test $tcl_cv_ld_single_module = yes; then :
7451
7452		SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
7453
7454fi
7455	    # TEA specific: link shlib with current and compatibility version flags
7456	    vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([0-9]\{1,5\}\)\(\(\.[0-9]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d`
7457	    SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}"
7458	    SHLIB_SUFFIX=".dylib"
7459	    # Don't use -prebind when building for Mac OS X 10.4 or later only:
7460	    if test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \
7461		"`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4; then :
7462
7463		LDFLAGS="$LDFLAGS -prebind"
7464fi
7465	    LDFLAGS="$LDFLAGS -headerpad_max_install_names"
7466	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -search_paths_first flag" >&5
7467$as_echo_n "checking if ld accepts -search_paths_first flag... " >&6; }
7468if ${tcl_cv_ld_search_paths_first+:} false; then :
7469  $as_echo_n "(cached) " >&6
7470else
7471
7472		hold_ldflags=$LDFLAGS
7473		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7474		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7475/* end confdefs.h.  */
7476
7477int
7478main ()
7479{
7480int i;
7481  ;
7482  return 0;
7483}
7484_ACEOF
7485if ac_fn_c_try_link "$LINENO"; then :
7486  tcl_cv_ld_search_paths_first=yes
7487else
7488  tcl_cv_ld_search_paths_first=no
7489fi
7490rm -f core conftest.err conftest.$ac_objext \
7491    conftest$ac_exeext conftest.$ac_ext
7492		LDFLAGS=$hold_ldflags
7493fi
7494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_search_paths_first" >&5
7495$as_echo "$tcl_cv_ld_search_paths_first" >&6; }
7496	    if test $tcl_cv_ld_search_paths_first = yes; then :
7497
7498		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7499
7500fi
7501	    if test "$tcl_cv_cc_visibility_hidden" != yes; then :
7502
7503
7504$as_echo "#define MODULE_SCOPE __private_extern__" >>confdefs.h
7505
7506		tcl_cv_cc_visibility_hidden=yes
7507
7508fi
7509	    CC_SEARCH_FLAGS=""
7510	    LD_SEARCH_FLAGS=""
7511	    LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
7512	    # TEA specific: for combined 32 & 64 bit fat builds of Tk
7513	    # extensions, verify that 64-bit build is possible.
7514	    if test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"; then :
7515
7516		if test "${TEA_WINDOWINGSYSTEM}" = x11; then :
7517
7518		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit X11" >&5
7519$as_echo_n "checking for 64-bit X11... " >&6; }
7520if ${tcl_cv_lib_x11_64+:} false; then :
7521  $as_echo_n "(cached) " >&6
7522else
7523
7524			for v in CFLAGS CPPFLAGS LDFLAGS; do
7525			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
7526			done
7527			CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
7528			LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
7529			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7530/* end confdefs.h.  */
7531#include <X11/Xlib.h>
7532int
7533main ()
7534{
7535XrmInitialize();
7536  ;
7537  return 0;
7538}
7539_ACEOF
7540if ac_fn_c_try_link "$LINENO"; then :
7541  tcl_cv_lib_x11_64=yes
7542else
7543  tcl_cv_lib_x11_64=no
7544fi
7545rm -f core conftest.err conftest.$ac_objext \
7546    conftest$ac_exeext conftest.$ac_ext
7547			for v in CFLAGS CPPFLAGS LDFLAGS; do
7548			    eval $v'="$hold_'$v'"'
7549			done
7550fi
7551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_x11_64" >&5
7552$as_echo "$tcl_cv_lib_x11_64" >&6; }
7553
7554fi
7555		if test "${TEA_WINDOWINGSYSTEM}" = aqua; then :
7556
7557		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit Tk" >&5
7558$as_echo_n "checking for 64-bit Tk... " >&6; }
7559if ${tcl_cv_lib_tk_64+:} false; then :
7560  $as_echo_n "(cached) " >&6
7561else
7562
7563			for v in CFLAGS CPPFLAGS LDFLAGS; do
7564			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
7565			done
7566			CPPFLAGS="$CPPFLAGS -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 ${TCL_INCLUDES} ${TK_INCLUDES}"
7567			LDFLAGS="$LDFLAGS ${TCL_STUB_LIB_SPEC} ${TK_STUB_LIB_SPEC}"
7568			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7569/* end confdefs.h.  */
7570#include <tk.h>
7571int
7572main ()
7573{
7574Tk_InitStubs(NULL, "", 0);
7575  ;
7576  return 0;
7577}
7578_ACEOF
7579if ac_fn_c_try_link "$LINENO"; then :
7580  tcl_cv_lib_tk_64=yes
7581else
7582  tcl_cv_lib_tk_64=no
7583fi
7584rm -f core conftest.err conftest.$ac_objext \
7585    conftest$ac_exeext conftest.$ac_ext
7586			for v in CFLAGS CPPFLAGS LDFLAGS; do
7587			    eval $v'="$hold_'$v'"'
7588			done
7589fi
7590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_tk_64" >&5
7591$as_echo "$tcl_cv_lib_tk_64" >&6; }
7592
7593fi
7594		# remove 64-bit arch flags from CFLAGS et al. if configuration
7595		# does not support 64-bit.
7596		if test "$tcl_cv_lib_tk_64" = no -o "$tcl_cv_lib_x11_64" = no; then :
7597
7598		    { $as_echo "$as_me:${as_lineno-$LINENO}: Removing 64-bit architectures from compiler & linker flags" >&5
7599$as_echo "$as_me: Removing 64-bit architectures from compiler & linker flags" >&6;}
7600		    for v in CFLAGS CPPFLAGS LDFLAGS; do
7601			eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
7602		    done
7603fi
7604
7605fi
7606	    ;;
7607	OS/390-*)
7608	    CFLAGS_OPTIMIZE=""		# Optimizer is buggy
7609
7610$as_echo "#define _OE_SOCKETS 1" >>confdefs.h
7611
7612	    ;;
7613	OSF1-V*)
7614	    # Digital OSF/1
7615	    SHLIB_CFLAGS=""
7616	    if test "$SHARED_BUILD" = 1; then :
7617
7618	        SHLIB_LD='ld -shared -expect_unresolved "*"'
7619
7620else
7621
7622	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
7623
7624fi
7625	    SHLIB_SUFFIX=".so"
7626	    if test $doRpath = yes; then :
7627
7628		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7629		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
7630fi
7631	    if test "$GCC" = yes; then :
7632  CFLAGS="$CFLAGS -mieee"
7633else
7634
7635		CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
7636fi
7637	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
7638	    if test "${TCL_THREADS}" = 1; then :
7639
7640		CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
7641		CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
7642		LIBS=`echo $LIBS | sed s/-lpthreads//`
7643		if test "$GCC" = yes; then :
7644
7645		    LIBS="$LIBS -lpthread -lmach -lexc"
7646
7647else
7648
7649		    CFLAGS="$CFLAGS -pthread"
7650		    LDFLAGS="$LDFLAGS -pthread"
7651
7652fi
7653
7654fi
7655	    ;;
7656	QNX-6*)
7657	    # QNX RTP
7658	    # This may work for all QNX, but it was only reported for v6.
7659	    SHLIB_CFLAGS="-fPIC"
7660	    SHLIB_LD="ld -Bshareable -x"
7661	    SHLIB_LD_LIBS=""
7662	    SHLIB_SUFFIX=".so"
7663	    CC_SEARCH_FLAGS=""
7664	    LD_SEARCH_FLAGS=""
7665	    ;;
7666	SCO_SV-3.2*)
7667	    if test "$GCC" = yes; then :
7668
7669		SHLIB_CFLAGS="-fPIC -melf"
7670		LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
7671
7672else
7673
7674		SHLIB_CFLAGS="-Kpic -belf"
7675		LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
7676
7677fi
7678	    SHLIB_LD="ld -G"
7679	    SHLIB_LD_LIBS=""
7680	    SHLIB_SUFFIX=".so"
7681	    CC_SEARCH_FLAGS=""
7682	    LD_SEARCH_FLAGS=""
7683	    ;;
7684	SunOS-5.[0-6])
7685	    # Careful to not let 5.10+ fall into this case
7686
7687	    # Note: If _REENTRANT isn't defined, then Solaris
7688	    # won't define thread-safe library routines.
7689
7690
7691$as_echo "#define _REENTRANT 1" >>confdefs.h
7692
7693
7694$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
7695
7696
7697	    SHLIB_CFLAGS="-KPIC"
7698	    SHLIB_SUFFIX=".so"
7699	    if test "$GCC" = yes; then :
7700
7701		SHLIB_LD='${CC} -shared'
7702		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
7703		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7704
7705else
7706
7707		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
7708		CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
7709		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7710
7711fi
7712	    ;;
7713	SunOS-5*)
7714	    # Note: If _REENTRANT isn't defined, then Solaris
7715	    # won't define thread-safe library routines.
7716
7717
7718$as_echo "#define _REENTRANT 1" >>confdefs.h
7719
7720
7721$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
7722
7723
7724	    SHLIB_CFLAGS="-KPIC"
7725
7726	    # Check to enable 64-bit flags for compiler/linker
7727	    if test "$do64bit" = yes; then :
7728
7729		arch=`isainfo`
7730		if test "$arch" = "sparcv9 sparc"; then :
7731
7732		    if test "$GCC" = yes; then :
7733
7734			if test "`${CC} -dumpversion | awk -F. '{print $1}'`" -lt 3; then :
7735
7736			    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5
7737$as_echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;}
7738
7739else
7740
7741			    do64bit_ok=yes
7742			    CFLAGS="$CFLAGS -m64 -mcpu=v9"
7743			    LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
7744			    SHLIB_CFLAGS="-fPIC"
7745
7746fi
7747
7748else
7749
7750			do64bit_ok=yes
7751			if test "$do64bitVIS" = yes; then :
7752
7753			    CFLAGS="$CFLAGS -xarch=v9a"
7754			    LDFLAGS_ARCH="-xarch=v9a"
7755
7756else
7757
7758			    CFLAGS="$CFLAGS -xarch=v9"
7759			    LDFLAGS_ARCH="-xarch=v9"
7760
7761fi
7762			# Solaris 64 uses this as well
7763			#LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
7764
7765fi
7766
7767else
7768  if test "$arch" = "amd64 i386"; then :
7769
7770		    if test "$GCC" = yes; then :
7771
7772			case $system in
7773			    SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
7774				do64bit_ok=yes
7775				CFLAGS="$CFLAGS -m64"
7776				LDFLAGS="$LDFLAGS -m64";;
7777			    *)
7778				{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
7779$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;};;
7780			esac
7781
7782else
7783
7784			do64bit_ok=yes
7785			case $system in
7786			    SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
7787				CFLAGS="$CFLAGS -m64"
7788				LDFLAGS="$LDFLAGS -m64";;
7789			    *)
7790				CFLAGS="$CFLAGS -xarch=amd64"
7791				LDFLAGS="$LDFLAGS -xarch=amd64";;
7792			esac
7793
7794fi
7795
7796else
7797  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported for $arch" >&5
7798$as_echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;}
7799fi
7800fi
7801
7802fi
7803
7804	    SHLIB_SUFFIX=".so"
7805	    if test "$GCC" = yes; then :
7806
7807		SHLIB_LD='${CC} -shared'
7808		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
7809		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7810		if test "$do64bit_ok" = yes; then :
7811
7812		    if test "$arch" = "sparcv9 sparc"; then :
7813
7814			# We need to specify -static-libgcc or we need to
7815			# add the path to the sparv9 libgcc.
7816			# JH: static-libgcc is necessary for core Tcl, but may
7817			# not be necessary for extensions.
7818			SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
7819			# for finding sparcv9 libgcc, get the regular libgcc
7820			# path, remove so name and append 'sparcv9'
7821			#v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
7822			#CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
7823
7824else
7825  if test "$arch" = "amd64 i386"; then :
7826
7827			# JH: static-libgcc is necessary for core Tcl, but may
7828			# not be necessary for extensions.
7829			SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
7830
7831fi
7832fi
7833
7834fi
7835
7836else
7837
7838		case $system in
7839		    SunOS-5.[1-9][0-9]*)
7840			# TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
7841			SHLIB_LD='${CC} -G -z text ${LDFLAGS_DEFAULT}';;
7842		    *)
7843			SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
7844		esac
7845		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
7846		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
7847
7848fi
7849	    ;;
7850	UNIX_SV* | UnixWare-5*)
7851	    SHLIB_CFLAGS="-KPIC"
7852	    SHLIB_LD='${CC} -G'
7853	    SHLIB_LD_LIBS=""
7854	    SHLIB_SUFFIX=".so"
7855	    # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
7856	    # that don't grok the -Bexport option.  Test that it does.
7857	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld accepts -Bexport flag" >&5
7858$as_echo_n "checking for ld accepts -Bexport flag... " >&6; }
7859if ${tcl_cv_ld_Bexport+:} false; then :
7860  $as_echo_n "(cached) " >&6
7861else
7862
7863		hold_ldflags=$LDFLAGS
7864		LDFLAGS="$LDFLAGS -Wl,-Bexport"
7865		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7866/* end confdefs.h.  */
7867
7868int
7869main ()
7870{
7871int i;
7872  ;
7873  return 0;
7874}
7875_ACEOF
7876if ac_fn_c_try_link "$LINENO"; then :
7877  tcl_cv_ld_Bexport=yes
7878else
7879  tcl_cv_ld_Bexport=no
7880fi
7881rm -f core conftest.err conftest.$ac_objext \
7882    conftest$ac_exeext conftest.$ac_ext
7883	        LDFLAGS=$hold_ldflags
7884fi
7885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_Bexport" >&5
7886$as_echo "$tcl_cv_ld_Bexport" >&6; }
7887	    if test $tcl_cv_ld_Bexport = yes; then :
7888
7889		LDFLAGS="$LDFLAGS -Wl,-Bexport"
7890
7891fi
7892	    CC_SEARCH_FLAGS=""
7893	    LD_SEARCH_FLAGS=""
7894	    ;;
7895    esac
7896
7897    if test "$do64bit" = yes -a "$do64bit_ok" = no; then :
7898
7899	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5
7900$as_echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;}
7901
7902fi
7903
7904
7905
7906    # Add in the arch flags late to ensure it wasn't removed.
7907    # Not necessary in TEA, but this is aligned with core
7908    LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
7909
7910    # If we're running gcc, then change the C flags for compiling shared
7911    # libraries to the right flags for gcc, instead of those for the
7912    # standard manufacturer compiler.
7913
7914    if test "$GCC" = yes; then :
7915
7916	case $system in
7917	    AIX-*) ;;
7918	    BSD/OS*) ;;
7919	    CYGWIN_*|MINGW32_*) ;;
7920	    IRIX*) ;;
7921	    NetBSD-*|FreeBSD-*|OpenBSD-*) ;;
7922	    Darwin-*) ;;
7923	    SCO_SV-3.2*) ;;
7924	    windows) ;;
7925	    *) SHLIB_CFLAGS="-fPIC" ;;
7926	esac
7927fi
7928
7929    if test "$tcl_cv_cc_visibility_hidden" != yes; then :
7930
7931
7932$as_echo "#define MODULE_SCOPE extern" >>confdefs.h
7933
7934
7935fi
7936
7937    if test "$SHARED_LIB_SUFFIX" = ""; then :
7938
7939    # TEA specific: use PACKAGE_VERSION instead of VERSION
7940    SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'
7941fi
7942    if test "$UNSHARED_LIB_SUFFIX" = ""; then :
7943
7944    # TEA specific: use PACKAGE_VERSION instead of VERSION
7945    UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
7946fi
7947
7948    if test "${GCC}" = "yes" -a ${SHLIB_SUFFIX} = ".dll"; then
7949	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SEH support in compiler" >&5
7950$as_echo_n "checking for SEH support in compiler... " >&6; }
7951if ${tcl_cv_seh+:} false; then :
7952  $as_echo_n "(cached) " >&6
7953else
7954  if test "$cross_compiling" = yes; then :
7955  tcl_cv_seh=no
7956else
7957  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7958/* end confdefs.h.  */
7959
7960#define WIN32_LEAN_AND_MEAN
7961#include <windows.h>
7962#undef WIN32_LEAN_AND_MEAN
7963
7964	    int main(int argc, char** argv) {
7965		int a, b = 0;
7966		__try {
7967		    a = 666 / b;
7968		}
7969		__except (EXCEPTION_EXECUTE_HANDLER) {
7970		    return 0;
7971		}
7972		return 1;
7973	    }
7974
7975_ACEOF
7976if ac_fn_c_try_run "$LINENO"; then :
7977  tcl_cv_seh=yes
7978else
7979  tcl_cv_seh=no
7980fi
7981rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7982  conftest.$ac_objext conftest.beam conftest.$ac_ext
7983fi
7984
7985
7986fi
7987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_seh" >&5
7988$as_echo "$tcl_cv_seh" >&6; }
7989	if test "$tcl_cv_seh" = "no" ; then
7990
7991$as_echo "#define HAVE_NO_SEH 1" >>confdefs.h
7992
7993	fi
7994
7995	#
7996	# Check to see if the excpt.h include file provided contains the
7997	# definition for EXCEPTION_DISPOSITION; if not, which is the case
7998	# with Cygwin's version as of 2002-04-10, define it to be int,
7999	# sufficient for getting the current code to work.
8000	#
8001	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXCEPTION_DISPOSITION support in include files" >&5
8002$as_echo_n "checking for EXCEPTION_DISPOSITION support in include files... " >&6; }
8003if ${tcl_cv_eh_disposition+:} false; then :
8004  $as_echo_n "(cached) " >&6
8005else
8006  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8007/* end confdefs.h.  */
8008
8009#	    define WIN32_LEAN_AND_MEAN
8010#	    include <windows.h>
8011#	    undef WIN32_LEAN_AND_MEAN
8012
8013int
8014main ()
8015{
8016
8017		EXCEPTION_DISPOSITION x;
8018
8019  ;
8020  return 0;
8021}
8022_ACEOF
8023if ac_fn_c_try_compile "$LINENO"; then :
8024  tcl_cv_eh_disposition=yes
8025else
8026  tcl_cv_eh_disposition=no
8027fi
8028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8029
8030fi
8031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_eh_disposition" >&5
8032$as_echo "$tcl_cv_eh_disposition" >&6; }
8033	if test "$tcl_cv_eh_disposition" = "no" ; then
8034
8035$as_echo "#define EXCEPTION_DISPOSITION int" >>confdefs.h
8036
8037	fi
8038
8039	# Check to see if winnt.h defines CHAR, SHORT, and LONG
8040	# even if VOID has already been #defined. The win32api
8041	# used by mingw and cygwin is known to do this.
8042
8043	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for winnt.h that ignores VOID define" >&5
8044$as_echo_n "checking for winnt.h that ignores VOID define... " >&6; }
8045if ${tcl_cv_winnt_ignore_void+:} false; then :
8046  $as_echo_n "(cached) " >&6
8047else
8048  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8049/* end confdefs.h.  */
8050
8051#define VOID void
8052#define WIN32_LEAN_AND_MEAN
8053#include <windows.h>
8054#undef WIN32_LEAN_AND_MEAN
8055
8056int
8057main ()
8058{
8059
8060		CHAR c;
8061		SHORT s;
8062		LONG l;
8063
8064  ;
8065  return 0;
8066}
8067_ACEOF
8068if ac_fn_c_try_compile "$LINENO"; then :
8069  tcl_cv_winnt_ignore_void=yes
8070else
8071  tcl_cv_winnt_ignore_void=no
8072fi
8073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8074
8075fi
8076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_winnt_ignore_void" >&5
8077$as_echo "$tcl_cv_winnt_ignore_void" >&6; }
8078	if test "$tcl_cv_winnt_ignore_void" = "yes" ; then
8079
8080$as_echo "#define HAVE_WINNT_IGNORE_VOID 1" >>confdefs.h
8081
8082	fi
8083    fi
8084
8085	# See if the compiler supports casting to a union type.
8086	# This is used to stop gcc from printing a compiler
8087	# warning when initializing a union member.
8088
8089	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cast to union support" >&5
8090$as_echo_n "checking for cast to union support... " >&6; }
8091if ${tcl_cv_cast_to_union+:} false; then :
8092  $as_echo_n "(cached) " >&6
8093else
8094  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8095/* end confdefs.h.  */
8096
8097int
8098main ()
8099{
8100
8101		  union foo { int i; double d; };
8102		  union foo f = (union foo) (int) 0;
8103
8104  ;
8105  return 0;
8106}
8107_ACEOF
8108if ac_fn_c_try_compile "$LINENO"; then :
8109  tcl_cv_cast_to_union=yes
8110else
8111  tcl_cv_cast_to_union=no
8112fi
8113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8114
8115fi
8116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cast_to_union" >&5
8117$as_echo "$tcl_cv_cast_to_union" >&6; }
8118	if test "$tcl_cv_cast_to_union" = "yes"; then
8119
8120$as_echo "#define HAVE_CAST_TO_UNION 1" >>confdefs.h
8121
8122	fi
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136    # These must be called after we do the basic CFLAGS checks and
8137    # verify any possible 64-bit or similar switches are necessary
8138
8139    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for required early compiler flags" >&5
8140$as_echo_n "checking for required early compiler flags... " >&6; }
8141    tcl_flags=""
8142
8143    if ${tcl_cv_flag__isoc99_source+:} false; then :
8144  $as_echo_n "(cached) " >&6
8145else
8146  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8147/* end confdefs.h.  */
8148#include <stdlib.h>
8149int
8150main ()
8151{
8152char *p = (char *)strtoll; char *q = (char *)strtoull;
8153  ;
8154  return 0;
8155}
8156_ACEOF
8157if ac_fn_c_try_compile "$LINENO"; then :
8158  tcl_cv_flag__isoc99_source=no
8159else
8160  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8161/* end confdefs.h.  */
8162#define _ISOC99_SOURCE 1
8163#include <stdlib.h>
8164int
8165main ()
8166{
8167char *p = (char *)strtoll; char *q = (char *)strtoull;
8168  ;
8169  return 0;
8170}
8171_ACEOF
8172if ac_fn_c_try_compile "$LINENO"; then :
8173  tcl_cv_flag__isoc99_source=yes
8174else
8175  tcl_cv_flag__isoc99_source=no
8176fi
8177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8178fi
8179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8180fi
8181
8182    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
8183
8184$as_echo "#define _ISOC99_SOURCE 1" >>confdefs.h
8185
8186	tcl_flags="$tcl_flags _ISOC99_SOURCE"
8187    fi
8188
8189
8190    if ${tcl_cv_flag__largefile64_source+:} false; then :
8191  $as_echo_n "(cached) " >&6
8192else
8193  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8194/* end confdefs.h.  */
8195#include <sys/stat.h>
8196int
8197main ()
8198{
8199struct stat64 buf; int i = stat64("/", &buf);
8200  ;
8201  return 0;
8202}
8203_ACEOF
8204if ac_fn_c_try_compile "$LINENO"; then :
8205  tcl_cv_flag__largefile64_source=no
8206else
8207  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8208/* end confdefs.h.  */
8209#define _LARGEFILE64_SOURCE 1
8210#include <sys/stat.h>
8211int
8212main ()
8213{
8214struct stat64 buf; int i = stat64("/", &buf);
8215  ;
8216  return 0;
8217}
8218_ACEOF
8219if ac_fn_c_try_compile "$LINENO"; then :
8220  tcl_cv_flag__largefile64_source=yes
8221else
8222  tcl_cv_flag__largefile64_source=no
8223fi
8224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8225fi
8226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8227fi
8228
8229    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
8230
8231$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
8232
8233	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
8234    fi
8235
8236
8237    if ${tcl_cv_flag__largefile_source64+:} false; then :
8238  $as_echo_n "(cached) " >&6
8239else
8240  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8241/* end confdefs.h.  */
8242#include <sys/stat.h>
8243int
8244main ()
8245{
8246char *p = (char *)open64;
8247  ;
8248  return 0;
8249}
8250_ACEOF
8251if ac_fn_c_try_compile "$LINENO"; then :
8252  tcl_cv_flag__largefile_source64=no
8253else
8254  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8255/* end confdefs.h.  */
8256#define _LARGEFILE_SOURCE64 1
8257#include <sys/stat.h>
8258int
8259main ()
8260{
8261char *p = (char *)open64;
8262  ;
8263  return 0;
8264}
8265_ACEOF
8266if ac_fn_c_try_compile "$LINENO"; then :
8267  tcl_cv_flag__largefile_source64=yes
8268else
8269  tcl_cv_flag__largefile_source64=no
8270fi
8271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8272fi
8273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8274fi
8275
8276    if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then
8277
8278$as_echo "#define _LARGEFILE_SOURCE64 1" >>confdefs.h
8279
8280	tcl_flags="$tcl_flags _LARGEFILE_SOURCE64"
8281    fi
8282
8283    if test "x${tcl_flags}" = "x" ; then
8284	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
8285$as_echo "none" >&6; }
8286    else
8287	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${tcl_flags}" >&5
8288$as_echo "${tcl_flags}" >&6; }
8289    fi
8290
8291
8292    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit integer type" >&5
8293$as_echo_n "checking for 64-bit integer type... " >&6; }
8294    if ${tcl_cv_type_64bit+:} false; then :
8295  $as_echo_n "(cached) " >&6
8296else
8297
8298	tcl_cv_type_64bit=none
8299	# See if the compiler knows natively about __int64
8300	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8301/* end confdefs.h.  */
8302
8303int
8304main ()
8305{
8306__int64 value = (__int64) 0;
8307  ;
8308  return 0;
8309}
8310_ACEOF
8311if ac_fn_c_try_compile "$LINENO"; then :
8312  tcl_type_64bit=__int64
8313else
8314  tcl_type_64bit="long long"
8315fi
8316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8317	# See if we should use long anyway  Note that we substitute in the
8318	# type that is our current guess for a 64-bit type inside this check
8319	# program, so it should be modified only carefully...
8320        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8321/* end confdefs.h.  */
8322
8323int
8324main ()
8325{
8326switch (0) {
8327            case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
8328        }
8329  ;
8330  return 0;
8331}
8332_ACEOF
8333if ac_fn_c_try_compile "$LINENO"; then :
8334  tcl_cv_type_64bit=${tcl_type_64bit}
8335fi
8336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8337fi
8338
8339    if test "${tcl_cv_type_64bit}" = none ; then
8340
8341$as_echo "#define TCL_WIDE_INT_IS_LONG 1" >>confdefs.h
8342
8343	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: using long" >&5
8344$as_echo "using long" >&6; }
8345    elif test "${tcl_cv_type_64bit}" = "__int64" \
8346		-a "${TEA_PLATFORM}" = "windows" ; then
8347	# TEA specific: We actually want to use the default tcl.h checks in
8348	# this case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER*
8349	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: using Tcl header defaults" >&5
8350$as_echo "using Tcl header defaults" >&6; }
8351    else
8352
8353cat >>confdefs.h <<_ACEOF
8354#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
8355_ACEOF
8356
8357	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${tcl_cv_type_64bit}" >&5
8358$as_echo "${tcl_cv_type_64bit}" >&6; }
8359
8360	# Now check for auxiliary declarations
8361	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent64" >&5
8362$as_echo_n "checking for struct dirent64... " >&6; }
8363if ${tcl_cv_struct_dirent64+:} false; then :
8364  $as_echo_n "(cached) " >&6
8365else
8366
8367	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8368/* end confdefs.h.  */
8369#include <sys/types.h>
8370#include <dirent.h>
8371int
8372main ()
8373{
8374struct dirent64 p;
8375  ;
8376  return 0;
8377}
8378_ACEOF
8379if ac_fn_c_try_compile "$LINENO"; then :
8380  tcl_cv_struct_dirent64=yes
8381else
8382  tcl_cv_struct_dirent64=no
8383fi
8384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8385fi
8386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_dirent64" >&5
8387$as_echo "$tcl_cv_struct_dirent64" >&6; }
8388	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
8389
8390$as_echo "#define HAVE_STRUCT_DIRENT64 1" >>confdefs.h
8391
8392	fi
8393
8394	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct stat64" >&5
8395$as_echo_n "checking for struct stat64... " >&6; }
8396if ${tcl_cv_struct_stat64+:} false; then :
8397  $as_echo_n "(cached) " >&6
8398else
8399
8400	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8401/* end confdefs.h.  */
8402#include <sys/stat.h>
8403int
8404main ()
8405{
8406struct stat64 p;
8407
8408  ;
8409  return 0;
8410}
8411_ACEOF
8412if ac_fn_c_try_compile "$LINENO"; then :
8413  tcl_cv_struct_stat64=yes
8414else
8415  tcl_cv_struct_stat64=no
8416fi
8417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8418fi
8419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_stat64" >&5
8420$as_echo "$tcl_cv_struct_stat64" >&6; }
8421	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
8422
8423$as_echo "#define HAVE_STRUCT_STAT64 1" >>confdefs.h
8424
8425	fi
8426
8427	for ac_func in open64 lseek64
8428do :
8429  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8430ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8431if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8432  cat >>confdefs.h <<_ACEOF
8433#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8434_ACEOF
8435
8436fi
8437done
8438
8439	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for off64_t" >&5
8440$as_echo_n "checking for off64_t... " >&6; }
8441	if ${tcl_cv_type_off64_t+:} false; then :
8442  $as_echo_n "(cached) " >&6
8443else
8444
8445	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8446/* end confdefs.h.  */
8447#include <sys/types.h>
8448int
8449main ()
8450{
8451off64_t offset;
8452
8453  ;
8454  return 0;
8455}
8456_ACEOF
8457if ac_fn_c_try_compile "$LINENO"; then :
8458  tcl_cv_type_off64_t=yes
8459else
8460  tcl_cv_type_off64_t=no
8461fi
8462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8463fi
8464
8465			if test "x${tcl_cv_type_off64_t}" = "xyes" && \
8466	        test "x${ac_cv_func_lseek64}" = "xyes" && \
8467	        test "x${ac_cv_func_open64}" = "xyes" ; then
8468
8469$as_echo "#define HAVE_TYPE_OFF64_T 1" >>confdefs.h
8470
8471	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8472$as_echo "yes" >&6; }
8473	else
8474	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8475$as_echo "no" >&6; }
8476	fi
8477    fi
8478
8479
8480
8481#--------------------------------------------------------------------
8482# Set the default compiler switches based on the --enable-symbols option.
8483#--------------------------------------------------------------------
8484
8485
8486
8487    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build with symbols" >&5
8488$as_echo_n "checking for build with symbols... " >&6; }
8489    # Check whether --enable-symbols was given.
8490if test "${enable_symbols+set}" = set; then :
8491  enableval=$enable_symbols; tcl_ok=$enableval
8492else
8493  tcl_ok=no
8494fi
8495
8496    DBGX=""
8497    if test "$tcl_ok" = "no"; then
8498	CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE} -DNDEBUG"
8499	LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
8500	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8501$as_echo "no" >&6; }
8502    else
8503	CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
8504	LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
8505	if test "$tcl_ok" = "yes"; then
8506	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (standard debugging)" >&5
8507$as_echo "yes (standard debugging)" >&6; }
8508	fi
8509    fi
8510    # TEA specific:
8511    if test "${TEA_PLATFORM}" != "windows" ; then
8512	LDFLAGS_DEFAULT="${LDFLAGS}"
8513    fi
8514
8515
8516
8517
8518    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
8519
8520$as_echo "#define TCL_MEM_DEBUG 1" >>confdefs.h
8521
8522    fi
8523
8524    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
8525	if test "$tcl_ok" = "all"; then
8526	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled symbols mem debugging" >&5
8527$as_echo "enabled symbols mem debugging" >&6; }
8528	else
8529	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled $tcl_ok debugging" >&5
8530$as_echo "enabled $tcl_ok debugging" >&6; }
8531	fi
8532    fi
8533
8534
8535#--------------------------------------------------------------------
8536# Everyone should be linking against the Tcl stub library.  If you
8537# can't for some reason, remove this definition.  If you aren't using
8538# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
8539# link against the non-stubbed Tcl library.  Add Tk too if necessary.
8540#--------------------------------------------------------------------
8541
8542
8543$as_echo "#define USE_TCL_STUBS 1" >>confdefs.h
8544
8545#AC_DEFINE(USE_TK_STUBS, 1, [Use Tk stubs])
8546
8547
8548#--------------------------------------------------------------------
8549# Redefine fdatasync as fsync on systems that lack fdatasync
8550#--------------------------------------------------------------------
8551#
8552#AC_CHECK_FUNC(fdatasync, , AC_DEFINE(fdatasync, fsync))
8553# Check for library functions that SQLite can optionally use.
8554for ac_func in fdatasync usleep fullfsync localtime_r gmtime_r
8555do :
8556  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8557ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8558if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8559  cat >>confdefs.h <<_ACEOF
8560#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8561_ACEOF
8562
8563fi
8564done
8565
8566
8567ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
8568if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
8569  ac_have_decl=1
8570else
8571  ac_have_decl=0
8572fi
8573
8574cat >>confdefs.h <<_ACEOF
8575#define HAVE_DECL_STRERROR_R $ac_have_decl
8576_ACEOF
8577
8578for ac_func in strerror_r
8579do :
8580  ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
8581if test "x$ac_cv_func_strerror_r" = xyes; then :
8582  cat >>confdefs.h <<_ACEOF
8583#define HAVE_STRERROR_R 1
8584_ACEOF
8585
8586fi
8587done
8588
8589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
8590$as_echo_n "checking whether strerror_r returns char *... " >&6; }
8591if ${ac_cv_func_strerror_r_char_p+:} false; then :
8592  $as_echo_n "(cached) " >&6
8593else
8594
8595    ac_cv_func_strerror_r_char_p=no
8596    if test $ac_cv_have_decl_strerror_r = yes; then
8597      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8598/* end confdefs.h.  */
8599$ac_includes_default
8600int
8601main ()
8602{
8603
8604	  char buf[100];
8605	  char x = *strerror_r (0, buf, sizeof buf);
8606	  char *p = strerror_r (0, buf, sizeof buf);
8607	  return !p || x;
8608
8609  ;
8610  return 0;
8611}
8612_ACEOF
8613if ac_fn_c_try_compile "$LINENO"; then :
8614  ac_cv_func_strerror_r_char_p=yes
8615fi
8616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8617    else
8618      # strerror_r is not declared.  Choose between
8619      # systems that have relatively inaccessible declarations for the
8620      # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
8621      # former has a strerror_r that returns char*, while the latter
8622      # has a strerror_r that returns `int'.
8623      # This test should segfault on the DEC system.
8624      if test "$cross_compiling" = yes; then :
8625  :
8626else
8627  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8628/* end confdefs.h.  */
8629$ac_includes_default
8630	extern char *strerror_r ();
8631int
8632main ()
8633{
8634char buf[100];
8635	  char x = *strerror_r (0, buf, sizeof buf);
8636	  return ! isalpha (x);
8637  ;
8638  return 0;
8639}
8640_ACEOF
8641if ac_fn_c_try_run "$LINENO"; then :
8642  ac_cv_func_strerror_r_char_p=yes
8643fi
8644rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8645  conftest.$ac_objext conftest.beam conftest.$ac_ext
8646fi
8647
8648    fi
8649
8650fi
8651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
8652$as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
8653if test $ac_cv_func_strerror_r_char_p = yes; then
8654
8655$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
8656
8657fi
8658
8659
8660
8661#--------------------------------------------------------------------
8662# This macro generates a line to use when building a library.  It
8663# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
8664# and TEA_LOAD_TCLCONFIG macros above.
8665#--------------------------------------------------------------------
8666
8667
8668    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
8669	MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(PKG_OBJECTS)"
8670	MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\$@ \$(PKG_OBJECTS)"
8671	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8672/* end confdefs.h.  */
8673
8674#if defined(_MSC_VER) && _MSC_VER >= 1400
8675print("manifest needed")
8676#endif
8677
8678_ACEOF
8679if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8680  $EGREP "manifest needed" >/dev/null 2>&1; then :
8681
8682	# Could do a CHECK_PROG for mt, but should always be with MSVC8+
8683	VC_MANIFEST_EMBED_DLL="if test -f \$@.manifest ; then mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;2 ; fi"
8684	VC_MANIFEST_EMBED_EXE="if test -f \$@.manifest ; then mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;1 ; fi"
8685	MAKE_SHARED_LIB="${MAKE_SHARED_LIB} ; ${VC_MANIFEST_EMBED_DLL}"
8686
8687    CLEANFILES="$CLEANFILES *.manifest"
8688
8689
8690fi
8691rm -f conftest*
8692
8693	MAKE_STUB_LIB="\${STLIB_LD} -nodefaultlib -out:\$@ \$(PKG_STUB_OBJECTS)"
8694    else
8695	MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(PKG_OBJECTS)"
8696	MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
8697	MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(PKG_STUB_OBJECTS)"
8698    fi
8699
8700    if test "${SHARED_BUILD}" = "1" ; then
8701	MAKE_LIB="${MAKE_SHARED_LIB} "
8702    else
8703	MAKE_LIB="${MAKE_STATIC_LIB} "
8704    fi
8705
8706    #--------------------------------------------------------------------
8707    # Shared libraries and static libraries have different names.
8708    # Use the double eval to make sure any variables in the suffix is
8709    # substituted. (@@@ Might not be necessary anymore)
8710    #--------------------------------------------------------------------
8711
8712    if test "${TEA_PLATFORM}" = "windows" ; then
8713	if test "${SHARED_BUILD}" = "1" ; then
8714	    # We force the unresolved linking of symbols that are really in
8715	    # the private libraries of Tcl and Tk.
8716	    if test x"${TK_BIN_DIR}" != x ; then
8717		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
8718	    fi
8719	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
8720	    if test "$GCC" = "yes"; then
8721		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc"
8722	    fi
8723	    eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
8724	else
8725	    eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
8726	    if test "$GCC" = "yes"; then
8727		PKG_LIB_FILE=lib${PKG_LIB_FILE}
8728	    fi
8729	fi
8730	# Some packages build their own stubs libraries
8731	eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
8732	if test "$GCC" = "yes"; then
8733	    PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
8734	fi
8735	# These aren't needed on Windows (either MSVC or gcc)
8736	RANLIB=:
8737	RANLIB_STUB=:
8738    else
8739	RANLIB_STUB="${RANLIB}"
8740	if test "${SHARED_BUILD}" = "1" ; then
8741	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
8742	    if test x"${TK_BIN_DIR}" != x ; then
8743		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
8744	    fi
8745	    eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
8746	    RANLIB=:
8747	else
8748	    eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
8749	fi
8750	# Some packages build their own stubs libraries
8751	eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
8752    fi
8753
8754    # These are escaped so that only CFLAGS is picked up at configure time.
8755    # The other values will be substituted at make time.
8756    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
8757    if test "${SHARED_BUILD}" = "1" ; then
8758	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
8759    fi
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770#--------------------------------------------------------------------
8771# Determine the name of the tclsh and/or wish executables in the
8772# Tcl and Tk build directories or the location they were installed
8773# into. These paths are used to support running test cases only,
8774# the Makefile should not be making use of these paths to generate
8775# a pkgIndex.tcl file or anything else at extension build time.
8776#--------------------------------------------------------------------
8777
8778
8779    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclsh" >&5
8780$as_echo_n "checking for tclsh... " >&6; }
8781    if test -f "${TCL_BIN_DIR}/Makefile" ; then
8782        # tclConfig.sh is in Tcl build directory
8783        if test "${TEA_PLATFORM}" = "windows"; then
8784            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
8785        else
8786            TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
8787        fi
8788    else
8789        # tclConfig.sh is in install location
8790        if test "${TEA_PLATFORM}" = "windows"; then
8791            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
8792        else
8793            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}"
8794        fi
8795        list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
8796              `ls -d ${TCL_BIN_DIR}/..     2>/dev/null` \
8797              `ls -d ${TCL_PREFIX}/bin     2>/dev/null`"
8798        for i in $list ; do
8799            if test -f "$i/${TCLSH_PROG}" ; then
8800                REAL_TCL_BIN_DIR="`cd "$i"; pwd`/"
8801                break
8802            fi
8803        done
8804        TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}"
8805    fi
8806    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${TCLSH_PROG}" >&5
8807$as_echo "${TCLSH_PROG}" >&6; }
8808
8809
8810#TEA_PROG_WISH
8811
8812#--------------------------------------------------------------------
8813# Finally, substitute all of the various values into the Makefile.
8814# You may alternatively have a special pkgIndex.tcl.in or other files
8815# which require substituting th AC variables in.  Include these here.
8816#--------------------------------------------------------------------
8817
8818ac_config_files="$ac_config_files Makefile pkgIndex.tcl"
8819
8820cat >confcache <<\_ACEOF
8821# This file is a shell script that caches the results of configure
8822# tests run on this system so they can be shared between configure
8823# scripts and configure runs, see configure's option --config-cache.
8824# It is not useful on other systems.  If it contains results you don't
8825# want to keep, you may remove or edit it.
8826#
8827# config.status only pays attention to the cache file if you give it
8828# the --recheck option to rerun configure.
8829#
8830# `ac_cv_env_foo' variables (set or unset) will be overridden when
8831# loading this file, other *unset* `ac_cv_foo' will be assigned the
8832# following values.
8833
8834_ACEOF
8835
8836# The following way of writing the cache mishandles newlines in values,
8837# but we know of no workaround that is simple, portable, and efficient.
8838# So, we kill variables containing newlines.
8839# Ultrix sh set writes to stderr and can't be redirected directly,
8840# and sets the high bit in the cache file unless we assign to the vars.
8841(
8842  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
8843    eval ac_val=\$$ac_var
8844    case $ac_val in #(
8845    *${as_nl}*)
8846      case $ac_var in #(
8847      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
8848$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
8849      esac
8850      case $ac_var in #(
8851      _ | IFS | as_nl) ;; #(
8852      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
8853      *) { eval $ac_var=; unset $ac_var;} ;;
8854      esac ;;
8855    esac
8856  done
8857
8858  (set) 2>&1 |
8859    case $as_nl`(ac_space=' '; set) 2>&1` in #(
8860    *${as_nl}ac_space=\ *)
8861      # `set' does not quote correctly, so add quotes: double-quote
8862      # substitution turns \\\\ into \\, and sed turns \\ into \.
8863      sed -n \
8864	"s/'/'\\\\''/g;
8865	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
8866      ;; #(
8867    *)
8868      # `set' quotes correctly as required by POSIX, so do not add quotes.
8869      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
8870      ;;
8871    esac |
8872    sort
8873) |
8874  sed '
8875     /^ac_cv_env_/b end
8876     t clear
8877     :clear
8878     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
8879     t end
8880     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
8881     :end' >>confcache
8882if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
8883  if test -w "$cache_file"; then
8884    if test "x$cache_file" != "x/dev/null"; then
8885      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
8886$as_echo "$as_me: updating cache $cache_file" >&6;}
8887      if test ! -f "$cache_file" || test -h "$cache_file"; then
8888	cat confcache >"$cache_file"
8889      else
8890        case $cache_file in #(
8891        */* | ?:*)
8892	  mv -f confcache "$cache_file"$$ &&
8893	  mv -f "$cache_file"$$ "$cache_file" ;; #(
8894        *)
8895	  mv -f confcache "$cache_file" ;;
8896	esac
8897      fi
8898    fi
8899  else
8900    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
8901$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
8902  fi
8903fi
8904rm -f confcache
8905
8906test "x$prefix" = xNONE && prefix=$ac_default_prefix
8907# Let make expand exec_prefix.
8908test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8909
8910# Transform confdefs.h into DEFS.
8911# Protect against shell expansion while executing Makefile rules.
8912# Protect against Makefile macro expansion.
8913#
8914# If the first sed substitution is executed (which looks for macros that
8915# take arguments), then branch to the quote section.  Otherwise,
8916# look for a macro that doesn't take arguments.
8917ac_script='
8918:mline
8919/\\$/{
8920 N
8921 s,\\\n,,
8922 b mline
8923}
8924t clear
8925:clear
8926s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
8927t quote
8928s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
8929t quote
8930b any
8931:quote
8932s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
8933s/\[/\\&/g
8934s/\]/\\&/g
8935s/\$/$$/g
8936H
8937:any
8938${
8939	g
8940	s/^\n//
8941	s/\n/ /g
8942	p
8943}
8944'
8945DEFS=`sed -n "$ac_script" confdefs.h`
8946
8947
8948ac_libobjs=
8949ac_ltlibobjs=
8950U=
8951for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
8952  # 1. Remove the extension, and $U if already installed.
8953  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
8954  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
8955  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
8956  #    will be set to the directory where LIBOBJS objects are built.
8957  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
8958  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
8959done
8960LIBOBJS=$ac_libobjs
8961
8962LTLIBOBJS=$ac_ltlibobjs
8963
8964
8965
8966CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""
8967
8968: "${CONFIG_STATUS=./config.status}"
8969ac_write_fail=0
8970ac_clean_files_save=$ac_clean_files
8971ac_clean_files="$ac_clean_files $CONFIG_STATUS"
8972{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
8973$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
8974as_write_fail=0
8975cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
8976#! $SHELL
8977# Generated by $as_me.
8978# Run this file to recreate the current configuration.
8979# Compiler output produced by configure, useful for debugging
8980# configure, is in config.log if it exists.
8981
8982debug=false
8983ac_cs_recheck=false
8984ac_cs_silent=false
8985
8986SHELL=\${CONFIG_SHELL-$SHELL}
8987export SHELL
8988_ASEOF
8989cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
8990## -------------------- ##
8991## M4sh Initialization. ##
8992## -------------------- ##
8993
8994# Be more Bourne compatible
8995DUALCASE=1; export DUALCASE # for MKS sh
8996if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
8997  emulate sh
8998  NULLCMD=:
8999  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
9000  # is contrary to our usage.  Disable this feature.
9001  alias -g '${1+"$@"}'='"$@"'
9002  setopt NO_GLOB_SUBST
9003else
9004  case `(set -o) 2>/dev/null` in #(
9005  *posix*) :
9006    set -o posix ;; #(
9007  *) :
9008     ;;
9009esac
9010fi
9011
9012
9013as_nl='
9014'
9015export as_nl
9016# Printing a long string crashes Solaris 7 /usr/bin/printf.
9017as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
9018as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
9019as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
9020# Prefer a ksh shell builtin over an external printf program on Solaris,
9021# but without wasting forks for bash or zsh.
9022if test -z "$BASH_VERSION$ZSH_VERSION" \
9023    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
9024  as_echo='print -r --'
9025  as_echo_n='print -rn --'
9026elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
9027  as_echo='printf %s\n'
9028  as_echo_n='printf %s'
9029else
9030  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
9031    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
9032    as_echo_n='/usr/ucb/echo -n'
9033  else
9034    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
9035    as_echo_n_body='eval
9036      arg=$1;
9037      case $arg in #(
9038      *"$as_nl"*)
9039	expr "X$arg" : "X\\(.*\\)$as_nl";
9040	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
9041      esac;
9042      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
9043    '
9044    export as_echo_n_body
9045    as_echo_n='sh -c $as_echo_n_body as_echo'
9046  fi
9047  export as_echo_body
9048  as_echo='sh -c $as_echo_body as_echo'
9049fi
9050
9051# The user is always right.
9052if test "${PATH_SEPARATOR+set}" != set; then
9053  PATH_SEPARATOR=:
9054  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
9055    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
9056      PATH_SEPARATOR=';'
9057  }
9058fi
9059
9060
9061# IFS
9062# We need space, tab and new line, in precisely that order.  Quoting is
9063# there to prevent editors from complaining about space-tab.
9064# (If _AS_PATH_WALK were called with IFS unset, it would disable word
9065# splitting by setting IFS to empty value.)
9066IFS=" ""	$as_nl"
9067
9068# Find who we are.  Look in the path if we contain no directory separator.
9069as_myself=
9070case $0 in #((
9071  *[\\/]* ) as_myself=$0 ;;
9072  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9073for as_dir in $PATH
9074do
9075  IFS=$as_save_IFS
9076  test -z "$as_dir" && as_dir=.
9077    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
9078  done
9079IFS=$as_save_IFS
9080
9081     ;;
9082esac
9083# We did not find ourselves, most probably we were run as `sh COMMAND'
9084# in which case we are not to be found in the path.
9085if test "x$as_myself" = x; then
9086  as_myself=$0
9087fi
9088if test ! -f "$as_myself"; then
9089  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
9090  exit 1
9091fi
9092
9093# Unset variables that we do not need and which cause bugs (e.g. in
9094# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
9095# suppresses any "Segmentation fault" message there.  '((' could
9096# trigger a bug in pdksh 5.2.14.
9097for as_var in BASH_ENV ENV MAIL MAILPATH
9098do eval test x\${$as_var+set} = xset \
9099  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
9100done
9101PS1='$ '
9102PS2='> '
9103PS4='+ '
9104
9105# NLS nuisances.
9106LC_ALL=C
9107export LC_ALL
9108LANGUAGE=C
9109export LANGUAGE
9110
9111# CDPATH.
9112(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
9113
9114
9115# as_fn_error STATUS ERROR [LINENO LOG_FD]
9116# ----------------------------------------
9117# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
9118# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
9119# script with STATUS, using 1 if that was 0.
9120as_fn_error ()
9121{
9122  as_status=$1; test $as_status -eq 0 && as_status=1
9123  if test "$4"; then
9124    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
9125    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
9126  fi
9127  $as_echo "$as_me: error: $2" >&2
9128  as_fn_exit $as_status
9129} # as_fn_error
9130
9131
9132# as_fn_set_status STATUS
9133# -----------------------
9134# Set $? to STATUS, without forking.
9135as_fn_set_status ()
9136{
9137  return $1
9138} # as_fn_set_status
9139
9140# as_fn_exit STATUS
9141# -----------------
9142# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
9143as_fn_exit ()
9144{
9145  set +e
9146  as_fn_set_status $1
9147  exit $1
9148} # as_fn_exit
9149
9150# as_fn_unset VAR
9151# ---------------
9152# Portably unset VAR.
9153as_fn_unset ()
9154{
9155  { eval $1=; unset $1;}
9156}
9157as_unset=as_fn_unset
9158# as_fn_append VAR VALUE
9159# ----------------------
9160# Append the text in VALUE to the end of the definition contained in VAR. Take
9161# advantage of any shell optimizations that allow amortized linear growth over
9162# repeated appends, instead of the typical quadratic growth present in naive
9163# implementations.
9164if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
9165  eval 'as_fn_append ()
9166  {
9167    eval $1+=\$2
9168  }'
9169else
9170  as_fn_append ()
9171  {
9172    eval $1=\$$1\$2
9173  }
9174fi # as_fn_append
9175
9176# as_fn_arith ARG...
9177# ------------------
9178# Perform arithmetic evaluation on the ARGs, and store the result in the
9179# global $as_val. Take advantage of shells that can avoid forks. The arguments
9180# must be portable across $(()) and expr.
9181if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
9182  eval 'as_fn_arith ()
9183  {
9184    as_val=$(( $* ))
9185  }'
9186else
9187  as_fn_arith ()
9188  {
9189    as_val=`expr "$@" || test $? -eq 1`
9190  }
9191fi # as_fn_arith
9192
9193
9194if expr a : '\(a\)' >/dev/null 2>&1 &&
9195   test "X`expr 00001 : '.*\(...\)'`" = X001; then
9196  as_expr=expr
9197else
9198  as_expr=false
9199fi
9200
9201if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
9202  as_basename=basename
9203else
9204  as_basename=false
9205fi
9206
9207if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
9208  as_dirname=dirname
9209else
9210  as_dirname=false
9211fi
9212
9213as_me=`$as_basename -- "$0" ||
9214$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
9215	 X"$0" : 'X\(//\)$' \| \
9216	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
9217$as_echo X/"$0" |
9218    sed '/^.*\/\([^/][^/]*\)\/*$/{
9219	    s//\1/
9220	    q
9221	  }
9222	  /^X\/\(\/\/\)$/{
9223	    s//\1/
9224	    q
9225	  }
9226	  /^X\/\(\/\).*/{
9227	    s//\1/
9228	    q
9229	  }
9230	  s/.*/./; q'`
9231
9232# Avoid depending upon Character Ranges.
9233as_cr_letters='abcdefghijklmnopqrstuvwxyz'
9234as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
9235as_cr_Letters=$as_cr_letters$as_cr_LETTERS
9236as_cr_digits='0123456789'
9237as_cr_alnum=$as_cr_Letters$as_cr_digits
9238
9239ECHO_C= ECHO_N= ECHO_T=
9240case `echo -n x` in #(((((
9241-n*)
9242  case `echo 'xy\c'` in
9243  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
9244  xy)  ECHO_C='\c';;
9245  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
9246       ECHO_T='	';;
9247  esac;;
9248*)
9249  ECHO_N='-n';;
9250esac
9251
9252rm -f conf$$ conf$$.exe conf$$.file
9253if test -d conf$$.dir; then
9254  rm -f conf$$.dir/conf$$.file
9255else
9256  rm -f conf$$.dir
9257  mkdir conf$$.dir 2>/dev/null
9258fi
9259if (echo >conf$$.file) 2>/dev/null; then
9260  if ln -s conf$$.file conf$$ 2>/dev/null; then
9261    as_ln_s='ln -s'
9262    # ... but there are two gotchas:
9263    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
9264    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
9265    # In both cases, we have to default to `cp -pR'.
9266    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
9267      as_ln_s='cp -pR'
9268  elif ln conf$$.file conf$$ 2>/dev/null; then
9269    as_ln_s=ln
9270  else
9271    as_ln_s='cp -pR'
9272  fi
9273else
9274  as_ln_s='cp -pR'
9275fi
9276rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
9277rmdir conf$$.dir 2>/dev/null
9278
9279
9280# as_fn_mkdir_p
9281# -------------
9282# Create "$as_dir" as a directory, including parents if necessary.
9283as_fn_mkdir_p ()
9284{
9285
9286  case $as_dir in #(
9287  -*) as_dir=./$as_dir;;
9288  esac
9289  test -d "$as_dir" || eval $as_mkdir_p || {
9290    as_dirs=
9291    while :; do
9292      case $as_dir in #(
9293      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
9294      *) as_qdir=$as_dir;;
9295      esac
9296      as_dirs="'$as_qdir' $as_dirs"
9297      as_dir=`$as_dirname -- "$as_dir" ||
9298$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
9299	 X"$as_dir" : 'X\(//\)[^/]' \| \
9300	 X"$as_dir" : 'X\(//\)$' \| \
9301	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
9302$as_echo X"$as_dir" |
9303    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
9304	    s//\1/
9305	    q
9306	  }
9307	  /^X\(\/\/\)[^/].*/{
9308	    s//\1/
9309	    q
9310	  }
9311	  /^X\(\/\/\)$/{
9312	    s//\1/
9313	    q
9314	  }
9315	  /^X\(\/\).*/{
9316	    s//\1/
9317	    q
9318	  }
9319	  s/.*/./; q'`
9320      test -d "$as_dir" && break
9321    done
9322    test -z "$as_dirs" || eval "mkdir $as_dirs"
9323  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
9324
9325
9326} # as_fn_mkdir_p
9327if mkdir -p . 2>/dev/null; then
9328  as_mkdir_p='mkdir -p "$as_dir"'
9329else
9330  test -d ./-p && rmdir ./-p
9331  as_mkdir_p=false
9332fi
9333
9334
9335# as_fn_executable_p FILE
9336# -----------------------
9337# Test if FILE is an executable regular file.
9338as_fn_executable_p ()
9339{
9340  test -f "$1" && test -x "$1"
9341} # as_fn_executable_p
9342as_test_x='test -x'
9343as_executable_p=as_fn_executable_p
9344
9345# Sed expression to map a string onto a valid CPP name.
9346as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
9347
9348# Sed expression to map a string onto a valid variable name.
9349as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
9350
9351
9352exec 6>&1
9353## ----------------------------------- ##
9354## Main body of $CONFIG_STATUS script. ##
9355## ----------------------------------- ##
9356_ASEOF
9357test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
9358
9359cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9360# Save the log message, to keep $0 and so on meaningful, and to
9361# report actual input values of CONFIG_FILES etc. instead of their
9362# values after options handling.
9363ac_log="
9364This file was extended by sqlite $as_me 3.14.1, which was
9365generated by GNU Autoconf 2.69.  Invocation command line was
9366
9367  CONFIG_FILES    = $CONFIG_FILES
9368  CONFIG_HEADERS  = $CONFIG_HEADERS
9369  CONFIG_LINKS    = $CONFIG_LINKS
9370  CONFIG_COMMANDS = $CONFIG_COMMANDS
9371  $ $0 $@
9372
9373on `(hostname || uname -n) 2>/dev/null | sed 1q`
9374"
9375
9376_ACEOF
9377
9378case $ac_config_files in *"
9379"*) set x $ac_config_files; shift; ac_config_files=$*;;
9380esac
9381
9382
9383
9384cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9385# Files that config.status was made for.
9386config_files="$ac_config_files"
9387
9388_ACEOF
9389
9390cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9391ac_cs_usage="\
9392\`$as_me' instantiates files and other configuration actions
9393from templates according to the current configuration.  Unless the files
9394and actions are specified as TAGs, all are instantiated by default.
9395
9396Usage: $0 [OPTION]... [TAG]...
9397
9398  -h, --help       print this help, then exit
9399  -V, --version    print version number and configuration settings, then exit
9400      --config     print configuration, then exit
9401  -q, --quiet, --silent
9402                   do not print progress messages
9403  -d, --debug      don't remove temporary files
9404      --recheck    update $as_me by reconfiguring in the same conditions
9405      --file=FILE[:TEMPLATE]
9406                   instantiate the configuration file FILE
9407
9408Configuration files:
9409$config_files
9410
9411Report bugs to the package provider."
9412
9413_ACEOF
9414cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9415ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
9416ac_cs_version="\\
9417sqlite config.status 3.14.1
9418configured by $0, generated by GNU Autoconf 2.69,
9419  with options \\"\$ac_cs_config\\"
9420
9421Copyright (C) 2012 Free Software Foundation, Inc.
9422This config.status script is free software; the Free Software Foundation
9423gives unlimited permission to copy, distribute and modify it."
9424
9425ac_pwd='$ac_pwd'
9426srcdir='$srcdir'
9427test -n "\$AWK" || AWK=awk
9428_ACEOF
9429
9430cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9431# The default lists apply if the user does not specify any file.
9432ac_need_defaults=:
9433while test $# != 0
9434do
9435  case $1 in
9436  --*=?*)
9437    ac_option=`expr "X$1" : 'X\([^=]*\)='`
9438    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
9439    ac_shift=:
9440    ;;
9441  --*=)
9442    ac_option=`expr "X$1" : 'X\([^=]*\)='`
9443    ac_optarg=
9444    ac_shift=:
9445    ;;
9446  *)
9447    ac_option=$1
9448    ac_optarg=$2
9449    ac_shift=shift
9450    ;;
9451  esac
9452
9453  case $ac_option in
9454  # Handling of the options.
9455  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9456    ac_cs_recheck=: ;;
9457  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
9458    $as_echo "$ac_cs_version"; exit ;;
9459  --config | --confi | --conf | --con | --co | --c )
9460    $as_echo "$ac_cs_config"; exit ;;
9461  --debug | --debu | --deb | --de | --d | -d )
9462    debug=: ;;
9463  --file | --fil | --fi | --f )
9464    $ac_shift
9465    case $ac_optarg in
9466    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
9467    '') as_fn_error $? "missing file argument" ;;
9468    esac
9469    as_fn_append CONFIG_FILES " '$ac_optarg'"
9470    ac_need_defaults=false;;
9471  --he | --h |  --help | --hel | -h )
9472    $as_echo "$ac_cs_usage"; exit ;;
9473  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
9474  | -silent | --silent | --silen | --sile | --sil | --si | --s)
9475    ac_cs_silent=: ;;
9476
9477  # This is an error.
9478  -*) as_fn_error $? "unrecognized option: \`$1'
9479Try \`$0 --help' for more information." ;;
9480
9481  *) as_fn_append ac_config_targets " $1"
9482     ac_need_defaults=false ;;
9483
9484  esac
9485  shift
9486done
9487
9488ac_configure_extra_args=
9489
9490if $ac_cs_silent; then
9491  exec 6>/dev/null
9492  ac_configure_extra_args="$ac_configure_extra_args --silent"
9493fi
9494
9495_ACEOF
9496cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9497if \$ac_cs_recheck; then
9498  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
9499  shift
9500  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
9501  CONFIG_SHELL='$SHELL'
9502  export CONFIG_SHELL
9503  exec "\$@"
9504fi
9505
9506_ACEOF
9507cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9508exec 5>>config.log
9509{
9510  echo
9511  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
9512## Running $as_me. ##
9513_ASBOX
9514  $as_echo "$ac_log"
9515} >&5
9516
9517_ACEOF
9518cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9519_ACEOF
9520
9521cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9522
9523# Handling of arguments.
9524for ac_config_target in $ac_config_targets
9525do
9526  case $ac_config_target in
9527    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
9528    "pkgIndex.tcl") CONFIG_FILES="$CONFIG_FILES pkgIndex.tcl" ;;
9529
9530  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
9531  esac
9532done
9533
9534
9535# If the user did not use the arguments to specify the items to instantiate,
9536# then the envvar interface is used.  Set only those that are not.
9537# We use the long form for the default assignment because of an extremely
9538# bizarre bug on SunOS 4.1.3.
9539if $ac_need_defaults; then
9540  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
9541fi
9542
9543# Have a temporary directory for convenience.  Make it in the build tree
9544# simply because there is no reason against having it here, and in addition,
9545# creating and moving files from /tmp can sometimes cause problems.
9546# Hook for its removal unless debugging.
9547# Note that there is a small window in which the directory will not be cleaned:
9548# after its creation but before its name has been assigned to `$tmp'.
9549$debug ||
9550{
9551  tmp= ac_tmp=
9552  trap 'exit_status=$?
9553  : "${ac_tmp:=$tmp}"
9554  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
9555' 0
9556  trap 'as_fn_exit 1' 1 2 13 15
9557}
9558# Create a (secure) tmp directory for tmp files.
9559
9560{
9561  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
9562  test -d "$tmp"
9563}  ||
9564{
9565  tmp=./conf$$-$RANDOM
9566  (umask 077 && mkdir "$tmp")
9567} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
9568ac_tmp=$tmp
9569
9570# Set up the scripts for CONFIG_FILES section.
9571# No need to generate them if there are no CONFIG_FILES.
9572# This happens for instance with `./config.status config.h'.
9573if test -n "$CONFIG_FILES"; then
9574
9575
9576ac_cr=`echo X | tr X '\015'`
9577# On cygwin, bash can eat \r inside `` if the user requested igncr.
9578# But we know of no other shell where ac_cr would be empty at this
9579# point, so we can use a bashism as a fallback.
9580if test "x$ac_cr" = x; then
9581  eval ac_cr=\$\'\\r\'
9582fi
9583ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
9584if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
9585  ac_cs_awk_cr='\\r'
9586else
9587  ac_cs_awk_cr=$ac_cr
9588fi
9589
9590echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
9591_ACEOF
9592
9593
9594{
9595  echo "cat >conf$$subs.awk <<_ACEOF" &&
9596  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
9597  echo "_ACEOF"
9598} >conf$$subs.sh ||
9599  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
9600ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
9601ac_delim='%!_!# '
9602for ac_last_try in false false false false false :; do
9603  . ./conf$$subs.sh ||
9604    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
9605
9606  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
9607  if test $ac_delim_n = $ac_delim_num; then
9608    break
9609  elif $ac_last_try; then
9610    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
9611  else
9612    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
9613  fi
9614done
9615rm -f conf$$subs.sh
9616
9617cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9618cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
9619_ACEOF
9620sed -n '
9621h
9622s/^/S["/; s/!.*/"]=/
9623p
9624g
9625s/^[^!]*!//
9626:repl
9627t repl
9628s/'"$ac_delim"'$//
9629t delim
9630:nl
9631h
9632s/\(.\{148\}\)..*/\1/
9633t more1
9634s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
9635p
9636n
9637b repl
9638:more1
9639s/["\\]/\\&/g; s/^/"/; s/$/"\\/
9640p
9641g
9642s/.\{148\}//
9643t nl
9644:delim
9645h
9646s/\(.\{148\}\)..*/\1/
9647t more2
9648s/["\\]/\\&/g; s/^/"/; s/$/"/
9649p
9650b
9651:more2
9652s/["\\]/\\&/g; s/^/"/; s/$/"\\/
9653p
9654g
9655s/.\{148\}//
9656t delim
9657' <conf$$subs.awk | sed '
9658/^[^""]/{
9659  N
9660  s/\n//
9661}
9662' >>$CONFIG_STATUS || ac_write_fail=1
9663rm -f conf$$subs.awk
9664cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9665_ACAWK
9666cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
9667  for (key in S) S_is_set[key] = 1
9668  FS = ""
9669
9670}
9671{
9672  line = $ 0
9673  nfields = split(line, field, "@")
9674  substed = 0
9675  len = length(field[1])
9676  for (i = 2; i < nfields; i++) {
9677    key = field[i]
9678    keylen = length(key)
9679    if (S_is_set[key]) {
9680      value = S[key]
9681      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
9682      len += length(value) + length(field[++i])
9683      substed = 1
9684    } else
9685      len += 1 + keylen
9686  }
9687
9688  print line
9689}
9690
9691_ACAWK
9692_ACEOF
9693cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9694if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
9695  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
9696else
9697  cat
9698fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
9699  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
9700_ACEOF
9701
9702# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
9703# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
9704# trailing colons and then remove the whole line if VPATH becomes empty
9705# (actually we leave an empty line to preserve line numbers).
9706if test "x$srcdir" = x.; then
9707  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
9708h
9709s///
9710s/^/:/
9711s/[	 ]*$/:/
9712s/:\$(srcdir):/:/g
9713s/:\${srcdir}:/:/g
9714s/:@srcdir@:/:/g
9715s/^:*//
9716s/:*$//
9717x
9718s/\(=[	 ]*\).*/\1/
9719G
9720s/\n//
9721s/^[^=]*=[	 ]*$//
9722}'
9723fi
9724
9725cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9726fi # test -n "$CONFIG_FILES"
9727
9728
9729eval set X "  :F $CONFIG_FILES      "
9730shift
9731for ac_tag
9732do
9733  case $ac_tag in
9734  :[FHLC]) ac_mode=$ac_tag; continue;;
9735  esac
9736  case $ac_mode$ac_tag in
9737  :[FHL]*:*);;
9738  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
9739  :[FH]-) ac_tag=-:-;;
9740  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
9741  esac
9742  ac_save_IFS=$IFS
9743  IFS=:
9744  set x $ac_tag
9745  IFS=$ac_save_IFS
9746  shift
9747  ac_file=$1
9748  shift
9749
9750  case $ac_mode in
9751  :L) ac_source=$1;;
9752  :[FH])
9753    ac_file_inputs=
9754    for ac_f
9755    do
9756      case $ac_f in
9757      -) ac_f="$ac_tmp/stdin";;
9758      *) # Look for the file first in the build tree, then in the source tree
9759	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
9760	 # because $ac_f cannot contain `:'.
9761	 test -f "$ac_f" ||
9762	   case $ac_f in
9763	   [\\/$]*) false;;
9764	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
9765	   esac ||
9766	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
9767      esac
9768      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
9769      as_fn_append ac_file_inputs " '$ac_f'"
9770    done
9771
9772    # Let's still pretend it is `configure' which instantiates (i.e., don't
9773    # use $as_me), people would be surprised to read:
9774    #    /* config.h.  Generated by config.status.  */
9775    configure_input='Generated from '`
9776	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
9777	`' by configure.'
9778    if test x"$ac_file" != x-; then
9779      configure_input="$ac_file.  $configure_input"
9780      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
9781$as_echo "$as_me: creating $ac_file" >&6;}
9782    fi
9783    # Neutralize special characters interpreted by sed in replacement strings.
9784    case $configure_input in #(
9785    *\&* | *\|* | *\\* )
9786       ac_sed_conf_input=`$as_echo "$configure_input" |
9787       sed 's/[\\\\&|]/\\\\&/g'`;; #(
9788    *) ac_sed_conf_input=$configure_input;;
9789    esac
9790
9791    case $ac_tag in
9792    *:-:* | *:-) cat >"$ac_tmp/stdin" \
9793      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
9794    esac
9795    ;;
9796  esac
9797
9798  ac_dir=`$as_dirname -- "$ac_file" ||
9799$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
9800	 X"$ac_file" : 'X\(//\)[^/]' \| \
9801	 X"$ac_file" : 'X\(//\)$' \| \
9802	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
9803$as_echo X"$ac_file" |
9804    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
9805	    s//\1/
9806	    q
9807	  }
9808	  /^X\(\/\/\)[^/].*/{
9809	    s//\1/
9810	    q
9811	  }
9812	  /^X\(\/\/\)$/{
9813	    s//\1/
9814	    q
9815	  }
9816	  /^X\(\/\).*/{
9817	    s//\1/
9818	    q
9819	  }
9820	  s/.*/./; q'`
9821  as_dir="$ac_dir"; as_fn_mkdir_p
9822  ac_builddir=.
9823
9824case "$ac_dir" in
9825.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
9826*)
9827  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
9828  # A ".." for each directory in $ac_dir_suffix.
9829  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
9830  case $ac_top_builddir_sub in
9831  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
9832  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
9833  esac ;;
9834esac
9835ac_abs_top_builddir=$ac_pwd
9836ac_abs_builddir=$ac_pwd$ac_dir_suffix
9837# for backward compatibility:
9838ac_top_builddir=$ac_top_build_prefix
9839
9840case $srcdir in
9841  .)  # We are building in place.
9842    ac_srcdir=.
9843    ac_top_srcdir=$ac_top_builddir_sub
9844    ac_abs_top_srcdir=$ac_pwd ;;
9845  [\\/]* | ?:[\\/]* )  # Absolute name.
9846    ac_srcdir=$srcdir$ac_dir_suffix;
9847    ac_top_srcdir=$srcdir
9848    ac_abs_top_srcdir=$srcdir ;;
9849  *) # Relative name.
9850    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
9851    ac_top_srcdir=$ac_top_build_prefix$srcdir
9852    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
9853esac
9854ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
9855
9856
9857  case $ac_mode in
9858  :F)
9859  #
9860  # CONFIG_FILE
9861  #
9862
9863_ACEOF
9864
9865cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9866# If the template does not know about datarootdir, expand it.
9867# FIXME: This hack should be removed a few years after 2.60.
9868ac_datarootdir_hack=; ac_datarootdir_seen=
9869ac_sed_dataroot='
9870/datarootdir/ {
9871  p
9872  q
9873}
9874/@datadir@/p
9875/@docdir@/p
9876/@infodir@/p
9877/@localedir@/p
9878/@mandir@/p'
9879case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
9880*datarootdir*) ac_datarootdir_seen=yes;;
9881*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
9882  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
9883$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
9884_ACEOF
9885cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9886  ac_datarootdir_hack='
9887  s&@datadir@&$datadir&g
9888  s&@docdir@&$docdir&g
9889  s&@infodir@&$infodir&g
9890  s&@localedir@&$localedir&g
9891  s&@mandir@&$mandir&g
9892  s&\\\${datarootdir}&$datarootdir&g' ;;
9893esac
9894_ACEOF
9895
9896# Neutralize VPATH when `$srcdir' = `.'.
9897# Shell code in configure.ac might set extrasub.
9898# FIXME: do we really want to maintain this feature?
9899cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9900ac_sed_extra="$ac_vpsub
9901$extrasub
9902_ACEOF
9903cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9904:t
9905/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
9906s|@configure_input@|$ac_sed_conf_input|;t t
9907s&@top_builddir@&$ac_top_builddir_sub&;t t
9908s&@top_build_prefix@&$ac_top_build_prefix&;t t
9909s&@srcdir@&$ac_srcdir&;t t
9910s&@abs_srcdir@&$ac_abs_srcdir&;t t
9911s&@top_srcdir@&$ac_top_srcdir&;t t
9912s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
9913s&@builddir@&$ac_builddir&;t t
9914s&@abs_builddir@&$ac_abs_builddir&;t t
9915s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
9916$ac_datarootdir_hack
9917"
9918eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
9919  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
9920
9921test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
9922  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
9923  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
9924      "$ac_tmp/out"`; test -z "$ac_out"; } &&
9925  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
9926which seems to be undefined.  Please make sure it is defined" >&5
9927$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
9928which seems to be undefined.  Please make sure it is defined" >&2;}
9929
9930  rm -f "$ac_tmp/stdin"
9931  case $ac_file in
9932  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
9933  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
9934  esac \
9935  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
9936 ;;
9937
9938
9939
9940  esac
9941
9942done # for ac_tag
9943
9944
9945as_fn_exit 0
9946_ACEOF
9947ac_clean_files=$ac_clean_files_save
9948
9949test $ac_write_fail = 0 ||
9950  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
9951
9952
9953# configure is writing to config.log, and then calls config.status.
9954# config.status does its own redirection, appending to config.log.
9955# Unfortunately, on DOS this fails, as config.log is still kept open
9956# by configure, so config.status won't be able to write to it; its
9957# output is simply discarded.  So we exec the FD to /dev/null,
9958# effectively closing config.log, so it can be properly (re)opened and
9959# appended to by config.status.  When coming back to configure, we
9960# need to make the FD available again.
9961if test "$no_create" != yes; then
9962  ac_cs_success=:
9963  ac_config_status_args=
9964  test "$silent" = yes &&
9965    ac_config_status_args="$ac_config_status_args --quiet"
9966  exec 5>/dev/null
9967  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
9968  exec 5>>config.log
9969  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
9970  # would make configure fail if this is the last instruction.
9971  $ac_cs_success || as_fn_exit 1
9972fi
9973if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
9974  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
9975$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
9976fi
9977
9978