summaryrefslogtreecommitdiffstats
path: root/unix/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'unix/configure.in')
-rw-r--r--unix/configure.in82
1 files changed, 77 insertions, 5 deletions
diff --git a/unix/configure.in b/unix/configure.in
index aa44403..f79b4db 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 Tk installation
dnl to configure the system for the local environment.
AC_INIT(../generic/tk.h)
-# RCS: @(#) $Id: configure.in,v 1.27 1999/03/06 00:23:43 stanton Exp $
+# RCS: @(#) $Id: configure.in,v 1.28 1999/03/10 07:04:45 stanton Exp $
TK_VERSION=8.0
TK_MAJOR_VERSION=8
@@ -409,13 +409,13 @@ if test "$ok" = "yes" -a "${SHLIB_SUFFIX}" != ""; then
TK_SHARED_BUILD=1
TK_SHLIB_CFLAGS="${SHLIB_CFLAGS}"
TK_LIB_FILE=libtk${TCL_SHARED_LIB_SUFFIX}
- MAKE_LIB="\${SHLIB_LD} -o \${TK_LIB_FILE} \${OBJS} \$(TK_LD_SEARCH_FLAGS) ${SHLIB_LD_LIBS}"
+ MAKE_LIB='\${SHLIB_LD} -o \${TK_LIB_FILE} \${OBJS} \$(TK_LD_SEARCH_FLAGS) ${SHLIB_LD_LIBS}'
RANLIB=":"
else
TK_SHARED_BUILD=0
TK_SHLIB_CFLAGS=""
TK_LIB_FILE=libtk${TCL_UNSHARED_LIB_SUFFIX}
- MAKE_LIB="ar cr \${TK_LIB_FILE} \${OBJS}"
+ MAKE_LIB='ar cr \${TK_LIB_FILE} \${OBJS}'
fi
DBGX='${TK_DBGX}'
@@ -433,15 +433,86 @@ if test $TK_SHARED_BUILD = 0 -o $TCL_NEEDS_EXP_FILE = 0; then
TK_LIB_FLAG="-ltk`echo ${VERSION} | tr -d .`\${TK_DBGX}"
fi
TK_BUILD_LIB_SPEC="-L`pwd` ${TK_LIB_FLAG}"
- TK_LIB_SPEC="-L${exec_prefix}/lib/tk${VERSION} ${TK_LIB_FLAG}"
+ TK_LIB_SPEC="-L${exec_prefix}/lib ${TK_LIB_FLAG}"
+ TK_BUILD_EXP_FILE=""
+ TK_EXP_FILE=""
else
TK_BUILD_EXP_FILE="lib.exp"
eval "TK_EXP_FILE=libtk${TCL_EXPORT_FILE_SUFFIX}"
TK_BUILD_LIB_SPEC="-bI:`pwd`/${TK_BUILD_EXP_FILE}"
- TK_LIB_SPEC="-bI:${exec_prefix}/lib/tk${VERSION}/${TK_EXP_FILE}"
+ TK_LIB_SPEC="-bI:${exec_prefix}/lib/${TK_EXP_FILE}"
fi
+#--------------------------------------------------------------------
+# The statements below define various symbols relating to Tk
+# using tcl stub support.
+#--------------------------------------------------------------------
+
+AC_MSG_CHECKING(how to link to Tcl)
+
+AC_ARG_ENABLE(tcl-stub,
+ [ --enable-tcl-stub use the Tcl stub interface],
+ [tk_ok=$enableval], [tk_ok=no])
+
+if test "$tk_ok" = "yes" ; then
+
+ AC_MSG_RESULT(using Tcl stub interface)
+
+ TCL_STUB_FLAGS="-DUSE_TCL_STUBS"
+
+ # Don't link Tk directly to Tcl.
+
+ if test "$SHLIB_LD_LIBS" = '${LIBS}'; then
+ SHLIB_LD_LIBS='${STUB_LIBS}'
+ else
+ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TCL_BUILD_STUB_LIB_SPEC}"
+ fi
+else
+ AC_MSG_RESULT(dynamic linking)
+
+ TCL_BUILD_STUB_LIB_SPEC=""
+ TCL_STUB_FLAGS=""
+fi
+
+#--------------------------------------------------------------------
+# The statements below define various symbols relating to Tcl
+# stub support.
+#--------------------------------------------------------------------
+# Replace ${VERSION} with contents of ${TK_VERSION}
+eval "STUB_LIB_FILE=libtkstub${TCL_UNSHARED_LIB_SUFFIX}"
+
+# Replace DBGX with TCL_DBGX
+eval "STUB_LIB_FILE=\"${STUB_LIB_FILE}\""
+
+MAKE_STUB_LIB="ar cr \${STUB_LIB_FILE} \${STUB_LIB_OBJS}"
+
+TK_STUB_LIB_FILE=${STUB_LIB_FILE}
+
+if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
+ TK_STUB_LIB_FLAG="-ltkstub${TK_VERSION}\${TCL_DBGX}"
+else
+ TK_STUB_LIB_FLAG="-ltkstub`echo ${TK_VERSION} | tr -d .`\${TCL_DBGX}"
+fi
+
+TK_BUILD_STUB_LIB_SPEC="-L`pwd` ${TK_STUB_LIB_FLAG}"
+TL_STUB_LIB_SPEC="-L${exec_prefix}/lib ${TK_STUB_LIB_FLAG}"
+TK_BUILD_STUB_LIB_PATH="`pwd`/${TK_STUB_LIB_FILE}"
+TK_STUB_LIB_PATH="${exec_prefix}/lib/${TK_STUB_LIB_FILE}"
+
+AC_SUBST(STUB_LIB_FILE)
+
+AC_SUBST(TK_STUB_LIB_FILE)
+AC_SUBST(TK_STUB_LIB_FLAG)
+AC_SUBST(TK_BUILD_STUB_LIB_SPEC)
+AC_SUBST(TK_STUB_LIB_SPEC)
+AC_SUBST(TK_BUILD_STUB_LIB_PATH)
+AC_SUBST(TK_STUB_LIB_PATH)
+AC_SUBST(MAKE_STUB_LIB)
+AC_SUBST(TCL_STUB_FLAGS)
+AC_SUBST(TK_BUILD_EXP_FILE)
+AC_SUBST(TK_EXP_FILE)
+
AC_SUBST(CFLAGS_DEBUG)
AC_SUBST(CFLAGS_DEFAULT)
AC_SUBST(CFLAGS_OPTIMIZE)
@@ -459,6 +530,7 @@ AC_SUBST(SHLIB_SUFFIX)
AC_SUBST(SHLIB_VERSION)
AC_SUBST(TCL_BIN_DIR)
AC_SUBST(TCL_BUILD_LIB_SPEC)
+AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
AC_SUBST(TCL_DBGX)
AC_SUBST(TCL_LIB_FLAG)
AC_SUBST(TCL_SRC_DIR)