summaryrefslogtreecommitdiffstats
path: root/win/aclocal.m4
diff options
context:
space:
mode:
Diffstat (limited to 'win/aclocal.m4')
-rw-r--r--win/aclocal.m491
1 files changed, 52 insertions, 39 deletions
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])
])
#------------------------------------------------------------------------