summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorandreas_kupries <akupries@shaw.ca>2003-06-09 22:48:32 (GMT)
committerandreas_kupries <akupries@shaw.ca>2003-06-09 22:48:32 (GMT)
commit2de53852436287ca9c97b41636e38df538506625 (patch)
tree9f56d3de04d71da41a5b38e81e4714993d4d0af1 /unix
parenta8853bfaf368294f76dbe7dba99f5f111377f618 (diff)
downloadtcl-2de53852436287ca9c97b41636e38df538506625.zip
tcl-2de53852436287ca9c97b41636e38df538506625.tar.gz
tcl-2de53852436287ca9c97b41636e38df538506625.tar.bz2
* generic/tcl.decls: Ported the changes from the
* generic/tcl.h: 'tip-59-implementation' branch into the CVS * generic/tclBasic.c: head. Regenerated stub table. Regenerated * generic/tclInt.h: the configure's scripts, with help from Joe * generic/tclDecls.h English. * generic/tclStubInit.c: * generic/tclConfig.c: * generic/tclPkgConfig.c: * unix/Makefile.in: * unix/configure.in: The changes in the windows section are not * unix/tcl.m4: yet committed, they await feedback from * unix/mkLinks: David Gravereaux. * doc/RegConfig.3: * mac/tclMacPkgConfig.c: * tests/config.test:
Diffstat (limited to 'unix')
-rw-r--r--unix/Makefile.in36
-rwxr-xr-xunix/configure48
-rw-r--r--unix/configure.in8
-rw-r--r--unix/mkLinks4
-rw-r--r--unix/tcl.m432
5 files changed, 122 insertions, 6 deletions
diff --git a/unix/Makefile.in b/unix/Makefile.in
index 74bcc21..0973b85 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -5,7 +5,7 @@
# "autoconf" program (constructs like "@foo@" will get replaced in the
# actual Makefile.
#
-# RCS: @(#) $Id: Makefile.in,v 1.127 2003/05/16 17:00:30 kennykb Exp $
+# RCS: @(#) $Id: Makefile.in,v 1.128 2003/06/09 22:48:51 andreas_kupries Exp $
VERSION = @TCL_VERSION@
MAJOR_VERSION = @TCL_MAJOR_VERSION@
@@ -304,13 +304,13 @@ XTTEST_OBJS = xtTestInit.o tclTest.o tclTestObj.o tclTestProcBodyObj.o \
GENERIC_OBJS = regcomp.o regexec.o regfree.o regerror.o tclAlloc.o \
tclAsync.o tclBasic.o tclBinary.o tclCkalloc.o tclClock.o \
tclCmdAH.o tclCmdIL.o tclCmdMZ.o tclCompCmds.o tclCompExpr.o \
- tclCompile.o tclDate.o tclDictObj.o tclEncoding.o \
+ tclCompile.o tclConfig.o tclDate.o tclDictObj.o tclEncoding.o \
tclEnv.o tclEvent.o tclExecute.o tclFCmd.o tclFileName.o tclGet.o \
tclHash.o tclHistory.o tclIndexObj.o tclInterp.o tclIO.o tclIOCmd.o \
tclIOGT.o tclIOSock.o tclIOUtil.o tclLink.o tclListObj.o \
tclLiteral.o tclLoad.o tclMain.o tclNamesp.o tclNotify.o \
tclObj.o tclPanic.o tclParse.o tclParseExpr.o tclPathObj.o tclPipe.o \
- tclPkg.o tclPosixStr.o tclPreserve.o tclProc.o tclRegexp.o \
+ tclPkg.o tclPkgConfig.o tclPosixStr.o tclPreserve.o tclProc.o tclRegexp.o \
tclResolve.o tclResult.o tclScan.o tclStringObj.o tclThread.o \
tclThreadAlloc.o tclThreadJoin.o tclStubInit.o tclStubLib.o \
tclTimer.o tclUtf.o tclUtil.o tclVar.o
@@ -352,6 +352,7 @@ GENERIC_SRCS = \
$(GENERIC_DIR)/tclCompCmds.c \
$(GENERIC_DIR)/tclCompExpr.c \
$(GENERIC_DIR)/tclCompile.c \
+ $(GENERIC_DIR)/tclConfig.c \
$(GENERIC_DIR)/tclDate.c \
$(GENERIC_DIR)/tclDictObj.c \
$(GENERIC_DIR)/tclEncoding.c \
@@ -383,6 +384,7 @@ GENERIC_SRCS = \
$(GENERIC_DIR)/tclPathObj.c \
$(GENERIC_DIR)/tclPipe.c \
$(GENERIC_DIR)/tclPkg.c \
+ $(GENERIC_DIR)/tclPkgConfig.c \
$(GENERIC_DIR)/tclPosixStr.c \
$(GENERIC_DIR)/tclPreserve.c \
$(GENERIC_DIR)/tclProc.c \
@@ -838,6 +840,9 @@ tclCompExpr.o: $(GENERIC_DIR)/tclCompExpr.c
tclCompile.o: $(GENERIC_DIR)/tclCompile.c
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclCompile.c
+tclConfig.o: $(GENERIC_DIR)/tclConfig.c
+ $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclConfig.c
+
tclDictObj.o: $(GENERIC_DIR)/tclDictObj.c
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclDictObj.c
@@ -958,6 +963,31 @@ tclPipe.o: $(GENERIC_DIR)/tclPipe.c
tclPkg.o: $(GENERIC_DIR)/tclPkg.c
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclPkg.c
+# TIP #59, embedding of configuration information into the binary library.
+#
+# Part of Tcl's configuration information are the paths where it was
+# installed and where it will look for its libraries (which can be
+# different). We derive this information from the variables which can
+# be overridden by the user. As every path can be configured
+# separately we do not remember one general prefix/exec_prefix but all
+# the different paths individually.
+
+tclPkgConfig.o: $(GENERIC_DIR)/tclPkgConfig.c
+ $(CC) -c $(CC_SWITCHES) \
+ -DCFG_INSTALL_LIBDIR=\"$(LIB_INSTALL_DIR)\" \
+ -DCFG_INSTALL_BINDIR=\"$(BIN_INSTALL_DIR)\" \
+ -DCFG_INSTALL_SCRDIR=\"$(SCRIPT_INSTALL_DIR)\" \
+ -DCFG_INSTALL_INCDIR=\"$(INCLUDE_INSTALL_DIR)\" \
+ -DCFG_INSTALL_DOCDIR=\"$(MAN_INSTALL_DIR)\" \
+ \
+ -DCFG_RUNTIME_LIBDIR=\"$(libdir)\" \
+ -DCFG_RUNTIME_BINDIR=\"$(bindir)\" \
+ -DCFG_RUNTIME_SCRDIR=\"$(TCL_LIBRARY)\" \
+ -DCFG_RUNTIME_INCDIR=\"$(includedir)\" \
+ -DCFG_RUNTIME_DOCDIR=\"$(mandir)\" \
+ \
+ $(GENERIC_DIR)/tclPkgConfig.c
+
tclPosixStr.o: $(GENERIC_DIR)/tclPosixStr.c
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclPosixStr.c
diff --git a/unix/configure b/unix/configure
index a7732ba..490d1b2 100755
--- a/unix/configure
+++ b/unix/configure
@@ -852,6 +852,11 @@ Optional Features:
--enable-symbols build with debugging symbols --disable-symbols
--enable-framework package shared libraries in frameworks --disable-framework
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-encoding encoding for configuration values
+
Some influential environment variables:
CC C compiler command
CFLAGS C compiler flags
@@ -2103,12 +2108,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(exit $ac_status); }; }; then
for ac_declaration in \
''\
- '#include <stdlib.h>' \
'extern "C" void std::exit (int) throw (); using std::exit;' \
'extern "C" void std::exit (int); using std::exit;' \
'extern "C" void exit (int) throw ();' \
'extern "C" void exit (int);' \
- 'void exit (int);'
+ 'void exit (int);' \
+ '#include <stdlib.h>'
do
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
@@ -3369,6 +3374,30 @@ echo "${ECHO_T}no (default)" >&6
#------------------------------------------------------------------------
+# Embedded configuration information, encoding to use for the values, TIP #59
+#------------------------------------------------------------------------
+
+
+
+# Check whether --with-encoding or --without-encoding was given.
+if test "${with_encoding+set}" = set; then
+ withval="$with_encoding"
+ with_tcencoding=${withval}
+fi;
+
+ if test x"${with_tcencoding}" != x ; then
+ cat >>confdefs.h <<_ACEOF
+#define TCL_CFGVAL_ENCODING "${with_tcencoding}"
+_ACEOF
+
+ else
+ cat >>confdefs.h <<\_ACEOF
+#define TCL_CFGVAL_ENCODING "iso8859-1"
+_ACEOF
+
+ fi
+
+#------------------------------------------------------------------------
# If we're using GCC, see if the compiler understands -pipe. If so, use it.
# It makes compiling go faster. (This is only a performance feature.)
#------------------------------------------------------------------------
@@ -12340,6 +12369,13 @@ echo "${ECHO_T}$found" >&6
echo "$as_me: WARNING: \"64bit support being disabled -- don\'t know magic for this platform\"" >&2;}
fi
+ if test "$do64bit" = "yes" -a "$do64bit_ok" = "yes" ; then
+ cat >>confdefs.h <<\_ACEOF
+#define TCL_CFG_DO64BIT 1
+_ACEOF
+
+ fi
+
# Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
# Loading for Tcl -- What Became of It?". Proc. 2nd Tcl/Tk Workshop,
# New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
@@ -12691,6 +12727,10 @@ fi;
DBGX=""
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
+ cat >>confdefs.h <<\_ACEOF
+#define TCL_CFG_OPTIMIZED 1
+_ACEOF
+
else
CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
@@ -12702,6 +12742,10 @@ echo "${ECHO_T}yes (standard debugging)" >&6
fi
+ cat >>confdefs.h <<\_ACEOF
+#define TCL_CFG_DEBUG 1
+_ACEOF
+
if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
cat >>confdefs.h <<\_ACEOF
diff --git a/unix/configure.in b/unix/configure.in
index c538308..2fa70f2 100644
--- a/unix/configure.in
+++ b/unix/configure.in
@@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to
dnl generate the file "configure", which is run during Tcl installation
dnl to configure the system for the local environment.
#
-# RCS: @(#) $Id: configure.in,v 1.109 2003/05/14 19:21:29 das Exp $
+# RCS: @(#) $Id: configure.in,v 1.110 2003/06/09 22:48:52 andreas_kupries Exp $
AC_INIT(../generic/tcl.h)
AC_PREREQ(2.57)
@@ -53,6 +53,12 @@ AC_HAVE_HEADERS(unistd.h limits.h)
SC_ENABLE_THREADS
#------------------------------------------------------------------------
+# Embedded configuration information, encoding to use for the values, TIP #59
+#------------------------------------------------------------------------
+
+SC_TCL_CFG_ENCODING
+
+#------------------------------------------------------------------------
# If we're using GCC, see if the compiler understands -pipe. If so, use it.
# It makes compiling go faster. (This is only a performance feature.)
#------------------------------------------------------------------------
diff --git a/unix/mkLinks b/unix/mkLinks
index db78f2e..ee5a5fe 100644
--- a/unix/mkLinks
+++ b/unix/mkLinks
@@ -1090,6 +1090,10 @@ if test -r RecordEval.3; then
rm -f Tcl_RecordAndEval.3 Tcl_RecordAndEval.3.*
ln $S RecordEval.3$Z Tcl_RecordAndEval.3$Z
fi
+if test -r RegConfig.3; then
+ rm -f Tcl_RegisterConfig.3
+ ln RegConfig.3 Tcl_RegisterConfig.3
+fi
if test -r RegExp.3; then
rm -f RegExp.3.*
$ZIP RegExp.3
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 03418d2..b747142 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -501,6 +501,7 @@ AC_DEFUN(SC_ENABLE_SYMBOLS, [
LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
DBGX=""
AC_MSG_RESULT([no])
+ AC_DEFINE(TCL_CFG_OPTIMIZED)
else
CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
@@ -511,6 +512,7 @@ AC_DEFUN(SC_ENABLE_SYMBOLS, [
fi
AC_SUBST(CFLAGS_DEFAULT)
AC_SUBST(LDFLAGS_DEFAULT)
+ AC_DEFINE(TCL_CFG_DEBUG)
if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
AC_DEFINE(TCL_MEM_DEBUG)
@@ -1564,6 +1566,10 @@ dnl AC_CHECK_TOOL(AR, ar)
AC_MSG_WARN("64bit support being disabled -- don\'t know magic for this platform")
fi
+ if test "$do64bit" = "yes" -a "$do64bit_ok" = "yes" ; then
+ AC_DEFINE(TCL_CFG_DO64BIT)
+ fi
+
# Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
# Loading for Tcl -- What Became of It?". Proc. 2nd Tcl/Tk Workshop,
# New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
@@ -2465,3 +2471,29 @@ AC_DEFUN(SC_TCL_64BIT_FLAGS, [
fi
AC_MSG_RESULT(${tcl_cv_type_off64_t})
fi])
+
+#--------------------------------------------------------------------
+# SC_TCL_CFG_ENCODING TIP #59
+#
+# Declare the encoding to use for embedded configuration information.
+#
+# Arguments:
+# None.
+#
+# Results:
+# Might append to the following vars:
+# DEFS (implicit)
+#
+# Will define the following vars:
+# TCL_CFGVAL_ENCODING
+#
+#--------------------------------------------------------------------
+
+AC_DEFUN(SC_TCL_CFG_ENCODING, [
+ AC_ARG_WITH(encoding, [ --with-encoding encoding for configuration values], with_tcencoding=${withval})
+
+ if test x"${with_tcencoding}" != x ; then
+ AC_DEFINE_UNQUOTED(TCL_CFGVAL_ENCODING,"${with_tcencoding}")
+ else
+ AC_DEFINE(TCL_CFGVAL_ENCODING,"iso8859-1")
+ fi])