summaryrefslogtreecommitdiffstats
path: root/win/configure.in
diff options
context:
space:
mode:
authorsurles <surles>1999-06-16 20:11:28 (GMT)
committersurles <surles>1999-06-16 20:11:28 (GMT)
commit315eceb5db3079f23e9b44bbc8c26b32f07b60f3 (patch)
treeabbed949bce8ff388638855623772027ac2da0d9 /win/configure.in
parent17b3a9afdbac6f249bd15e33f5d4d30239b3d4d1 (diff)
downloadtk-315eceb5db3079f23e9b44bbc8c26b32f07b60f3.zip
tk-315eceb5db3079f23e9b44bbc8c26b32f07b60f3.tar.gz
tk-315eceb5db3079f23e9b44bbc8c26b32f07b60f3.tar.bz2
modified files to work with new windows Makefiles
Diffstat (limited to 'win/configure.in')
-rw-r--r--win/configure.in257
1 files changed, 104 insertions, 153 deletions
diff --git a/win/configure.in b/win/configure.in
index 648c8da..8e49ac6 100644
--- a/win/configure.in
+++ b/win/configure.in
@@ -1,186 +1,137 @@
-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.
+# This file is an input file used by the GNU "autoconf" program to
+# generate the file "configure", which is run during Tk installation
+# to configure the system for the local environment.
+#
+# RCS: @(#) $Id: configure.in,v 1.2 1999/06/16 20:11:30 surles Exp $
+
AC_INIT(../generic/tk.h)
-# RCS: @(#) $Id: configure.in,v 1.1 1999/06/02 19:30:23 surles Exp $
TK_VERSION=8.1
TK_MAJOR_VERSION=8
TK_MINOR_VERSION=1
TK_PATCH_LEVEL=.2
-VERSION=${TK_VERSION}
+VER=$TK_MAJOR_VERSION$TK_MINOR_VERSION
-# Check whether --enable-gcc or --disable-gcc was given. Do this before
-# AC_PROG_CC and AC_CYGWIN are called so the compiler can be fully tested
-# by built-in autoconf tools.
+#--------------------------------------------------------------------
+# Check whether --enable-gcc or --disable-gcc was given. Do this
+# before AC_PROG_CC and AC_CYGWIN are called so the compiler can
+# be fully tested by built-in autoconf tools.
+#--------------------------------------------------------------------
-AC_ARG_ENABLE(gcc, [ --enable-gcc build with gcc],
- [tcl_ok=$enableval], [tcl_ok=test_all])
-if test "$tcl_ok" = "yes"; then
- CC=gcc
-fi
-if test "$tcl_ok" = "no"; then
- CC=cl
-fi
+SC_ENABLE_GCC
+
+#--------------------------------------------------------------------
+# Checks to see if the make progeam sets the $MAKE variable.
+#--------------------------------------------------------------------
AC_PROG_MAKE_SET
+
+#--------------------------------------------------------------------
+# These two macros perform additinal compiler test.
+#--------------------------------------------------------------------
+
AC_PROG_CC
AC_CYGWIN
+
+#--------------------------------------------------------------------
+# Determines the correct binary file extension (.o, .obj, .exe etc.)
+#--------------------------------------------------------------------
+
AC_OBJEXT
AC_EXEEXT
#--------------------------------------------------------------------
-# See if there was a command-line option for where Tcl is; if
-# not, assume that its top-level directory is a sibling of ours.
-# Try the patch-level-specific directory first, then the general one.
-#--------------------------------------------------------------------
-
-if test -d ../../tcl8.1$TK_PATCH_LEVEL/unix; then
- TCL_BIN_DEFAULT=../../tcl8.1$TK_PATCH_LEVEL/unix
-else
- TCL_BIN_DEFAULT=../../tcl8.1/unix
-fi
-
-AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl 8.1 binaries from DIR],
- TCL_BIN_DIR=$withval, TCL_BIN_DIR=`cd $TCL_BIN_DEFAULT; pwd`)
-if test ! -d $TCL_BIN_DIR; then
- AC_MSG_ERROR(Tcl directory $TCL_BIN_DIR does not exist)
-fi
-if test ! -f $TCL_BIN_DIR/Makefile; then
- AC_MSG_ERROR(There is no Makefile in $TCL_BIN_DIR: perhaps you did not specify the Tcl *build* directory (not the toplevel Tcl directory) or you forgot to configure Tcl?)
-else
- echo "building against Tcl binaries in: $TCL_BIN_DIR"
-fi
-
-# Set the default compiler switches based on the --enable-symbols option
-
-AC_ARG_ENABLE(symbols, [ --enable-symbols build with debugging symbols],
- [tcl_ok=$enableval], [tcl_ok=no])
-if test "$tcl_ok" = "yes"; then
- CFLAGS='${CFLAGS_DEBUG}'
- LD_FLAGS='${LDFLAGS_DEBUG}'
- TCL_DBGX=d
- echo "building with debug symbols"
-else
- CFLAGS='${CFLAGS_OPTIMIZE}'
- LD_FLAGS='${LDFLAGS_OPTIMIZE}'
- TCL_DBGX=""
- echo "building without debug symbols"
-fi
-
-# Trick to replace DBGX with TCL_DBGX
-DBGX='${TCL_DBGX}'
-eval "TCL_LIB_FILE=${TCL_LIB_FILE}"
-
# Check whether --enable-threads or --disable-threads was given.
+#--------------------------------------------------------------------
+
+SC_ENABLE_THREADS
+
+#--------------------------------------------------------------------
+# The statements below define a collection of symbols related to
+# building libtk as a shared library instead of a static library.
+#--------------------------------------------------------------------
+
+SC_ENABLE_SHARED
+
+#--------------------------------------------------------------------
+# The statements below define a collection of compile flags. This
+# macro depends on the value of SHARED_BUILD, and should be called
+# after SC_ENABLE_SHARED checks the configure switches.
+#--------------------------------------------------------------------
+
+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_CONFIG_CFLAGS macro is called.
+#--------------------------------------------------------------------
+
+SC_ENABLE_SYMBOLS
+
+TK_DBGX=${DBGX}
+CFLAGS=${CFLAGS_DEFAULT}
+LDFLAGS=${LDFLAGS_DEFAULT}
+
+#--------------------------------------------------------------------
+# Locate and source the tclConfig.sh file.
+#--------------------------------------------------------------------
+
+SC_PATH_TCLCONFIG($TK_PATCH_LEVEL)
+SC_LOAD_TCLCONFIG
+
+#--------------------------------------------------------------------
+# Perform final evaluations of variables with possible substitutions.
+#--------------------------------------------------------------------
+
+eval "TK_SRC_DIR=`cd $srcdir; pwd`"
+eval "TK_DLL_FILE=tk$VER${DLLSUFFIX}"
+eval "TK_LIB_FILE=tk$VER${LIBSUFFIX}"
+eval "TK_STUB_LIB_FILE=tkstub$VER${LIBSUFFIX}"
+eval "TCL_DLL_FILE=tcl$VER${DLLSUFFIX}"
+eval "TCL_LIB_FILE=tcl$VER${LIBSUFFIX}"
+eval "TCL_STUB_LIB_FILE=tclstub$VER${LIBSUFFIX}"
+
+AC_SUBST(TK_VERSION)
+AC_SUBST(TK_MAJOR_VERSION)
+AC_SUBST(TK_MINOR_VERSION)
+AC_SUBST(TK_PATCH_LEVEL)
+AC_SUBST(TK_DBGX)
+AC_SUBST(TK_LIB_FILE)
+AC_SUBST(TK_DLL_FILE)
+AC_SUBST(TK_STUB_LIB_FILE)
+AC_SUBST(TK_SRC_DIR)
+AC_SUBST(TK_BIN_DIR)
+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_ARG_ENABLE(threads, [ --enable-threads build with threads],
- [tcl_ok=$enableval], [tcl_ok=no])
-if test "$tcl_ok" = "yes"; then
- AC_DEFINE(TCL_THREADS)
- echo "building with threads enabled"
-else
- echo "building with threads disabled (default)"
-fi
-
-#--------------------------------------------------------------------
-# The statements below define a collection of symbols related to
-# building libtcl as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-AC_ARG_ENABLE(shared,
- [ --enable-shared build libtcl as a shared library (on by default)],
- [tcl_ok=$enableval], [tcl_ok=yes])
-
-# Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
- enableval="$enable_shared"
- tcl_ok=$enableval
-else
- tcl_ok=yes
-fi
-
-if test "$tcl_ok" = "yes" ; then
- TCL_SHARED_BUILD=1
-else
- TCL_SHARED_BUILD=0
- AC_DEFINE(STATIC_BUILD)
-fi
-
-EXTRA_CFLAGS=""
-# set various compiler flags depending on whether we are using gcc or cl
-if test "${GCC}" = "yes" ; then
- CFLAGS_DEBUG=-g
- CFLAGS_OPTIMIZE=-O
- CFLAGS_WARNING="-Wall -Wconversion"
- LDFLAGS_DEBUG=-g
- LDFLAGS_OPTIMIZE=-O
- PATHTYPE=-u
-
- # Specify the CC output file names based on the target name
- CC_OBJNAME="-o \$@"
- CC_EXENAME="-o \$@"
-else
- SHLIB_LD="link -dll -nologo"
- SHLIB_LD_LIBS="user32.lib advapi32.lib"
- LIBS="user32.lib advapi32.lib"
- AR="lib -nologo"
- MAKE_LIB="\${AR} -out:\$@"
- MAKE_EXE="\${CC} -Fe\$@"
-
- if test "${TCL_SHARED_BUILD}" = "0" ; then
- # static
- echo "building static version"
- runtime=-MT
- MAKE_DLL="echo "
- LIBSUFFIX="s\${TCL_DBGX}.lib"
- LIBRARIES="\${STATIC_LIBRARIES}"
- EXESUFFIX="s\${TCL_DBGX}.exe"
- DLLSUFFIX=""
- else
- # dynamic
- echo "building dynamic version"
- runtime=-MD
- MAKE_DLL="\${SHLIB_LD} \${SHLIB_LD_LIBS} -out:\$@"
- LIBSUFFIX="\${TCL_DBGX}.lib"
- DLLSUFFIX="\${TCL_DBGX}.dll"
- EXESUFFIX="\${TCL_DBGX}.exe"
- LIBRARIES="\${SHARED_LIBRARIES}"
- fi
-
- EXTRA_CFLAGS="-YX -nologo"
- CFLAGS_DEBUG="-Z7 -Od -WX ${runtime}d"
- CFLAGS_OPTIMIZE="-O2 -Gs -GD ${runtime}"
- CFLAGS_WARNING="-W3"
- LDFLAGS_DEBUG="-debug"
- LDFLAGS_OPTIMIZE="-release"
- PATHTYPE=-w
-
- # Specify the CC output file names based on the target name
- CC_OBJNAME="-Fo\$@"
- CC_EXENAME="-Fe\$@"
-fi
-
-eval "LD_FLAGS=${LD_FLAGS}"
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)
AC_SUBST(SHLIB_SUFFIX)
AC_SUBST(CC_OBJNAME)
AC_SUBST(CC_EXENAME)
+AC_SUBST(LDFLAGS)
+AC_SUBST(LDFLAGS_DEBUG)
+AC_SUBST(LDFLAGS_OPTIMIZE)
+AC_SUBST(LDFLAGS_CONSOLE)
+AC_SUBST(LDFLAGS_WINDOW)
AC_SUBST(AR)
+AC_SUBST(RC)
AC_SUBST(DLLSUFFIX)
AC_SUBST(LIBSUFFIX)
AC_SUBST(EXESUFFIX)
@@ -188,4 +139,4 @@ AC_SUBST(LIBRARIES)
AC_SUBST(MAKE_LIB)
AC_SUBST(MAKE_DLL)
-AC_OUTPUT(Makefile)
+AC_OUTPUT(Makefile tkConfig.sh)