TARGET_HAVE_READLINE
TARGET_READLINE_INC
TARGET_READLINE_LIBS
-HAVE_TCL
-TCL_SHLIB_SUFFIX
-TCL_STUB_LIB_SPEC
-TCL_STUB_LIB_FLAG
-TCL_STUB_LIB_FILE
-TCL_LIB_SPEC
-TCL_LIB_FLAG
-TCL_LIB_FILE
-TCL_INCLUDE_SPEC
-TCL_SRC_DIR
-TCL_BIN_DIR
-TCL_VERSION
TARGET_EXEEXT
SQLITE_OS_WIN
SQLITE_OS_UNIX
VERSION
program_prefix
TCLLIBDIR
+HAVE_TCL
+TCL_SHLIB_SUFFIX
+TCL_STUB_LIB_SPEC
+TCL_STUB_LIB_FLAG
+TCL_STUB_LIB_FILE
+TCL_LIB_SPEC
+TCL_LIB_FLAG
+TCL_LIB_FILE
+TCL_INCLUDE_SPEC
+TCL_SRC_DIR
+TCL_BIN_DIR
+TCL_VERSION
TCLSH_CMD
INSTALL_DATA
INSTALL_SCRIPT
with_gnu_ld
enable_libtool_lock
enable_largefile
+with_tclsh
+with_tcl
with_wasi_sdk
enable_threadsafe
enable_releasemode
enable_tempstore
-enable_tcl
-with_tcl
enable_editline
enable_readline
with_readline_lib
--enable-releasemode Support libtool link to release mode
--enable-tempstore Use an in-ram database for temporary tables
(never,no,yes,always)
- --disable-tcl do not build TCL extension
--enable-editline enable BSD editline support
--disable-readline disable readline support
--enable-debug enable debugging & verbose explain
--with-pic try to use only PIC/non-PIC objects [default=use
both]
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
+ --with-tclsh=PATHNAME full pathname of a tclsh to use
+ --with-tcl=DIR directory containing (tclConfig.sh)
--with-wasi-sdk=DIR directory containing the WASI SDK. Triggers
cross-compile to WASM.
- --with-tcl=DIR directory containing tcl configuration
- (tclConfig.sh)
--with-readline-lib specify readline library
--with-readline-inc specify readline include paths
--with-linenoise=DIR source directory for linenoise library
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:3948: $ac_compile\"" >&5)
+ (eval echo "\"\$as_me:3947: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
- (eval echo "\"\$as_me:3951: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval echo "\"\$as_me:3950: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
- (eval echo "\"\$as_me:3954: output\"" >&5)
+ (eval echo "\"\$as_me:3953: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 5160 "configure"' > conftest.$ac_ext
+ echo '#line 5159 "configure"' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6685: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6684: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6689: \$? = $ac_status" >&5
+ echo "$as_me:6688: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7024: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7023: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:7028: \$? = $ac_status" >&5
+ echo "$as_me:7027: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7129: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7128: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:7133: \$? = $ac_status" >&5
+ echo "$as_me:7132: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7184: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7183: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:7188: \$? = $ac_status" >&5
+ echo "$as_me:7187: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 9564 "configure"
+#line 9563 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 9660 "configure"
+#line 9659 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
USE_AMALGAMATION=1
#########
-# See whether we can run specific tclsh versions known to work well;
-# if not, then we fall back to plain tclsh.
-# TODO: try other versions before falling back?
+# Figure out all the name of a working tclsh and parameters needed to compile against Tcl.
+# The --with-tcl= configuration parameter might be useful for this.
#
-if test x"${with_tcl}" != x; then
- if test ! -r ${with_tcl}/tclConfig.sh; then
- as_fn_error $? "no tclConfig.sh file found in --with-tcl: ${with_tcl}" "$LINENO" 5
- else
- . ${with_tcl}/tclConfig.sh
- TCLSH_CMD=${TCL_EXEC_PREFIX}/bin/tclsh${TCL_VERSION}
- if test ! -x ${TCLSH_CMD}; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot use tclsh at: ${TCLSH_CMD}" >&5
-$as_echo "$as_me: WARNING: cannot use tclsh at: ${TCLSH_CMD}" >&2;}
- TCLSH_CMD=none
- fi
- fi
-else
- for ac_prog in tclsh8.6 tclsh8.5 tclsh
+
+# Check whether --with-tclsh was given.
+if test "${with_tclsh+set}" = set; then :
+ withval=$with_tclsh;
+fi
+
+
+# Check whether --with-tcl was given.
+if test "${with_tcl+set}" = set; then :
+ withval=$with_tcl;
+fi
+
+if test x"${with_tclsh}" == x -a x"${with_tcl}" == x; then
+ for ac_prog in tclsh8.6 tclsh tclsh9.0
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
done
test -n "$TCLSH_CMD" || TCLSH_CMD="none"
+ with_tclsh=${TCLSH_CMD}
+fi
+if test x"${with_tclsh}" != x -a x"${with_tclsh}" != xnone; then
+ TCLSH_CMD=${with_tclsh}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: using tclsh at \"$TCLSH_CMD\"" >&5
+$as_echo "using tclsh at \"$TCLSH_CMD\"" >&6; }
+ with_tcl=`${with_tclsh} <${srcdir}/tool/find_tclconfig.tcl`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH_CMD recommends the tclConfig.sh at ${with_tcl}" >&5
+$as_echo "$TCLSH_CMD recommends the tclConfig.sh at ${with_tcl}" >&6; }
+fi
+if test x"${with_tcl}" != x; then
+ if test -r ${with_tcl}/tclConfig.sh; then
+ tclconfig="${with_tcl}/tclConfig.sh"
+ else
+ if test -r ${with_tcl}/tcl8.6/tclConfig.sh; then
+ tclconfig="${with_tcl}/tcl8.6/tclConfig.sh"
+ else
+ as_fn_error $? "no tclConfig.sh file found in ${with_tcl} or ${with_tcl}/tcl8.6" "$LINENO" 5
+ fi
+ fi
+ if test x"${tclconfig}" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading TCL configuration from ${tclconfig}" >&5
+$as_echo "loading TCL configuration from ${tclconfig}" >&6; }
+ . ${tclconfig}
+
+
+
+
+
+
+
+
+
+
+
+ fi
+ if test x"$TCLSH_CMD" == x; then
+ TCLSH_CMD=${TCL_EXEC_PREFIX}/bin/tclsh${TCL_VERSION}
+ if test ! -x ${TCLSH_CMD}; then
+ TCLSH_CMD_2=${TCL_EXEC_PREFIX}/bin/tclsh
+ if test ! -x ${TCLSH_CMD_2}; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find a usable tclsh at either ${TCLSH_CMD} or ${TCLSH_CMD_2}" >&5
+$as_echo "$as_me: WARNING: cannot find a usable tclsh at either ${TCLSH_CMD} or ${TCLSH_CMD_2}" >&2;}
+ TCLSH_CMD=none
+ else
+ TCLSH_CMD=${TCLSH_CMD_2}
+ fi
+ fi
+ fi
fi
if test "$TCLSH_CMD" = "none"; then
# If we can't find a local tclsh, then building the amalgamation will fail.
# We act as though --disable-amalgamation has been used.
- echo "Warning: can't find tclsh - defaulting to non-amalgamation build."
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Warning: can't find tclsh - defaulting to non-amalgamation build." >&5
+$as_echo "$as_me: WARNING: Warning: can't find tclsh - defaulting to non-amalgamation build." >&2;}
USE_AMALGAMATION=0
TCLSH_CMD="tclsh"
-fi
-if test x"$TCLSH_CMD" = x; then
- as_fn_error $? "cannot find a usable tclsh" "$LINENO" 5
+ HAVE_TCL=0
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $TCLSH_CMD" >&5
-$as_echo "using $TCLSH_CMD" >&6; }
+ HAVE_TCL=1
fi
+
if test "x${TCLLIBDIR+set}" != "xset" ; then
TCLLIBDIR='$(libdir)'
for i in `echo 'puts stdout $auto_path' | ${TCLSH_CMD}` ; do
-##########
-# Figure out all the parameters needed to compile against Tcl.
-#
-# This code is derived from the SC_PATH_TCLCONFIG and SC_LOAD_TCLCONFIG
-# macros in the in the tcl.m4 file of the standard TCL distribution.
-# Those macros could not be used directly since we have to make some
-# minor changes to accomodate systems that do not have TCL installed.
-#
-# Check whether --enable-tcl was given.
-if test "${enable_tcl+set}" = set; then :
- enableval=$enable_tcl; use_tcl=$enableval
-else
- use_tcl=yes
-fi
-
-if test "${use_tcl}" = "yes" ; then
-
-# Check whether --with-tcl was given.
-if test "${with_tcl+set}" = set; then :
- withval=$with_tcl; with_tclconfig=${withval}
-fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
-$as_echo_n "checking for Tcl configuration... " >&6; }
- if ${ac_cv_c_tclconfig+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- # First check to see if --with-tcl was specified.
- if test x"${with_tclconfig}" != x ; then
- if test -f "${with_tclconfig}/tclConfig.sh" ; then
- ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
- else
- as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
- fi
- fi
-
- # Start autosearch by asking tclsh
- if test x"${ac_cv_c_tclconfig}" = x ; then
- if test x"$cross_compiling" = xno; then
- for i in `echo 'puts stdout $auto_path' | ${TCLSH_CMD}`
- do
- if test -f "$i/tclConfig.sh" ; then
- ac_cv_c_tclconfig="$i"
- break
- fi
- done
- fi
- fi
-
- # On ubuntu 14.10, $auto_path on tclsh is not quite correct.
- # So try again after applying corrections.
- if test x"${ac_cv_c_tclconfig}" = x ; then
- if test x"$cross_compiling" = xno; then
- for i in `echo 'puts stdout $auto_path' | ${TCLSH_CMD} | sed 's,/tcltk/tcl,/tcl,g'`
- do
- if test -f "$i/tclConfig.sh" ; then
- ac_cv_c_tclconfig="$i"
- break
- fi
- done
- fi
- fi
-
- # Recent versions of Xcode on Macs hid the tclConfig.sh file
- # in a strange place.
- if test x"${ac_cv_c_tclconfig}" = x ; then
- if test x"$cross_compiling" = xno; then
- for i in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX*.sdk/usr/lib
- do
- if test -f "$i/tclConfig.sh" ; then
- ac_cv_c_tclconfig="$i"
- break
- fi
- done
- fi
- fi
-
- # then check for a private Tcl installation
- if test x"${ac_cv_c_tclconfig}" = x ; then
- for i in \
- ../tcl \
- `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
- `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
- `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
- ../../tcl \
- `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
- `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
- `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
- ../../../tcl \
- `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
- `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
- `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null`
- do
- if test -f "$i/unix/tclConfig.sh" ; then
- ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
- break
- fi
- done
- fi
-
- # check in a few common install locations
- if test x"${ac_cv_c_tclconfig}" = x ; then
- for i in \
- `ls -d ${libdir} 2>/dev/null` \
- `ls -d /usr/local/lib 2>/dev/null` \
- `ls -d /usr/contrib/lib 2>/dev/null` \
- `ls -d /usr/lib 2>/dev/null`
- do
- if test -f "$i/tclConfig.sh" ; then
- ac_cv_c_tclconfig=`(cd $i; pwd)`
- break
- fi
- done
- fi
-
- # check in a few other private locations
- if test x"${ac_cv_c_tclconfig}" = x ; then
- for i in \
- ${srcdir}/../tcl \
- `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
- `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
- `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null`
- do
- if test -f "$i/unix/tclConfig.sh" ; then
- ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
- break
- fi
- done
- fi
-
-fi
-
-
- if test x"${ac_cv_c_tclconfig}" = x ; then
- use_tcl=no
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
-$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Without Tcl the regression tests cannot be executed ***" >&5
-$as_echo "$as_me: WARNING: *** Without Tcl the regression tests cannot be executed ***" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Consider using --with-tcl=... to define location of Tcl ***" >&5
-$as_echo "$as_me: WARNING: *** Consider using --with-tcl=... to define location of Tcl ***" >&2;}
- else
- TCL_BIN_DIR=${ac_cv_c_tclconfig}
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: found $TCL_BIN_DIR/tclConfig.sh" >&5
-$as_echo "found $TCL_BIN_DIR/tclConfig.sh" >&6; }
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
-$as_echo_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh... " >&6; }
- if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
-$as_echo "loading" >&6; }
- . $TCL_BIN_DIR/tclConfig.sh
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: file not found" >&5
-$as_echo "file not found" >&6; }
- fi
-
- #
- # If the TCL_BIN_DIR is the build directory (not the install directory),
- # then set the common variable name to the value of the build variables.
- # For example, the variable TCL_LIB_SPEC will be set to the value
- # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
- # instead of TCL_BUILD_LIB_SPEC since it will work with both an
- # installed and uninstalled version of Tcl.
- #
-
- if test -f $TCL_BIN_DIR/Makefile ; then
- TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
- TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
- TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
- fi
-
- #
- # eval is required to do the TCL_DBGX substitution
- #
-
- eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
- eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
- eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
-
- eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
- eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
- eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- fi
-fi
-if test "${use_tcl}" = "no" ; then
- HAVE_TCL=""
-else
- HAVE_TCL=1
-fi
-
-
##########
# Figure out what C libraries are required to compile programs
# that use "readline()" library.
USE_AMALGAMATION=1
#########
-# See whether we can run specific tclsh versions known to work well;
-# if not, then we fall back to plain tclsh.
-# TODO: try other versions before falling back?
+# Figure out all the name of a working tclsh and parameters needed to compile against Tcl.
+# The --with-tcl= configuration parameter might be useful for this.
#
+AC_ARG_WITH(tclsh, AS_HELP_STRING([--with-tclsh=PATHNAME],[full pathname of a tclsh to use]))
+AC_ARG_WITH(tcl, AS_HELP_STRING([--with-tcl=DIR],[directory containing (tclConfig.sh)]))
+if test x"${with_tclsh}" == x -a x"${with_tcl}" == x; then
+ AC_CHECK_PROGS(TCLSH_CMD, [tclsh8.6 tclsh tclsh9.0],none)
+ with_tclsh=${TCLSH_CMD}
+fi
+if test x"${with_tclsh}" != x -a x"${with_tclsh}" != xnone; then
+ TCLSH_CMD=${with_tclsh}
+ AC_MSG_RESULT([using tclsh at "$TCLSH_CMD"])
+ with_tcl=`${with_tclsh} <${srcdir}/tool/find_tclconfig.tcl`
+ AC_MSG_RESULT([$TCLSH_CMD recommends the tclConfig.sh at ${with_tcl}])
+fi
if test x"${with_tcl}" != x; then
- if test ! -r ${with_tcl}/tclConfig.sh; then
- AC_MSG_ERROR([no tclConfig.sh file found in --with-tcl: ${with_tcl}])
+ if test -r ${with_tcl}/tclConfig.sh; then
+ tclconfig="${with_tcl}/tclConfig.sh"
else
- . ${with_tcl}/tclConfig.sh
+ if test -r ${with_tcl}/tcl8.6/tclConfig.sh; then
+ tclconfig="${with_tcl}/tcl8.6/tclConfig.sh"
+ else
+ AC_MSG_ERROR([no tclConfig.sh file found in ${with_tcl} or ${with_tcl}/tcl8.6])
+ fi
+ fi
+ if test x"${tclconfig}" != x; then
+ AC_MSG_RESULT([loading TCL configuration from ${tclconfig}])
+ . ${tclconfig}
+ AC_SUBST(TCL_VERSION)
+ AC_SUBST(TCL_BIN_DIR)
+ AC_SUBST(TCL_SRC_DIR)
+ AC_SUBST(TCL_INCLUDE_SPEC)
+ AC_SUBST(TCL_LIB_FILE)
+ AC_SUBST(TCL_LIB_FLAG)
+ AC_SUBST(TCL_LIB_SPEC)
+ AC_SUBST(TCL_STUB_LIB_FILE)
+ AC_SUBST(TCL_STUB_LIB_FLAG)
+ AC_SUBST(TCL_STUB_LIB_SPEC)
+ AC_SUBST(TCL_SHLIB_SUFFIX)
+ fi
+ if test x"$TCLSH_CMD" == x; then
TCLSH_CMD=${TCL_EXEC_PREFIX}/bin/tclsh${TCL_VERSION}
if test ! -x ${TCLSH_CMD}; then
- AC_MSG_WARN([cannot use tclsh at: ${TCLSH_CMD}])
- TCLSH_CMD=none
+ TCLSH_CMD_2=${TCL_EXEC_PREFIX}/bin/tclsh
+ if test ! -x ${TCLSH_CMD_2}; then
+ AC_MSG_WARN([cannot find a usable tclsh at either ${TCLSH_CMD} or ${TCLSH_CMD_2}])
+ TCLSH_CMD=none
+ else
+ TCLSH_CMD=${TCLSH_CMD_2}
+ fi
fi
fi
-else
- AC_CHECK_PROGS(TCLSH_CMD, [tclsh8.6 tclsh8.5 tclsh], none)
fi
if test "$TCLSH_CMD" = "none"; then
# If we can't find a local tclsh, then building the amalgamation will fail.
# We act as though --disable-amalgamation has been used.
- echo "Warning: can't find tclsh - defaulting to non-amalgamation build."
+ AC_MSG_WARN([Warning: can't find tclsh - defaulting to non-amalgamation build.])
USE_AMALGAMATION=0
TCLSH_CMD="tclsh"
-fi
-if test x"$TCLSH_CMD" = x; then
- AC_MSG_ERROR([cannot find a usable tclsh])
+ HAVE_TCL=0
else
- AC_MSG_RESULT([using $TCLSH_CMD])
+ HAVE_TCL=1
fi
AC_SUBST(TCLSH_CMD)
+AC_SUBST(HAVE_TCL)
AC_ARG_VAR([TCLLIBDIR], [Where to install tcl plugin])
if test "x${TCLLIBDIR+set}" != "xset" ; then
AC_SUBST(SQLITE_OS_WIN)
AC_SUBST(TARGET_EXEEXT)
-##########
-# Figure out all the parameters needed to compile against Tcl.
-#
-# This code is derived from the SC_PATH_TCLCONFIG and SC_LOAD_TCLCONFIG
-# macros in the in the tcl.m4 file of the standard TCL distribution.
-# Those macros could not be used directly since we have to make some
-# minor changes to accomodate systems that do not have TCL installed.
-#
-AC_ARG_ENABLE(tcl, AS_HELP_STRING([--disable-tcl],[do not build TCL extension]),
- [use_tcl=$enableval],[use_tcl=yes])
-if test "${use_tcl}" = "yes" ; then
- AC_ARG_WITH(tcl, AS_HELP_STRING([--with-tcl=DIR],[directory containing tcl configuration (tclConfig.sh)]), with_tclconfig=${withval})
- AC_MSG_CHECKING([for Tcl configuration])
- AC_CACHE_VAL(ac_cv_c_tclconfig,[
- # First check to see if --with-tcl was specified.
- if test x"${with_tclconfig}" != x ; then
- if test -f "${with_tclconfig}/tclConfig.sh" ; then
- ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
- else
- AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh])
- fi
- fi
-
- # Start autosearch by asking tclsh
- if test x"${ac_cv_c_tclconfig}" = x ; then
- if test x"$cross_compiling" = xno; then
- for i in `echo 'puts stdout $auto_path' | ${TCLSH_CMD}`
- do
- if test -f "$i/tclConfig.sh" ; then
- ac_cv_c_tclconfig="$i"
- break
- fi
- done
- fi
- fi
-
- # On ubuntu 14.10, $auto_path on tclsh is not quite correct.
- # So try again after applying corrections.
- if test x"${ac_cv_c_tclconfig}" = x ; then
- if test x"$cross_compiling" = xno; then
- for i in `echo 'puts stdout $auto_path' | ${TCLSH_CMD} | sed 's,/tcltk/tcl,/tcl,g'`
- do
- if test -f "$i/tclConfig.sh" ; then
- ac_cv_c_tclconfig="$i"
- break
- fi
- done
- fi
- fi
-
- # Recent versions of Xcode on Macs hid the tclConfig.sh file
- # in a strange place.
- if test x"${ac_cv_c_tclconfig}" = x ; then
- if test x"$cross_compiling" = xno; then
- for i in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX*.sdk/usr/lib
- do
- if test -f "$i/tclConfig.sh" ; then
- ac_cv_c_tclconfig="$i"
- break
- fi
- done
- fi
- fi
-
- # then check for a private Tcl installation
- if test x"${ac_cv_c_tclconfig}" = x ; then
- for i in \
- ../tcl \
- `ls -dr ../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
- `ls -dr ../tcl[[8-9]].[[0-9]] 2>/dev/null` \
- `ls -dr ../tcl[[8-9]].[[0-9]]* 2>/dev/null` \
- ../../tcl \
- `ls -dr ../../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
- `ls -dr ../../tcl[[8-9]].[[0-9]] 2>/dev/null` \
- `ls -dr ../../tcl[[8-9]].[[0-9]]* 2>/dev/null` \
- ../../../tcl \
- `ls -dr ../../../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
- `ls -dr ../../../tcl[[8-9]].[[0-9]] 2>/dev/null` \
- `ls -dr ../../../tcl[[8-9]].[[0-9]]* 2>/dev/null`
- do
- if test -f "$i/unix/tclConfig.sh" ; then
- ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
- break
- fi
- done
- fi
-
- # check in a few common install locations
- if test x"${ac_cv_c_tclconfig}" = x ; then
- for i in \
- `ls -d ${libdir} 2>/dev/null` \
- `ls -d /usr/local/lib 2>/dev/null` \
- `ls -d /usr/contrib/lib 2>/dev/null` \
- `ls -d /usr/lib 2>/dev/null`
- do
- if test -f "$i/tclConfig.sh" ; then
- ac_cv_c_tclconfig=`(cd $i; pwd)`
- break
- fi
- done
- fi
-
- # check in a few other private locations
- if test x"${ac_cv_c_tclconfig}" = x ; then
- for i in \
- ${srcdir}/../tcl \
- `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
- `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]] 2>/dev/null` \
- `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]]* 2>/dev/null`
- do
- if test -f "$i/unix/tclConfig.sh" ; then
- ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
- break
- fi
- done
- fi
- ])
-
- if test x"${ac_cv_c_tclconfig}" = x ; then
- use_tcl=no
- AC_MSG_WARN(Can't find Tcl configuration definitions)
- AC_MSG_WARN(*** Without Tcl the regression tests cannot be executed ***)
- AC_MSG_WARN(*** Consider using --with-tcl=... to define location of Tcl ***)
- else
- TCL_BIN_DIR=${ac_cv_c_tclconfig}
- AC_MSG_RESULT(found $TCL_BIN_DIR/tclConfig.sh)
-
- AC_MSG_CHECKING([for existence of $TCL_BIN_DIR/tclConfig.sh])
- if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
- AC_MSG_RESULT([loading])
- . $TCL_BIN_DIR/tclConfig.sh
- else
- AC_MSG_RESULT([file not found])
- fi
-
- #
- # If the TCL_BIN_DIR is the build directory (not the install directory),
- # then set the common variable name to the value of the build variables.
- # For example, the variable TCL_LIB_SPEC will be set to the value
- # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
- # instead of TCL_BUILD_LIB_SPEC since it will work with both an
- # installed and uninstalled version of Tcl.
- #
-
- if test -f $TCL_BIN_DIR/Makefile ; then
- TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
- TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
- TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
- fi
-
- #
- # eval is required to do the TCL_DBGX substitution
- #
-
- eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
- eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
- eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
-
- eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
- eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
- eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
-
- AC_SUBST(TCL_VERSION)
- AC_SUBST(TCL_BIN_DIR)
- AC_SUBST(TCL_SRC_DIR)
- AC_SUBST(TCL_INCLUDE_SPEC)
-
- AC_SUBST(TCL_LIB_FILE)
- AC_SUBST(TCL_LIB_FLAG)
- AC_SUBST(TCL_LIB_SPEC)
-
- AC_SUBST(TCL_STUB_LIB_FILE)
- AC_SUBST(TCL_STUB_LIB_FLAG)
- AC_SUBST(TCL_STUB_LIB_SPEC)
- AC_SUBST(TCL_SHLIB_SUFFIX)
- fi
-fi
-if test "${use_tcl}" = "no" ; then
- HAVE_TCL=""
-else
- HAVE_TCL=1
-fi
-AC_SUBST(HAVE_TCL)
-
##########
# Figure out what C libraries are required to compile programs
# that use "readline()" library.