summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsurles <surles>1999-06-16 22:36:23 (GMT)
committersurles <surles>1999-06-16 22:36:23 (GMT)
commit9603fe9cba368549645bb980ec7dc9b32f36905b (patch)
treee4d33bad2c31e24ef538f0e7107f0cfd77d711af
parentf18136a157e5714f647256d13d552863635ea469 (diff)
downloadtcl-9603fe9cba368549645bb980ec7dc9b32f36905b.zip
tcl-9603fe9cba368549645bb980ec7dc9b32f36905b.tar.gz
tcl-9603fe9cba368549645bb980ec7dc9b32f36905b.tar.bz2
merged unix and windows styles
-rw-r--r--unix/Makefile.in58
-rw-r--r--unix/configure.in4
-rw-r--r--unix/tclConfig.sh.in4
-rw-r--r--win/Makefile.in14
-rw-r--r--win/configure.in6
-rw-r--r--win/tcl.m450
6 files changed, 73 insertions, 63 deletions
diff --git a/unix/Makefile.in b/unix/Makefile.in
index d716aff..b7790d4 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -5,11 +5,7 @@
# "autoconf" program (constructs like "@foo@" will get replaced in the
# actual Makefile.
#
-# RCS: @(#) $Id: Makefile.in,v 1.31 1999/06/15 20:44:36 wart Exp $
-
-# PURIFY =
-
-# Current Tcl version; used in various names.
+# RCS: @(#) $Id: Makefile.in,v 1.32 1999/06/16 22:36:23 surles Exp $
VERSION = @TCL_VERSION@
@@ -36,42 +32,40 @@ exec_prefix = @exec_prefix@
# when installing files.
INSTALL_ROOT =
-# Directory from which applications will reference the library of Tcl
-# scripts (note: you can set the TCL_LIBRARY environment variable at
-# run-time to override this value):
-TCL_LIBRARY = $(prefix)/lib/tcl$(VERSION)
-
-# Package search path.
-TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@
+# Path to use at runtime to refer to LIB_INSTALL_DIR:
+LIB_RUNTIME_DIR = $(exec_prefix)/lib
-# Path name to use when installing library scripts:
-SCRIPT_INSTALL_DIR = $(INSTALL_ROOT)$(TCL_LIBRARY)
+# Directory in which to install the program tclsh:
+BIN_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/bin
# Directory in which to install libtcl.so or libtcl.a:
-LIB_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/lib
+LIB_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/lib
-# Path to use at runtime to refer to LIB_INSTALL_DIR:
-LIB_RUNTIME_DIR = $(exec_prefix)/lib
-
-# Directory in which to install the program tclsh:
-BIN_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/bin
+# Path name to use when installing library scripts:
+SCRIPT_INSTALL_DIR = $(INSTALL_ROOT)$(TCL_LIBRARY)
# Directory in which to install the include file tcl.h:
-INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/include
+INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/include
# Top-level directory in which to install manual entries:
-MAN_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/man
+MAN_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/man
# Directory in which to install manual entry for tclsh:
-MAN1_INSTALL_DIR = $(MAN_INSTALL_DIR)/man1
+MAN1_INSTALL_DIR = $(MAN_INSTALL_DIR)/man1
# Directory in which to install manual entries for Tcl's C library
# procedures:
-MAN3_INSTALL_DIR = $(MAN_INSTALL_DIR)/man3
+MAN3_INSTALL_DIR = $(MAN_INSTALL_DIR)/man3
# Directory in which to install manual entries for the built-in
# Tcl commands:
-MANN_INSTALL_DIR = $(MAN_INSTALL_DIR)/mann
+MANN_INSTALL_DIR = $(MAN_INSTALL_DIR)/mann
+
+# Directory in which to install the include file tcl.h:
+INCLUDE_INSTALL_DIR = @includedir@
+
+# Package search path.
+TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@
# Libraries built with optimization switches have this additional extension
TCL_DBGX = @TCL_DBGX@
@@ -388,7 +382,7 @@ SRCS = $(GENERIC_SRCS) $(UNIX_SRCS) $(STUB_SRCS)
all: binaries libraries doc
-binaries: ${TCL_LIB_FILE} $(TCL_STUB_LIB_FILE) tclsh
+binaries: ${TCL_LIB_FILE} $(TCL_STUB_LIB_FILE) $(TCL_BUILD_EXP_FILE) tclsh
libraries:
@@ -419,11 +413,11 @@ objs: ${OBJS}
tclsh: ${TCLSH_OBJS} ${TCL_LIB_FILE}
- ${CC} @LD_FLAGS@ ${TCLSH_OBJS} @TCL_BUILD_LIB_SPEC@ ${LIBS} \
+ ${CC} @LDFLAGS@ ${TCLSH_OBJS} @TCL_BUILD_LIB_SPEC@ ${LIBS} \
@TCL_LD_SEARCH_FLAGS@ -o tclsh
tcltest: ${TCLTEST_OBJS} ${TCL_LIB_FILE} ${BUILD_DLTEST}
- ${CC} @LD_FLAGS@ ${TCLTEST_OBJS} @TCL_BUILD_LIB_SPEC@ ${LIBS} \
+ ${CC} @LDFLAGS@ ${TCLTEST_OBJS} @TCL_BUILD_LIB_SPEC@ ${LIBS} \
@TCL_LD_SEARCH_FLAGS@ -o tcltest
@@ -487,13 +481,13 @@ dltest/Makefile: $(DLTEST_DIR)/configure $(DLTEST_DIR)/Makefile.in tclConfig.sh
cd dltest; if test -f configure; then ./configure; else \
$(DLTEST_DIR)/configure; fi
-install: install-binaries install-libraries install-man
+install: all install-binaries install-libraries install-man
# Note: before running ranlib below, must cd to target directory because
# some ranlibs write to current directory, and this might not always be
# possible (e.g. if installing as root).
-install-binaries: binaries $(TCL_BUILD_EXP_FILE)
+install-binaries:
@for i in $(LIB_INSTALL_DIR) $(BIN_INSTALL_DIR) ; \
do \
if [ ! -d $$i ] ; then \
@@ -522,7 +516,7 @@ install-binaries: binaries $(TCL_BUILD_EXP_FILE)
$(LIB_INSTALL_DIR)/$(TCL_STUB_LIB_FILE); \
fi
-install-libraries: libraries
+install-libraries:
@for i in $(INSTALL_ROOT)$(prefix)/lib $(INCLUDE_INSTALL_DIR) \
$(SCRIPT_INSTALL_DIR); \
do \
@@ -565,7 +559,7 @@ install-libraries: libraries
$(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR)/encoding; \
done;
-install-man: man
+install-doc:
@chmod +x $(UNIX_DIR)/mkLinks
@for i in $(MAN_INSTALL_DIR) $(MAN1_INSTALL_DIR) $(MAN3_INSTALL_DIR) $(MANN_INSTALL_DIR) ; \
do \
diff --git a/unix/configure.in b/unix/configure.in
index 51b263d..cbae139 100644
--- a/unix/configure.in
+++ b/unix/configure.in
@@ -2,7 +2,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.
AC_INIT(../generic/tcl.h)
-# RCS: @(#) $Id: configure.in,v 1.42 1999/06/16 02:20:41 wart Exp $
+# RCS: @(#) $Id: configure.in,v 1.43 1999/06/16 22:36:24 surles Exp $
TCL_VERSION=8.1
TCL_MAJOR_VERSION=8
@@ -604,7 +604,7 @@ AC_SUBST(CFG_TCL_EXPORT_FILE_SUFFIX)
AC_SUBST(TCL_DBGX)
AC_SUBST(DL_OBJS)
AC_SUBST(EXTRA_CFLAGS)
-AC_SUBST(LD_FLAGS)
+AC_SUBST(LDFLAGS)
AC_SUBST(MAKE_LIB)
AC_SUBST(TCL_SHARED_BUILD)
AC_SUBST(SHLIB_CFLAGS)
diff --git a/unix/tclConfig.sh.in b/unix/tclConfig.sh.in
index c412561..0520784 100644
--- a/unix/tclConfig.sh.in
+++ b/unix/tclConfig.sh.in
@@ -9,7 +9,7 @@
#
# The information in this file is specific to a single platform.
#
-# RCS: @(#) $Id: tclConfig.sh.in,v 1.10 1999/03/11 21:47:39 stanton Exp $
+# RCS: @(#) $Id: tclConfig.sh.in,v 1.11 1999/06/16 22:36:24 surles Exp $
# Tcl's version number.
TCL_VERSION='@TCL_VERSION@'
@@ -80,7 +80,7 @@ TCL_DL_LIBS='@DL_LIBS@'
# Flags to pass to the compiler when linking object files into
# an executable tclsh or tcltest binary.
-TCL_LD_FLAGS='@LD_FLAGS@'
+TCL_LD_FLAGS='@LDFLAGS@'
# Flags to pass to ld, such as "-R /usr/local/tcl/lib", that tell the
# run-time dynamic linker where to look for shared libraries such as
diff --git a/win/Makefile.in b/win/Makefile.in
index 85b1d2c..e624052 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -5,7 +5,7 @@
# "autoconf" program (constructs like "@foo@" will get replaced in the
# actual Makefile.
#
-# RCS: @(#) $Id: Makefile.in,v 1.8 1999/06/16 20:12:01 surles Exp $
+# RCS: @(#) $Id: Makefile.in,v 1.9 1999/06/16 22:36:24 surles Exp $
VERSION = @TCL_VERSION@
@@ -260,13 +260,13 @@ TCLSH_OBJS = tclAppInit.$(OBJEXT)
TCL_OBJS = ${GENERIC_OBJS} ${WIN_OBJS} ${COMPAT_OBJS}
-all: binaries libraries man
+all: binaries libraries doc
binaries: @LIBRARIES@ $(STATIC_LIBRARIES) $(TCLSH)
libraries:
-man:
+doc:
$(TCLSH): $(TCL_LIB_FILE) $(TCLSH_OBJS)
$(CC) $(CFLAGS) $(TCLSH_OBJS) $(TCL_LIB_FILE) $(LIBS) $(CC_EXENAME)
@@ -346,9 +346,9 @@ tclStubLib.${OBJEXT}: tclStubLib.c
.c.${OBJEXT}:
$(CC) -c $(CC_SWITCHES) -DBUILD_tcl ${DEPARG} $(CC_OBJNAME)
-install: install-binaries install-libraries
+install: all install-binaries install-libraries install-doc
-install-binaries: binaries
+install-binaries:
@$(MKDIR) -p "$(BIN_INSTALL_DIR)"
@$(MKDIR) -p "$(LIB_INSTALL_DIR)"
@for i in dde1.0 reg1.0; \
@@ -384,7 +384,7 @@ install-binaries: binaries
$(COPY) $(ROOT_DIR)/library/reg1.0/pkgIndex.tcl $(LIB_INSTALL_DIR)/reg1.0; \
fi
-install-libraries: libraries
+install-libraries:
@for i in $(prefix)/lib $(INCLUDE_INSTALL_DIR) \
$(SCRIPT_INSTALL_DIR); \
do \
@@ -425,6 +425,8 @@ install-libraries: libraries
$(COPY) "$$i" "$(SCRIPT_INSTALL_DIR)/encoding"; \
done;
+install-doc:
+
test: binaries $(TCLTEST)
@TCL_LIBRARY="$(ROOT_DIR_NATIVE)/library"; export TCL_LIBRARY; \
./tcltest "$(ROOT_DIR_NATIVE)/tests/all.tcl" $(TESTFLAGS)
diff --git a/win/configure.in b/win/configure.in
index bf701ca..0a5b99a 100644
--- a/win/configure.in
+++ b/win/configure.in
@@ -2,7 +2,7 @@
# generate the file "configure", which is run during Tcl installation
# to configure the system for the local environment.
#
-# RCS: @(#) $Id: configure.in,v 1.6 1999/06/16 20:12:01 surles Exp $
+# RCS: @(#) $Id: configure.in,v 1.7 1999/06/16 22:36:24 surles Exp $
AC_INIT(../generic/tcl.h)
@@ -30,7 +30,6 @@ AC_PROG_MAKE_SET
# These two macros perform additinal compiler test.
#--------------------------------------------------------------------
-AC_PROG_CC
AC_CYGWIN
#--------------------------------------------------------------------
@@ -70,7 +69,7 @@ SC_CONFIG_CFLAGS
SC_ENABLE_SYMBOLS
CFLAGS=${CFLAGS_DEFAULT}
-LD_FLAGS=${LDFLAGS_DEFAULT}
+LDFLAGS=${LDFLAGS_DEFAULT}
TCL_DBGX=${DBGX}
#--------------------------------------------------------------------
@@ -80,7 +79,6 @@ TCL_DBGX=${DBGX}
eval "TCL_SRC_DIR=`cd $srcdir; pwd`"
eval "TCL_STUB_LIB_FILE=tclstub$VER${LIBSUFFIX}"
eval "TCL_DLL_FILE=tcl$VER${DLLSUFFIX}"
-eval "TCL_LIB_FILE=tcl$VER${LIBSUFFIX}"
AC_SUBST(TCL_VERSION)
AC_SUBST(TCL_MAJOR_VERSION)
diff --git a/win/tcl.m4 b/win/tcl.m4
index 9099193..e58d196 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -13,7 +13,7 @@
# Adds the following arguments to configure:
# --with-tcl=...
#
-# Defines the following vars:
+# Sets the following vars:
# TCL_BIN_DIR Full path to the tclConfig.sh file
#------------------------------------------------------------------------
@@ -34,7 +34,7 @@ AC_DEFUN(SC_PATH_TCLCONFIG, [
if test ! -f $TCL_BIN_DIR/tclConfig.sh; then
AC_MSG_ERROR(There is no tclConfig.sh in $TCL_BIN_DIR: perhaps you did not specify the Tcl *build* directory (not the toplevel Tcl directory) or you forgot to configure Tcl?)
fi
- AC_MSG_RESULT([$TCL_BIN_DIR])
+ AC_MSG_RESULT($TCL_BIN_DIR/tclConfig.sh)
])
#------------------------------------------------------------------------
@@ -51,7 +51,7 @@ AC_DEFUN(SC_PATH_TCLCONFIG, [
# Adds the following arguments to configure:
# --with-tk=...
#
-# Defines the following vars:
+# Sets the following vars:
# TK_BIN_DIR Full path to the tkConfig.sh file
#------------------------------------------------------------------------
@@ -73,7 +73,7 @@ AC_DEFUN(SC_PATH_TKCONFIG, [
AC_MSG_ERROR(There is no tkConfig.sh in $TK_BIN_DIR: perhaps you did not specify the Tk *build* directory (not the toplevel Tk directory) or you forgot to configure Tk?)
fi
- AC_MSG_RESULT([$TK_BIN_DIR])
+ AC_MSG_RESULT($TK_BIN_DIR/tkConfig.sh)
])
#------------------------------------------------------------------------
@@ -89,12 +89,11 @@ AC_DEFUN(SC_PATH_TKCONFIG, [
#
# Results:
#
-# Sets the following vars that should be in tclConfig.sh:
+# Subst the following vars:
# TCL_BIN_DIR
# TCL_SRC_DIR
# TCL_LIB_FILE
-# Defines the following vars:
-# TCL_THREADS
+#
#------------------------------------------------------------------------
AC_DEFUN(SC_LOAD_TCLCONFIG, [
@@ -107,9 +106,15 @@ AC_DEFUN(SC_LOAD_TCLCONFIG, [
AC_MSG_RESULT([file not found])
fi
- if test "$TCL_THREADS" = "1"; then
- AC_DEFINE(TCL_THREADS)
- fi
+ # The eval is required to do the TCL_DBGX substitution in the
+ # TCL_LIB_FILE variable.
+
+ eval TCL_LIB_FILE=${TCL_LIB_FILE}
+ eval TCL_LIB_FLAG=${TCL_LIB_FLAG}
+
+ AC_SUBST(TCL_BIN_DIR)
+ AC_SUBST(TCL_SRC_DIR)
+ AC_SUBST(TCL_LIB_FILE)
])
#------------------------------------------------------------------------
@@ -138,6 +143,11 @@ AC_DEFUN(SC_LOAD_TKCONFIG, [
else
AC_MSG_RESULT([could not find $TK_BIN_DIR/tkConfig.sh])
fi
+
+
+ AC_SUBST(TK_BIN_DIR)
+ AC_SUBST(TK_SRC_DIR)
+ AC_SUBST(TK_LIB_FILE)
])
#------------------------------------------------------------------------
@@ -153,7 +163,7 @@ AC_DEFUN(SC_LOAD_TKCONFIG, [
# Adds the following arguments to configure:
# --enable-gcc
#
-# Defines the following vars:
+# Sets the following vars:
# CC Command to use for the compiler
#------------------------------------------------------------------------
@@ -162,6 +172,7 @@ AC_DEFUN(SC_ENABLE_GCC, [
[ok=$enableval], [ok=no])
if test "$ok" = "yes"; then
CC=gcc
+ AC_PROG_CC
else
CC=cl
fi
@@ -181,8 +192,11 @@ AC_DEFUN(SC_ENABLE_GCC, [
# --enable-shared=yes|no
#
# Defines the following vars:
+# STATIC_BUILD Used for building import/export libraries
+# on Windows.
+#
+# Sets the following vars:
# SHARED_BUILD Value of 1 or 0
-# STATIC_BUILD
#------------------------------------------------------------------------
AC_DEFUN(SC_ENABLE_SHARED, [
@@ -223,17 +237,19 @@ AC_DEFUN(SC_ENABLE_SHARED, [
#
# Defines the following vars:
# TCL_THREADS
-#
#------------------------------------------------------------------------
AC_DEFUN(SC_ENABLE_THREADS, [
AC_MSG_CHECKING(for building with threads)
AC_ARG_ENABLE(threads, [ --enable-threads build with threads],
[tcl_ok=$enableval], [tcl_ok=no])
+
if test "$tcl_ok" = "yes"; then
AC_MSG_RESULT(yes)
+ TCL_THREADS=1
AC_DEFINE(TCL_THREADS)
else
+ TCL_THREADS=0
AC_MSG_RESULT(no (default))
fi
])
@@ -269,13 +285,13 @@ AC_DEFUN(SC_ENABLE_SYMBOLS, [
AC_ARG_ENABLE(symbols, [ --enable-symbols build with debugging symbols [--disable-symbols]], [tcl_ok=$enableval], [tcl_ok=no])
if test "$tcl_ok" = "yes"; then
- CFLAGS_DEFAULT='${CFLAGS_DEBUG}'
- LDFLAGS_DEFAULT='${LDFLAGS_DEBUG}'
+ CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
+ LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
DBGX=d
AC_MSG_RESULT([yes])
else
- CFLAGS_DEFAULT='${CFLAGS_OPTIMIZE}'
- LDFLAGS_DEFAULT='${LDFLAGS_OPTIMIZE}'
+ CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}"
+ LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
DBGX=""
AC_MSG_RESULT([no])
fi