summaryrefslogtreecommitdiff
path: root/src/auto/configure
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-01-09 19:41:11 +0100
committerBram Moolenaar <Bram@vim.org>2016-01-09 19:41:11 +0100
commit8a5115cf18751022387af2085f374d38c60dde83 (patch)
tree626c3e93cd3127931c85e631d50d6ced1b5f6380 /src/auto/configure
parent5f24542e5eda590acdbee89b120fa2e19ec7596e (diff)
downloadvim-8a5115cf18751022387af2085f374d38c60dde83.zip
patch 7.4.1070
Problem: The Tcl interface can't be loaded dynamically on Unix. Solution: Make it possible to load it dynamically. (Ken Takata)
Diffstat (limited to 'src/auto/configure')
-rwxr-xr-xsrc/auto/configure18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/auto/configure b/src/auto/configure
index a0452795a..e07d7ecf3 100755
--- a/src/auto/configure
+++ b/src/auto/configure
@@ -1468,7 +1468,7 @@ Optional Features:
--enable-perlinterp=OPTS Include Perl interpreter. default=no OPTS=no/yes/dynamic
--enable-pythoninterp=OPTS Include Python interpreter. default=no OPTS=no/yes/dynamic
--enable-python3interp=OPTS Include Python3 interpreter. default=no OPTS=no/yes/dynamic
- --enable-tclinterp Include Tcl interpreter.
+ --enable-tclinterp=OPTS Include Tcl interpreter. default=no OPTS=no/yes/dynamic
--enable-rubyinterp=OPTS Include Ruby interpreter. default=no OPTS=no/yes/dynamic
--enable-cscope Include cscope interface.
--enable-workshop Include Sun Visual Workshop support.
@@ -6616,7 +6616,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_tclinterp" >&5
$as_echo "$enable_tclinterp" >&6; }
-if test "$enable_tclinterp" = "yes"; then
+if test "$enable_tclinterp" = "yes" -o "$enable_tclinterp" = "dynamic"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-tclsh argument" >&5
$as_echo_n "checking --with-tclsh argument... " >&6; }
@@ -6852,6 +6852,7 @@ $as_echo_n "checking Tcl version... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tclver - OK" >&5
$as_echo "$tclver - OK" >&6; };
tclloc=`echo 'set l [info library];set i [string last lib $l];incr i -2;puts [string range $l 0 $i]' | $vi_cv_path_tcl -`
+ tcldll=`echo 'puts libtcl[info tclversion][info sharedlibextension]' | $vi_cv_path_tcl -`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of Tcl include" >&5
$as_echo_n "checking for location of Tcl include... " >&6; }
@@ -6888,7 +6889,11 @@ $as_echo_n "checking for location of tclConfig.sh script... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $try/tclConfig.sh" >&5
$as_echo "$try/tclConfig.sh" >&6; }
. "$try/tclConfig.sh"
- TCL_LIBS=`eval echo "$TCL_LIB_SPEC $TCL_LIBS"`
+ if test "$enable_tclinterp" = "dynamic"; then
+ TCL_LIBS=`eval echo "$TCL_STUB_LIB_SPEC $TCL_LIBS"`
+ else
+ TCL_LIBS=`eval echo "$TCL_LIB_SPEC $TCL_LIBS"`
+ fi
TCL_DEFS=`echo $TCL_DEFS | sed -e 's/\\\\ /\\\\X/g' | tr ' ' '\012' | sed -e '/^[^-]/d' -e '/^-[^D]/d' -e '/-D[^_]/d' -e 's/-D_/ -D_/' | tr '\012' ' ' | sed -e 's/\\\\X/\\\\ /g'`
break
fi
@@ -6937,6 +6942,13 @@ $as_echo "<not found>" >&6; }
$as_echo "too old; need Tcl version 8.0 or later" >&6; }
fi
fi
+ if test "$enable_tclinterp" = "dynamic"; then
+ if test "X$TCL_SRC" != "X" -a "X$tcldll" != "X"; then
+ $as_echo "#define DYNAMIC_TCL 1" >>confdefs.h
+
+ TCL_CFLAGS="-DDYNAMIC_TCL_DLL=\\\"$tcldll\\\" -DDYNAMIC_TCL_VER=\\\"$tclver\\\" $TCL_CFLAGS"
+ fi
+ fi
if test "$fail_if_missing" = "yes" -a -z "$TCL_SRC"; then
as_fn_error $? "could not configure Tcl" "$LINENO" 5
fi