summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsurles <surles>1999-06-16 20:12:01 (GMT)
committersurles <surles>1999-06-16 20:12:01 (GMT)
commitfdff0f9c3a91c3c0f7190f9b86af147de68eec29 (patch)
tree2bcfee21ed53626dba15bf60a0fc22a41c35d731
parent5ec56455226b1df586b2a72d90635ed4913bb186 (diff)
downloadtcl-fdff0f9c3a91c3c0f7190f9b86af147de68eec29.zip
tcl-fdff0f9c3a91c3c0f7190f9b86af147de68eec29.tar.gz
tcl-fdff0f9c3a91c3c0f7190f9b86af147de68eec29.tar.bz2
modified files to work with new windows Makefiles
-rw-r--r--win/Makefile.in10
-rw-r--r--win/aclocal.m491
-rw-r--r--win/configure.in32
-rw-r--r--win/tcl.m491
4 files changed, 129 insertions, 95 deletions
diff --git a/win/Makefile.in b/win/Makefile.in
index 25f297d..85b1d2c 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.7 1999/06/15 01:16:29 hershey Exp $
+# RCS: @(#) $Id: Makefile.in,v 1.8 1999/06/16 20:12:01 surles Exp $
VERSION = @TCL_VERSION@
@@ -102,9 +102,9 @@ DLLSUFFIX = @DLLSUFFIX@
LIBSUFFIX = @LIBSUFFIX@
EXESUFFIX = @EXESUFFIX@
-TCL_STUB_LIB_FILE = tclstub$(VER)${LIBSUFFIX}
-TCL_DLL_FILE = tcl$(VER)${DLLSUFFIX}
-TCL_LIB_FILE = tcl$(VER)${LIBSUFFIX}
+TCL_STUB_LIB_FILE = @TCL_STUB_LIB_FILE@
+TCL_DLL_FILE = @TCL_DLL_FILE@
+TCL_LIB_FILE = @TCL_LIB_FILE@
DDE_DLL_FILE = tcldde$(VER)${DLLSUFFIX}
REG_DLL_FILE = tclreg$(VER)${DLLSUFFIX}
PIPE_DLL_FILE = tclpip$(VER)${DLLSUFFIX}
@@ -437,7 +437,7 @@ runtest: tcltest
depend:
Makefile: Makefile.in
- config.status
+ ./config.status
clean:
$(RM) *.lib *.exp *.dll *.${OBJEXT} *~ \#* TAGS a.out
diff --git a/win/aclocal.m4 b/win/aclocal.m4
index dbbf43b..9099193 100644
--- a/win/aclocal.m4
+++ b/win/aclocal.m4
@@ -14,28 +14,27 @@
# --with-tcl=...
#
# Defines the following vars:
-# TCLCONFIG Full path to the tclConfig.sh file
+# TCL_BIN_DIR Full path to the tclConfig.sh file
#------------------------------------------------------------------------
AC_DEFUN(SC_PATH_TCLCONFIG, [
AC_MSG_CHECKING([the location of tclConfig.sh])
if test -d ../../tcl8.1$1/win; then
- TCLCONFIG_DEFAULT=../../tcl8.1$1/win
+ TCL_BIN_DIR_DEFAULT=../../tcl8.1$1/win
else
- TCLCONFIG_DEFAULT=../../tcl8.1/win
+ TCL_BIN_DIR_DEFAULT=../../tcl8.1/win
fi
AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl 8.1 binaries from DIR],
- TCLCONFIG=$withval, TCLCONFIG=`cd $TCLCONFIG_DEFAULT; pwd`)
- if test ! -d $TCLCONFIG; then
- AC_MSG_ERROR(Tcl directory $TCLCONFIG does not exist)
+ TCL_BIN_DIR=$withval, TCL_BIN_DIR=`cd $TCL_BIN_DIR_DEFAULT; pwd`)
+ if test ! -d $TCL_BIN_DIR; then
+ AC_MSG_ERROR(Tcl directory $TCL_BIN_DIR does not exist)
fi
- if test ! -f $TCLCONFIG/tclConfig.sh; then
- AC_MSG_ERROR(There is no tclConfig.sh in $TCLCONFIG: perhaps you did not specify the Tcl *build* directory (not the toplevel Tcl directory) or you forgot to configure Tcl?)
+ 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([$TCLCONFIG])
+ AC_MSG_RESULT([$TCL_BIN_DIR])
])
#------------------------------------------------------------------------
@@ -53,28 +52,28 @@ AC_DEFUN(SC_PATH_TCLCONFIG, [
# --with-tk=...
#
# Defines the following vars:
-# TKCONFIG Full path to the tkConfig.sh file
+# TK_BIN_DIR Full path to the tkConfig.sh file
#------------------------------------------------------------------------
AC_DEFUN(SC_PATH_TKCONFIG, [
AC_MSG_CHECKING([the location of tkConfig.sh])
if test -d ../../tk8.1$1/win; then
- TKCONFIG_DEFAULT=../../tk8.1$1/win
+ TK_BIN_DIR_DEFAULT=../../tk8.1$1/win
else
- TKCONFIG_DEFAULT=../../tk8.1/win
+ TK_BIN_DIR_DEFAULT=../../tk8.1/win
fi
AC_ARG_WITH(tk, [ --with-tk=DIR use Tk 8.1 binaries from DIR],
- TKCONFIG=$withval, TKCONFIG=`cd $TKCONFIG_DEFAULT; pwd`)
- if test ! -d $TKCONFIG; then
- AC_MSG_ERROR(Tk directory $TKCONFIG does not exist)
+ TK_BIN_DIR=$withval, TK_BIN_DIR=`cd $TK_BIN_DIR_DEFAULT; pwd`)
+ if test ! -d $TK_BIN_DIR; then
+ AC_MSG_ERROR(Tk directory $TK_BIN_DIR does not exist)
fi
- if test ! -f $TKCONFIG/tkConfig.sh; then
- AC_MSG_ERROR(There is no tkConfig.sh in $TKCONFIG: perhaps you did not specify the Tk *build* directory (not the toplevel Tk directory) or you forgot to configure Tk?)
+ if test ! -f $TK_BIN_DIR/tkConfig.sh; then
+ 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([$TKCONFIG])
+ AC_MSG_RESULT([$TK_BIN_DIR])
])
#------------------------------------------------------------------------
@@ -86,7 +85,7 @@ AC_DEFUN(SC_PATH_TKCONFIG, [
# Arguments:
#
# Requires the following vars to be set:
-# TCLCONFIG
+# TCL_BIN_DIR
#
# Results:
#
@@ -99,12 +98,16 @@ AC_DEFUN(SC_PATH_TKCONFIG, [
#------------------------------------------------------------------------
AC_DEFUN(SC_LOAD_TCLCONFIG, [
- if test -f "$TCLCONFIG" ; then
- echo "loading $TCLCONFIG"
- . $TCLCONFIG
+ 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 test $TCL_THREADS = 1; then
+ if test "$TCL_THREADS" = "1"; then
AC_DEFINE(TCL_THREADS)
fi
])
@@ -118,7 +121,7 @@ AC_DEFUN(SC_LOAD_TCLCONFIG, [
# Arguments:
#
# Requires the following vars to be set:
-# TKCONFIG
+# TK_BIN_DIR
#
# Results:
#
@@ -127,9 +130,13 @@ AC_DEFUN(SC_LOAD_TCLCONFIG, [
#------------------------------------------------------------------------
AC_DEFUN(SC_LOAD_TKCONFIG, [
- if test -f "$TKCONFIG" ; then
- echo "loading $TKCONFIG"
- . $TKCONFIG
+ AC_MSG_CHECKING([for existence of $TCLCONFIG])
+
+ if test -f "$TK_BIN_DIR/tkConfig.sh" ; then
+ AC_MSG_CHECKING([loading $TK_BIN_DIR/tkConfig.sh])
+ . $TK_BIN_DIR/tkConfig.sh
+ else
+ AC_MSG_RESULT([could not find $TK_BIN_DIR/tkConfig.sh])
fi
])
@@ -251,7 +258,7 @@ AC_DEFUN(SC_ENABLE_THREADS, [
# Defines the following vars:
# CFLAGS_DEFAULT Sets to CFLAGS_DEBUG if true
# Sets to CFLAGS_OPTIMIZE if false
-# LD_FLAGS_DEFAULT Sets to LDFLAGS_DEBUG if true
+# LDFLAGS_DEFAULT Sets to LDFLAGS_DEBUG if true
# Sets to LDFLAGS_OPTIMIZE if false
# DBGX Debug library extension
#
@@ -263,12 +270,12 @@ AC_DEFUN(SC_ENABLE_SYMBOLS, [
if test "$tcl_ok" = "yes"; then
CFLAGS_DEFAULT='${CFLAGS_DEBUG}'
- LD_FLAGS_DEFAULT='${LDFLAGS_DEBUG}'
+ LDFLAGS_DEFAULT='${LDFLAGS_DEBUG}'
DBGX=d
AC_MSG_RESULT([yes])
else
CFLAGS_DEFAULT='${CFLAGS_OPTIMIZE}'
- LD_FLAGS_DEFAULT='${LDFLAGS_OPTIMIZE}'
+ LDFLAGS_DEFAULT='${LDFLAGS_OPTIMIZE}'
DBGX=""
AC_MSG_RESULT([no])
fi
@@ -276,7 +283,7 @@ AC_DEFUN(SC_ENABLE_SYMBOLS, [
#--------------------------------------------------------------------
-# SC_TCL_CONFIG_CFLAGS
+# SC_CONFIG_CFLAGS
#
# Try to determine the proper flags to pass to the compiler
# for building shared libraries and other such nonsense.
@@ -317,7 +324,7 @@ AC_DEFUN(SC_ENABLE_SYMBOLS, [
#
#--------------------------------------------------------------------
-AC_DEFUN(SC_TCL_CONFIG_CFLAGS, [
+AC_DEFUN(SC_CONFIG_CFLAGS, [
AC_MSG_CHECKING([compiler flags])
EXTRA_CFLAGS=""
# set various compiler flags depending on whether we are using gcc or cl
@@ -338,12 +345,13 @@ AC_DEFUN(SC_TCL_CONFIG_CFLAGS, [
SHLIB_LD_LIBS="user32.lib advapi32.lib"
LIBS="user32.lib advapi32.lib"
AR="lib -nologo"
+ RC="rc"
MAKE_LIB="\${AR} -out:\[$]@"
MAKE_EXE="\${CC} -Fe\[$]@"
if test "${SHARED_BUILD}" = "0" ; then
# static
- echo "building static version"
+ AC_MSG_RESULT([using static flags])
runtime=-MT
MAKE_DLL="echo "
LIBSUFFIX="s\${DBGX}.lib"
@@ -352,9 +360,9 @@ AC_DEFUN(SC_TCL_CONFIG_CFLAGS, [
DLLSUFFIX=""
else
# dynamic
- echo "building dynamic version"
+ AC_MSG_RESULT([using shared flags])
runtime=-MD
- MAKE_DLL="\${SHLIB_LD} \${SHLIB_LD_LIBS} -out:\[$]@"
+ MAKE_DLL="\${SHLIB_LD} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\[$]@"
LIBSUFFIX="\${DBGX}.lib"
DLLSUFFIX="\${DBGX}.dll"
EXESUFFIX="\${DBGX}.exe"
@@ -363,17 +371,22 @@ AC_DEFUN(SC_TCL_CONFIG_CFLAGS, [
EXTRA_CFLAGS="-YX"
CFLAGS_DEBUG="-nologo -Z7 -Od -WX ${runtime}d"
- CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD ${runtime}"
+# CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD ${runtime}"
+ CFLAGS_OPTIMIZE="-nologo -Oti -Gs -GD ${runtime}"
CFLAGS_WARNING="-W3"
- LDFLAGS_DEBUG="-debug"
+ LDFLAGS_DEBUG="-debug:full -debugtype:cv"
LDFLAGS_OPTIMIZE="-release"
PATHTYPE=-w
# Specify the CC output file names based on the target name
CC_OBJNAME="-Fo\[$]@"
CC_EXENAME="-Fe\[$]@"
+
+ # Specify linker flags depending on the type of app being
+ # built -- Console vs. Window.
+ LDFLAGS_CONSOLE="-subsystem:console"
+ LDFLAGS_WINDOW="-subsystem:windows"
fi
- AC_MSG_RESULT([done])
])
#------------------------------------------------------------------------
diff --git a/win/configure.in b/win/configure.in
index 092f1ee..bf701ca 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.5 1999/06/11 01:53:04 surles Exp $
+# RCS: @(#) $Id: configure.in,v 1.6 1999/06/16 20:12:01 surles Exp $
AC_INIT(../generic/tcl.h)
@@ -10,6 +10,7 @@ TCL_VERSION=8.1
TCL_MAJOR_VERSION=8
TCL_MINOR_VERSION=1
TCL_PATCH_LEVEL=.2
+VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION
#--------------------------------------------------------------------
# Check whether --enable-gcc or --disable-gcc was given. Do this
@@ -58,12 +59,12 @@ SC_ENABLE_SHARED
# after SC_ENABLE_SHARED checks the configure switches.
#--------------------------------------------------------------------
-SC_TCL_CONFIG_CFLAGS
+SC_CONFIG_CFLAGS
#--------------------------------------------------------------------
# Set the default compiler switches based on the --enable-symbols
# option. This macro depends on C flags, and should be called
-# after SC_TCL_CONFIG_CFLAGS macro is called.
+# after SC_CONFIG_CFLAGS macro is called.
#--------------------------------------------------------------------
SC_ENABLE_SYMBOLS
@@ -76,20 +77,27 @@ TCL_DBGX=${DBGX}
# Perform final evaluations of variables with possible substitutions.
#--------------------------------------------------------------------
-eval "TCL_LIB_FILE=${TCL_LIB_FILE}"
-eval "LD_FLAGS=${LD_FLAGS}"
+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)
+AC_SUBST(TCL_MINOR_VERSION)
+AC_SUBST(TCL_PATCH_LEVEL)
+AC_SUBST(TCL_LIB_FILE)
+AC_SUBST(TCL_DLL_FILE)
+AC_SUBST(TCL_STUB_LIB_FILE)
+AC_SUBST(TCL_SRC_DIR)
+AC_SUBST(TCL_BIN_DIR)
+AC_SUBST(TCL_DBGX)
AC_SUBST(PATHTYPE)
AC_SUBST(CFLAGS_DEBUG)
AC_SUBST(CFLAGS_OPTIMIZE)
AC_SUBST(CFLAGS_WARNING)
AC_SUBST(EXTRA_CFLAGS)
-AC_SUBST(TCL_DBGX)
-AC_SUBST(TCL_LIB_FILE)
-AC_SUBST(TCL_MAJOR_VERSION)
-AC_SUBST(TCL_MINOR_VERSION)
-AC_SUBST(TCL_PATCH_LEVEL)
-AC_SUBST(TCL_VERSION)
AC_SUBST(SHLIB_LD)
AC_SUBST(SHLIB_LD_LIBS)
AC_SUBST(SHLIB_CFLAGS)
@@ -104,4 +112,4 @@ AC_SUBST(LIBRARIES)
AC_SUBST(MAKE_LIB)
AC_SUBST(MAKE_DLL)
-AC_OUTPUT(Makefile)
+AC_OUTPUT(Makefile tclConfig.sh)
diff --git a/win/tcl.m4 b/win/tcl.m4
index dbbf43b..9099193 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -14,28 +14,27 @@
# --with-tcl=...
#
# Defines the following vars:
-# TCLCONFIG Full path to the tclConfig.sh file
+# TCL_BIN_DIR Full path to the tclConfig.sh file
#------------------------------------------------------------------------
AC_DEFUN(SC_PATH_TCLCONFIG, [
AC_MSG_CHECKING([the location of tclConfig.sh])
if test -d ../../tcl8.1$1/win; then
- TCLCONFIG_DEFAULT=../../tcl8.1$1/win
+ TCL_BIN_DIR_DEFAULT=../../tcl8.1$1/win
else
- TCLCONFIG_DEFAULT=../../tcl8.1/win
+ TCL_BIN_DIR_DEFAULT=../../tcl8.1/win
fi
AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl 8.1 binaries from DIR],
- TCLCONFIG=$withval, TCLCONFIG=`cd $TCLCONFIG_DEFAULT; pwd`)
- if test ! -d $TCLCONFIG; then
- AC_MSG_ERROR(Tcl directory $TCLCONFIG does not exist)
+ TCL_BIN_DIR=$withval, TCL_BIN_DIR=`cd $TCL_BIN_DIR_DEFAULT; pwd`)
+ if test ! -d $TCL_BIN_DIR; then
+ AC_MSG_ERROR(Tcl directory $TCL_BIN_DIR does not exist)
fi
- if test ! -f $TCLCONFIG/tclConfig.sh; then
- AC_MSG_ERROR(There is no tclConfig.sh in $TCLCONFIG: perhaps you did not specify the Tcl *build* directory (not the toplevel Tcl directory) or you forgot to configure Tcl?)
+ 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([$TCLCONFIG])
+ AC_MSG_RESULT([$TCL_BIN_DIR])
])
#------------------------------------------------------------------------
@@ -53,28 +52,28 @@ AC_DEFUN(SC_PATH_TCLCONFIG, [
# --with-tk=...
#
# Defines the following vars:
-# TKCONFIG Full path to the tkConfig.sh file
+# TK_BIN_DIR Full path to the tkConfig.sh file
#------------------------------------------------------------------------
AC_DEFUN(SC_PATH_TKCONFIG, [
AC_MSG_CHECKING([the location of tkConfig.sh])
if test -d ../../tk8.1$1/win; then
- TKCONFIG_DEFAULT=../../tk8.1$1/win
+ TK_BIN_DIR_DEFAULT=../../tk8.1$1/win
else
- TKCONFIG_DEFAULT=../../tk8.1/win
+ TK_BIN_DIR_DEFAULT=../../tk8.1/win
fi
AC_ARG_WITH(tk, [ --with-tk=DIR use Tk 8.1 binaries from DIR],
- TKCONFIG=$withval, TKCONFIG=`cd $TKCONFIG_DEFAULT; pwd`)
- if test ! -d $TKCONFIG; then
- AC_MSG_ERROR(Tk directory $TKCONFIG does not exist)
+ TK_BIN_DIR=$withval, TK_BIN_DIR=`cd $TK_BIN_DIR_DEFAULT; pwd`)
+ if test ! -d $TK_BIN_DIR; then
+ AC_MSG_ERROR(Tk directory $TK_BIN_DIR does not exist)
fi
- if test ! -f $TKCONFIG/tkConfig.sh; then
- AC_MSG_ERROR(There is no tkConfig.sh in $TKCONFIG: perhaps you did not specify the Tk *build* directory (not the toplevel Tk directory) or you forgot to configure Tk?)
+ if test ! -f $TK_BIN_DIR/tkConfig.sh; then
+ 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([$TKCONFIG])
+ AC_MSG_RESULT([$TK_BIN_DIR])
])
#------------------------------------------------------------------------
@@ -86,7 +85,7 @@ AC_DEFUN(SC_PATH_TKCONFIG, [
# Arguments:
#
# Requires the following vars to be set:
-# TCLCONFIG
+# TCL_BIN_DIR
#
# Results:
#
@@ -99,12 +98,16 @@ AC_DEFUN(SC_PATH_TKCONFIG, [
#------------------------------------------------------------------------
AC_DEFUN(SC_LOAD_TCLCONFIG, [
- if test -f "$TCLCONFIG" ; then
- echo "loading $TCLCONFIG"
- . $TCLCONFIG
+ 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 test $TCL_THREADS = 1; then
+ if test "$TCL_THREADS" = "1"; then
AC_DEFINE(TCL_THREADS)
fi
])
@@ -118,7 +121,7 @@ AC_DEFUN(SC_LOAD_TCLCONFIG, [
# Arguments:
#
# Requires the following vars to be set:
-# TKCONFIG
+# TK_BIN_DIR
#
# Results:
#
@@ -127,9 +130,13 @@ AC_DEFUN(SC_LOAD_TCLCONFIG, [
#------------------------------------------------------------------------
AC_DEFUN(SC_LOAD_TKCONFIG, [
- if test -f "$TKCONFIG" ; then
- echo "loading $TKCONFIG"
- . $TKCONFIG
+ AC_MSG_CHECKING([for existence of $TCLCONFIG])
+
+ if test -f "$TK_BIN_DIR/tkConfig.sh" ; then
+ AC_MSG_CHECKING([loading $TK_BIN_DIR/tkConfig.sh])
+ . $TK_BIN_DIR/tkConfig.sh
+ else
+ AC_MSG_RESULT([could not find $TK_BIN_DIR/tkConfig.sh])
fi
])
@@ -251,7 +258,7 @@ AC_DEFUN(SC_ENABLE_THREADS, [
# Defines the following vars:
# CFLAGS_DEFAULT Sets to CFLAGS_DEBUG if true
# Sets to CFLAGS_OPTIMIZE if false
-# LD_FLAGS_DEFAULT Sets to LDFLAGS_DEBUG if true
+# LDFLAGS_DEFAULT Sets to LDFLAGS_DEBUG if true
# Sets to LDFLAGS_OPTIMIZE if false
# DBGX Debug library extension
#
@@ -263,12 +270,12 @@ AC_DEFUN(SC_ENABLE_SYMBOLS, [
if test "$tcl_ok" = "yes"; then
CFLAGS_DEFAULT='${CFLAGS_DEBUG}'
- LD_FLAGS_DEFAULT='${LDFLAGS_DEBUG}'
+ LDFLAGS_DEFAULT='${LDFLAGS_DEBUG}'
DBGX=d
AC_MSG_RESULT([yes])
else
CFLAGS_DEFAULT='${CFLAGS_OPTIMIZE}'
- LD_FLAGS_DEFAULT='${LDFLAGS_OPTIMIZE}'
+ LDFLAGS_DEFAULT='${LDFLAGS_OPTIMIZE}'
DBGX=""
AC_MSG_RESULT([no])
fi
@@ -276,7 +283,7 @@ AC_DEFUN(SC_ENABLE_SYMBOLS, [
#--------------------------------------------------------------------
-# SC_TCL_CONFIG_CFLAGS
+# SC_CONFIG_CFLAGS
#
# Try to determine the proper flags to pass to the compiler
# for building shared libraries and other such nonsense.
@@ -317,7 +324,7 @@ AC_DEFUN(SC_ENABLE_SYMBOLS, [
#
#--------------------------------------------------------------------
-AC_DEFUN(SC_TCL_CONFIG_CFLAGS, [
+AC_DEFUN(SC_CONFIG_CFLAGS, [
AC_MSG_CHECKING([compiler flags])
EXTRA_CFLAGS=""
# set various compiler flags depending on whether we are using gcc or cl
@@ -338,12 +345,13 @@ AC_DEFUN(SC_TCL_CONFIG_CFLAGS, [
SHLIB_LD_LIBS="user32.lib advapi32.lib"
LIBS="user32.lib advapi32.lib"
AR="lib -nologo"
+ RC="rc"
MAKE_LIB="\${AR} -out:\[$]@"
MAKE_EXE="\${CC} -Fe\[$]@"
if test "${SHARED_BUILD}" = "0" ; then
# static
- echo "building static version"
+ AC_MSG_RESULT([using static flags])
runtime=-MT
MAKE_DLL="echo "
LIBSUFFIX="s\${DBGX}.lib"
@@ -352,9 +360,9 @@ AC_DEFUN(SC_TCL_CONFIG_CFLAGS, [
DLLSUFFIX=""
else
# dynamic
- echo "building dynamic version"
+ AC_MSG_RESULT([using shared flags])
runtime=-MD
- MAKE_DLL="\${SHLIB_LD} \${SHLIB_LD_LIBS} -out:\[$]@"
+ MAKE_DLL="\${SHLIB_LD} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\[$]@"
LIBSUFFIX="\${DBGX}.lib"
DLLSUFFIX="\${DBGX}.dll"
EXESUFFIX="\${DBGX}.exe"
@@ -363,17 +371,22 @@ AC_DEFUN(SC_TCL_CONFIG_CFLAGS, [
EXTRA_CFLAGS="-YX"
CFLAGS_DEBUG="-nologo -Z7 -Od -WX ${runtime}d"
- CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD ${runtime}"
+# CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD ${runtime}"
+ CFLAGS_OPTIMIZE="-nologo -Oti -Gs -GD ${runtime}"
CFLAGS_WARNING="-W3"
- LDFLAGS_DEBUG="-debug"
+ LDFLAGS_DEBUG="-debug:full -debugtype:cv"
LDFLAGS_OPTIMIZE="-release"
PATHTYPE=-w
# Specify the CC output file names based on the target name
CC_OBJNAME="-Fo\[$]@"
CC_EXENAME="-Fe\[$]@"
+
+ # Specify linker flags depending on the type of app being
+ # built -- Console vs. Window.
+ LDFLAGS_CONSOLE="-subsystem:console"
+ LDFLAGS_WINDOW="-subsystem:windows"
fi
- AC_MSG_RESULT([done])
])
#------------------------------------------------------------------------