Index: macosx/GNUmakefile ================================================================== --- macosx/GNUmakefile +++ macosx/GNUmakefile @@ -53,11 +53,11 @@ #------------------------------------------------------------------------------------------------------- # meta targets meta := all install embedded install-embedded clean distclean test -styles := develop deploy +styles := tcl8 develop deploy all := ${styles} all : ${all} install := ${styles:%=install-%} @@ -74,11 +74,11 @@ clean-%: action := clean- distclean := ${styles:%=distclean-%} distclean : ${distclean} distclean-%: action := distclean- -test := ${styles:%=test-%} +test := test-develop test-deploy test : ${test} test-%: action := test- targets := $(foreach v,${meta},${$v}) @@ -93,10 +93,11 @@ space := ${empty} ${empty} objdir = $(subst ${space},\ ,${OBJ_DIR}) develop_make_args := BUILD_STYLE=Development CONFIGURE_ARGS=--enable-symbols deploy_make_args := BUILD_STYLE=Deployment INSTALL_TARGET=install-strip +tcl8_make_args := BUILD_STYLE=Tcl8 CONFIGURE_ARGS=--with-tcl8 embedded_make_args := EMBEDDED_BUILD=1 install_make_args := INSTALL_BUILD=1 ${targets}: ${MAKE} ${action}${PROJECT} \ @@ -268,11 +269,11 @@ rm -rf "./${APP_DIR}/Wish.app/Contents/Frameworks" && \ mkdir -p "./${APP_DIR}/Wish.app/Contents/Frameworks" && \ ${CPPROG} -RH "./${FMWK_DIR}"/T{cl,k}.framework "./${APP_DIR}/Wish.app/Contents/Frameworks" && \ cd "./${APP_DIR}/Wish.app/Contents" && \ rm -rf Frameworks/Tcl.framework/{,/Versions/${TCL_VERSION}}/{Headers,PrivateHeaders,*_debug,lib*.a,*Config.sh} && \ - rm -rf Frameworks/Tk.framework/{,/Versions/${VERSION}}/{Headers,PrivateHeaders,*_debug,lib*.a,*Config.sh} && \ + rm -rf Frameworks/Tk.framework/{,/Versions/${VERSION}}/{Headers,PrivateHeaders,*_debug,tcl8*,lib*.a,*Config.sh} && \ fix_install_id ( ) { \ chmod -RH a+w "$$1"; \ install_name_tool -id $$(otool -L "$$1" | awk "/$$2\.framework.*[^:]\$$/ {sub(\"^.*/Frameworks\",\"@executable_path/../Frameworks\",\$$1); print \$$1}") "$$1"; \ chmod -RH a-w "$$1"; \ } && \ Index: unix/configure ================================================================== --- unix/configure +++ unix/configure @@ -797,10 +797,11 @@ OBJEXT_FOR_BUILD' ac_subst_files='' ac_user_opts=' enable_option_checking with_tcl +with_tcl8 enable_man_symlinks enable_man_compression enable_man_suffix with_encoding enable_shared @@ -1476,10 +1477,11 @@ Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-tcl directory containing tcl configuration (tclConfig.sh) + --with-tcl8 Compile for Tcl8 in Tcl9 environment --with-encoding encoding for configuration values (default: utf-8) --with-x use the X Window System Some influential environment variables: CC C compiler command @@ -2630,10 +2632,17 @@ if test ${with_tcl+y} then : withval=$with_tcl; with_tclconfig="${withval}" fi + +# Check whether --with-tcl8 was given. +if test ${with_tcl8+y} +then : + withval=$with_tcl8; with_tcl8="${withval}" +fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5 printf %s "checking for Tcl configuration... " >&6; } if test ${ac_cv_c_tclconfig+y} then : printf %s "(cached) " >&6 @@ -4268,10 +4277,16 @@ esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $do64bit" >&5 printf "%s\n" "$do64bit" >&6; } + + if test x"${with_tcl8}" != x; then + +printf "%s\n" "#define TCL_MAJOR_VERSION 8" >>confdefs.h + + fi # Step 0.b: Enable Solaris 64 bit VIS support? { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if 64bit Sparc VIS support is requested" >&5 printf %s "checking if 64bit Sparc VIS support is requested... " >&6; } @@ -8916,14 +8931,14 @@ #-------------------------------------------------------------------- eval eval "TK_UNSHARED_LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}" eval eval "TK_SHARED_LIB_SUFFIX=${SHARED_LIB_SUFFIX}" eval "TK_LIB_FILE_TCL8=libtk${LIB_SUFFIX}" -if test ${TCL_MAJOR_VERSION} = 8 ; then -eval "TK_LIB_FILE=libtk${LIB_SUFFIX}" -else +if test "${TCL_MAJOR_VERSION}" -gt 8 -a x"${with_tcl8}" == x; then eval "TK_LIB_FILE=libtcl9tk${LIB_SUFFIX}" +else +eval "TK_LIB_FILE=libtk${LIB_SUFFIX}" fi eval "TK_LIB_FILE_TCL9=libtcl9tk${LIB_SUFFIX}" # tkConfig.sh needs a version of the _LIB_SUFFIX that has been eval'ed # since on some platforms TK_LIB_FILE contains shell escapes. @@ -9015,16 +9030,16 @@ LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH" if test "${libdir}" = '${exec_prefix}/lib'; then # override libdir default libdir="/Library/Frameworks" fi - if test ${TCL_MAJOR_VERSION} = 8 ; then + if test "${TCL_MAJOR_VERSION}" -gt 8 -a x"${with_tcl8}" == x; then TK_LIB_FILE="Tk" else - TK_LIB_FILE="Tk" + TK_LIB_FILE="tcl8Tk" fi - TK_LIB_FILE_TCL8="Tk" + TK_LIB_FILE_TCL8="tcl8Tk" TK_LIB_FILE_TCL9="Tk" TK_LIB_FLAG="-framework Tk" TK_BUILD_LIB_SPEC="-F`pwd | sed -e 's/ /\\\\ /g'` -framework Tk" TK_LIB_SPEC="-F${libdir} -framework Tk" libdir="${libdir}/Tk.framework/Versions/\${VERSION}" @@ -9061,11 +9076,11 @@ EXTRA_INSTALL_BINARIES='@echo "Installing Images to $(LIB_INSTALL_DIR)/" && $(INSTALL_DATA_DIR) "$(LIB_INSTALL_DIR)" && for i in Tk.tiff Tk.icns; do $(INSTALL_DATA) "$(MAC_OSX_DIR)/$$i" "$(LIB_INSTALL_DIR)"; done' fi # libdir must be a fully qualified path and not ${exec_prefix}/lib eval libdir="$libdir" TK_LIB_FLAG="-l" - if test "${TCL_MAJOR_VERSION}" -gt 8 ; then + if test "${TCL_MAJOR_VERSION}" -gt 8 -a x"${with_tcl8}" == x; then TK_LIB_FLAG="${TK_LIB_FLAG}tcl9" fi if test "${ac_cv_cygwin}" = "yes" -a "$SHARED_BUILD" = "1"; then TK_LIB_FLAG="${TK_LIB_FLAG}tk`echo ${TK_VERSION} | tr -d .`" TK_BUILD_LIB_SPEC="-L\$(TOP_DIR)/win ${TK_LIB_FLAG}" Index: unix/configure.ac ================================================================== --- unix/configure.ac +++ unix/configure.ac @@ -578,14 +578,14 @@ #-------------------------------------------------------------------- eval eval "TK_UNSHARED_LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}" eval eval "TK_SHARED_LIB_SUFFIX=${SHARED_LIB_SUFFIX}" eval "TK_LIB_FILE_TCL8=libtk${LIB_SUFFIX}" -if test ${TCL_MAJOR_VERSION} = 8 ; then -eval "TK_LIB_FILE=libtk${LIB_SUFFIX}" +if test "${TCL_MAJOR_VERSION}" -gt 8 -a x"${with_tcl8}" == x; then +eval "TK_LIB_FILE=libtcl9tk${LIB_SUFFIX}" else -eval "TK_LIB_FILE=libtcl9tk${LIB_SUFFIX}" +eval "TK_LIB_FILE=libtk${LIB_SUFFIX}" fi eval "TK_LIB_FILE_TCL9=libtcl9tk${LIB_SUFFIX}" # tkConfig.sh needs a version of the _LIB_SUFFIX that has been eval'ed # since on some platforms TK_LIB_FILE contains shell escapes. @@ -640,16 +640,16 @@ LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH" if test "${libdir}" = '${exec_prefix}/lib'; then # override libdir default libdir="/Library/Frameworks" fi - if test ${TCL_MAJOR_VERSION} = 8 ; then + if test "${TCL_MAJOR_VERSION}" -gt 8 -a x"${with_tcl8}" == x; then TK_LIB_FILE="Tk" else - TK_LIB_FILE="Tk" + TK_LIB_FILE="tcl8Tk" fi - TK_LIB_FILE_TCL8="Tk" + TK_LIB_FILE_TCL8="tcl8Tk" TK_LIB_FILE_TCL9="Tk" TK_LIB_FLAG="-framework Tk" TK_BUILD_LIB_SPEC="-F`pwd | sed -e 's/ /\\\\ /g'` -framework Tk" TK_LIB_SPEC="-F${libdir} -framework Tk" libdir="${libdir}/Tk.framework/Versions/\${VERSION}" @@ -686,11 +686,11 @@ EXTRA_INSTALL_BINARIES='@echo "Installing Images to $(LIB_INSTALL_DIR)/" && $(INSTALL_DATA_DIR) "$(LIB_INSTALL_DIR)" && for i in Tk.tiff Tk.icns; do $(INSTALL_DATA) "$(MAC_OSX_DIR)/$$i" "$(LIB_INSTALL_DIR)"; done' fi # libdir must be a fully qualified path and not ${exec_prefix}/lib eval libdir="$libdir" TK_LIB_FLAG="-l" - if test "${TCL_MAJOR_VERSION}" -gt 8 ; then + if test "${TCL_MAJOR_VERSION}" -gt 8 -a x"${with_tcl8}" == x; then TK_LIB_FLAG="${TK_LIB_FLAG}tcl9" fi if test "${ac_cv_cygwin}" = "yes" -a "$SHARED_BUILD" = "1"; then TK_LIB_FLAG="${TK_LIB_FLAG}tk`echo ${TK_VERSION} | tr -d .`" TK_BUILD_LIB_SPEC="-L\$(TOP_DIR)/win ${TK_LIB_FLAG}" Index: unix/tcl.m4 ================================================================== --- unix/tcl.m4 +++ unix/tcl.m4 @@ -29,10 +29,14 @@ no_tcl=true AC_ARG_WITH(tcl, AS_HELP_STRING([--with-tcl], [directory containing tcl configuration (tclConfig.sh)]), [with_tclconfig="${withval}"]) + AC_ARG_WITH(tcl8, + AS_HELP_STRING([--with-tcl8], + [Compile for Tcl8 in Tcl9 environment]), + [with_tcl8="${withval}"]) AC_MSG_CHECKING([for Tcl configuration]) AC_CACHE_VAL(ac_cv_c_tclconfig,[ # First check to see if --with-tcl was specified. if test x"${with_tclconfig}" != x ; then @@ -887,10 +891,14 @@ AC_ARG_ENABLE(64bit, AS_HELP_STRING([--enable-64bit], [enable 64bit support (default: off)]), [do64bit=$enableval], [do64bit=no]) AC_MSG_RESULT([$do64bit]) + + if test x"${with_tcl8}" != x; then + AC_DEFINE(TCL_MAJOR_VERSION, 8, [Compile for Tcl8?]) + fi # Step 0.b: Enable Solaris 64 bit VIS support? AC_MSG_CHECKING([if 64bit Sparc VIS support is requested]) AC_ARG_ENABLE(64bit-vis, Index: win/configure ================================================================== --- win/configure +++ win/configure @@ -791,10 +791,11 @@ ac_subst_files='' ac_user_opts=' enable_option_checking enable_shared with_tcl +with_tcl8 enable_64bit enable_symbols enable_embedded_manifest enable_zipfs ' @@ -1435,10 +1436,11 @@ Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-tcl directory containing tcl configuration (tclConfig.sh) + --with-tcl8 Compile for Tcl8 in Tcl9 environment Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a @@ -3946,10 +3948,17 @@ if test ${with_tcl+y} then : withval=$with_tcl; with_tclconfig="${withval}" fi + +# Check whether --with-tcl8 was given. +if test ${with_tcl8+y} +then : + withval=$with_tcl8; with_tcl8="${withval}" +fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5 printf %s "checking for Tcl configuration... " >&6; } if test ${ac_cv_c_tclconfig+y} then : printf %s "(cached) " >&6 @@ -4119,10 +4128,16 @@ esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $do64bit" >&5 printf "%s\n" "$do64bit" >&6; } + + if test x"${with_tcl8}" != x; then + +printf "%s\n" "#define TCL_MAJOR_VERSION 8" >>confdefs.h + + fi # Set some defaults (may get changed below) EXTRA_CFLAGS="" printf "%s\n" "#define MODULE_SCOPE extern" >>confdefs.h @@ -5867,11 +5882,11 @@ eval "TK_SRC_DIR=\"`cd $srcdir/..; $CYGPATH $(pwd)`\"" eval "TK_DLL_FILE_TCL8=tk$VER${DLLSUFFIX}" eval "TK_DLL_FILE_TCL9=tcl9tk$VER${DLLSUFFIX}" -if test ${TCL_MAJOR_VERSION} = 8 ; then +if test "${TCL_MAJOR_VERSION}" -lt 9 -o x"${with_tcl8}" != x; then eval "TK_DLL_FILE=tk$VER${DLLSUFFIX}" if test ${SHARED_BUILD} = 0 -o "$GCC" != "yes" ; then eval "TK_LIB_FILE=${LIBPREFIX}tk${VER}${LIBSUFFIX}" else eval "TK_LIB_FILE=${LIBPREFIX}tk${VER}${DLLSUFFIX}.a" @@ -5888,18 +5903,18 @@ eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub${LIBSUFFIX}" ; # FIXME: All of this var junk needs to be done in tcl.m4 !!!! # I left out the other vars that also need to get defined here. # we also need to double check about spaces in path names TK_LIB_FLAG="-l" -if test "${TCL_MAJOR_VERSION}" -gt 8 ; then +if test "${TCL_MAJOR_VERSION}" -gt 8 -a x"${with_tcl8}" == x; then TK_LIB_FLAG="${TK_LIB_FLAG}tcl9" fi eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}${VER}${LIBFLAGSUFFIX}\"" TK_LIB_SPEC="-L${libdir} ${TK_LIB_FLAG}" eval "TK_BUILD_LIB_SPEC=\"-L`$CYGPATH $(pwd)` ${TK_LIB_FLAG}\"" -if test "${TCL_MAJOR_VERSION}" -gt 8 ; then +if test "${TCL_MAJOR_VERSION}" -gt 8 -a x"${with_tcl8}" == x; then eval "TK_STUB_LIB_FLAG=\"-ltkstub${LIBFLAGSUFFIX}\"" else eval "TK_STUB_LIB_FLAG=\"-ltkstub${VER}${LIBFLAGSUFFIX}\"" fi eval "TK_BUILD_STUB_LIB_SPEC=\"-L`$CYGPATH $(pwd)` ${TK_STUB_LIB_FLAG}\"" Index: win/configure.ac ================================================================== --- win/configure.ac +++ win/configure.ac @@ -224,11 +224,11 @@ eval "TK_SRC_DIR=\"`cd $srcdir/..; $CYGPATH $(pwd)`\"" eval "TK_DLL_FILE_TCL8=tk$VER${DLLSUFFIX}" eval "TK_DLL_FILE_TCL9=tcl9tk$VER${DLLSUFFIX}" -if test ${TCL_MAJOR_VERSION} = 8 ; then +if test "${TCL_MAJOR_VERSION}" -lt 9 -o x"${with_tcl8}" != x; then eval "TK_DLL_FILE=tk$VER${DLLSUFFIX}" if test ${SHARED_BUILD} = 0 -o "$GCC" != "yes" ; then eval "TK_LIB_FILE=${LIBPREFIX}tk${VER}${LIBSUFFIX}" else eval "TK_LIB_FILE=${LIBPREFIX}tk${VER}${DLLSUFFIX}.a" @@ -245,18 +245,18 @@ eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub${LIBSUFFIX}" ; # FIXME: All of this var junk needs to be done in tcl.m4 !!!! # I left out the other vars that also need to get defined here. # we also need to double check about spaces in path names TK_LIB_FLAG="-l" -if test "${TCL_MAJOR_VERSION}" -gt 8 ; then +if test "${TCL_MAJOR_VERSION}" -gt 8 -a x"${with_tcl8}" == x; then TK_LIB_FLAG="${TK_LIB_FLAG}tcl9" fi eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}${VER}${LIBFLAGSUFFIX}\"" TK_LIB_SPEC="-L${libdir} ${TK_LIB_FLAG}" eval "TK_BUILD_LIB_SPEC=\"-L`$CYGPATH $(pwd)` ${TK_LIB_FLAG}\"" -if test "${TCL_MAJOR_VERSION}" -gt 8 ; then +if test "${TCL_MAJOR_VERSION}" -gt 8 -a x"${with_tcl8}" == x; then eval "TK_STUB_LIB_FLAG=\"-ltkstub${LIBFLAGSUFFIX}\"" else eval "TK_STUB_LIB_FLAG=\"-ltkstub${VER}${LIBFLAGSUFFIX}\"" fi eval "TK_BUILD_STUB_LIB_SPEC=\"-L`$CYGPATH $(pwd)` ${TK_STUB_LIB_FLAG}\"" Index: win/tcl.m4 ================================================================== --- win/tcl.m4 +++ win/tcl.m4 @@ -29,10 +29,14 @@ no_tcl=true AC_ARG_WITH(tcl, AS_HELP_STRING([--with-tcl], [directory containing tcl configuration (tclConfig.sh)]), [with_tclconfig="${withval}"]) + AC_ARG_WITH(tcl8, + AS_HELP_STRING([--with-tcl8], + [Compile for Tcl8 in Tcl9 environment]), + [with_tcl8="${withval}"]) AC_MSG_CHECKING([for Tcl configuration]) AC_CACHE_VAL(ac_cv_c_tclconfig,[ # First check to see if --with-tcl was specified. if test x"${with_tclconfig}" != x ; then @@ -488,10 +492,14 @@ # Step 0: Enable 64 bit support? AC_MSG_CHECKING([if 64bit support is requested]) AC_ARG_ENABLE(64bit,[ --enable-64bit enable 64bit support (where applicable)], [do64bit=$enableval], [do64bit=no]) AC_MSG_RESULT($do64bit) + + if test x"${with_tcl8}" != x; then + AC_DEFINE(TCL_MAJOR_VERSION, 8, [Compile for Tcl8?]) + fi # Set some defaults (may get changed below) EXTRA_CFLAGS="" AC_DEFINE(MODULE_SCOPE, [extern], [No need to mark inidividual symbols as hidden])