summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormdejong <mdejong>2002-01-29 04:57:56 (GMT)
committermdejong <mdejong>2002-01-29 04:57:56 (GMT)
commit6eca2e4ac23af3da5fbd5fbdfe1edb0f7c4bd493 (patch)
tree8483a96890a067cc0224f6391cdaf2dde13a18ea
parent2a11833fa051fe7adc770a87078bbf640ec7cf33 (diff)
downloadtcl-6eca2e4ac23af3da5fbd5fbdfe1edb0f7c4bd493.zip
tcl-6eca2e4ac23af3da5fbd5fbdfe1edb0f7c4bd493.tar.gz
tcl-6eca2e4ac23af3da5fbd5fbdfe1edb0f7c4bd493.tar.bz2
* unix/tcl.m4 (SC_LOAD_TCLCONFIG):
* win/tcl.m4 (SC_LOAD_TCLCONFIG): Set TCL_LIB_SPEC, TCL_STUB_LIB_SPEC, and TCL_STUB_LIB_PATH to the values of TCL_BUILD_LIB_SPEC, TCL_BUILD_STUB_LIB_SPEC, and TCL_BUILD_STUB_LIB_PATH when tclConfig.sh is loaded from the build directory. A Tcl extension should make use of the non-build versions of these variables since they will work in both cases. This modification was described in TIP 34.
-rw-r--r--ChangeLog12
-rw-r--r--unix/tcl.m434
-rw-r--r--win/tcl.m434
3 files changed, 72 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index cbdbafa..7c9975f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2002-01-28 Mo DeJong <mdejong@users.sourceforge.net>
+
+ * unix/tcl.m4 (SC_LOAD_TCLCONFIG):
+ * win/tcl.m4 (SC_LOAD_TCLCONFIG): Set TCL_LIB_SPEC,
+ TCL_STUB_LIB_SPEC, and TCL_STUB_LIB_PATH to the
+ values of TCL_BUILD_LIB_SPEC, TCL_BUILD_STUB_LIB_SPEC,
+ and TCL_BUILD_STUB_LIB_PATH when tclConfig.sh is loaded
+ from the build directory. A Tcl extension should
+ make use of the non-build versions of these variables
+ since they will work in both cases. This modification
+ was described in TIP 34.
+
2002-01-28 Jeff Hobbs <jeffh@ActiveState.com>
* win/tclWinReg.c (regConnectRegistryProc,RecursiveDeleteKey)
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 7b59a80..76eeace 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -219,17 +219,43 @@ AC_DEFUN(SC_LOAD_TCLCONFIG, [
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_STUB_LIB_FILE=${TCL_STUB_LIB_FILE}
- eval TCL_STUB_LIB_FLAG=${TCL_STUB_LIB_FLAG}
+ 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_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)
])
#------------------------------------------------------------------------
diff --git a/win/tcl.m4 b/win/tcl.m4
index de9ddbf..ec95eec 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -107,17 +107,43 @@ AC_DEFUN(SC_LOAD_TCLCONFIG, [
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_STUB_LIB_FILE=${TCL_STUB_LIB_FILE}
- eval TCL_STUB_LIB_FLAG=${TCL_STUB_LIB_FLAG}
+ 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_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)
])
#------------------------------------------------------------------------