diff options
-rw-r--r-- | ChangeLog | 26 | ||||
-rw-r--r-- | macosx/Makefile | 200 | ||||
-rw-r--r-- | macosx/README | 14 | ||||
-rw-r--r-- | macosx/Tcl-Info.plist.in | 27 | ||||
-rw-r--r-- | unix/Makefile.in | 68 | ||||
-rwxr-xr-x | unix/configure | 310 | ||||
-rw-r--r-- | unix/configure.in | 127 | ||||
-rw-r--r-- | unix/tcl.m4 | 3 | ||||
-rw-r--r-- | unix/tclUnixInit.c | 4 |
9 files changed, 530 insertions, 249 deletions
@@ -1,5 +1,31 @@ 2005-05-24 Daniel Steffen <das@users.sourceforge.net> + * macosx/Makefile: + * macosx/README: + * macosx/Tcl-Info.plist.in (new file): + * unix/Makefile.in: + * unix/configure.in: + * unix/tcl.m4: + * unix/tclUnixInit.c: moved all Darwin framework build support from + macosx/Makefile into the standard unix configure/make buildsystem, the + macosx/Makefile is no longer required to build Tcl.framework (but its + functionality is still available for backwards compatibility). + * unix/configure: autoconf-2.59 + + * generic/tclIOUtil.c (TclLoadFile): + * generic/tclInt.h: + * unix/tcl.m4: + * unix/tclLoadDyld.c: added support for [load]ing .bundle binaries in + addition to .dylib's: .bundle's can be [unload]ed (unlike .dylib's), + and can be [load]ed from memory, e.g. directly from VFS without + needing to be written out to a temporary location first. [Bug 1202209] + * unix/configure: autoconf-2.59 + * unix/tclConfig.h.in: autoheader-2.59 + + * generic/tclCmdMZ.c (Tcl_TimeObjCmd): change [time] called with a + count > 1 to return a string with a float value instead of a rounded + off integer. [Bug 1202178] + * doc/expr.n: * doc/string.n: fixed roff syntax complaints from 'make html'. diff --git a/macosx/Makefile b/macosx/Makefile index 5914122..f85ac3e 100644 --- a/macosx/Makefile +++ b/macosx/Makefile @@ -1,9 +1,10 @@ ######################################################################################################## # -# Makefile to build Tcl on Mac OS X packaged as a Framework -# uses standard unix build system in tcl/unix +# Makefile wrapper to build tcl on Mac OS X in a way compatible with the tk/macosx Xcode buildsystem +# uses the standard unix build system in tcl/unix (which can be used directly instead of this +# if you are not using the tk/macosx projects). # -# RCS: @(#) $Id: Makefile,v 1.19 2005/05/14 20:46:46 das Exp $ +# RCS: @(#) $Id: Makefile,v 1.20 2005/05/23 20:21:02 das Exp $ # ######################################################################################################## @@ -21,18 +22,14 @@ EXTRA_CONFIGURE_ARGS ?= EXTRA_MAKE_ARGS ?= INSTALL_PATH ?= /Library/Frameworks -PREFIX ?= /usr +PREFIX ?= /usr/local BINDIR ?= ${PREFIX}/bin +LIBDIR ?= ${INSTALL_PATH} MANDIR ?= ${PREFIX}/man # set to non-empty value to install manpages in addition to html help: INSTALL_MANPAGES ?= -TCL_PACKAGE_PATH ?= "~/Library/Tcl /Library/Tcl /Network/Library/Tcl /System/Library/Tcl \ - ~/Library/Frameworks /Library/Frameworks /Network/Library/Frameworks \ - /System/Library/Frameworks" -TCL_MODULE_PATH ?= "~/Library/Tcl /Library/Tcl /Network/Library/Tcl /System/Library/Tcl" - #------------------------------------------------------------------------------------------------------- # meta targets @@ -49,7 +46,7 @@ install-%: action := install- embedded := ${styles:%=embedded-%} embedded : embedded-deploy -install-embedded := $(embedded:%=install-%) +install-embedded := ${embedded:%=install-%} install-embedded : install-embedded-deploy clean := ${styles:%=clean-%} @@ -68,15 +65,17 @@ targets := $(foreach v,${meta},${$v}) #------------------------------------------------------------------------------------------------------- # build styles +BUILD_STYLE = +CONFIGURE_ARGS = +OBJ_DIR = ${OBJROOT}/${BUILD_STYLE} + develop_make_args := BUILD_STYLE=Development CONFIGURE_ARGS=--enable-symbols -deploy_make_args := BUILD_STYLE=Deployment \ - MAKE_ARGS=INSTALL_PROGRAM="'$$\$${INSTALL} $$\$${INSTALL_STRIP_PROGRAM}'" \ - MAKE_ARGS+=INSTALL_LIBRARY="'$$\$${INSTALL} $$\$${INSTALL_STRIP_LIBRARY}'" \ - MAKE_ARGS+=MEM_DEBUG_FLAGS="-DNDEBUG" +deploy_make_args := BUILD_STYLE=Deployment INSTALL_TARGET=install-strip \ + GENERIC_FLAGS=-DNDEBUG embedded_make_args := EMBEDDED_BUILD=1 install_make_args := INSTALL_BUILD=1 -$(targets): +${targets}: ${MAKE} ${action}${PROJECT} \ $(foreach s,${styles} embedded install,$(if $(findstring $s,$@),${${s}_make_args})) @@ -87,36 +86,37 @@ PROJECT := tcl PRODUCT_NAME := Tcl UNIX_DIR := ${CURDIR}/../unix -GENERIC_DIR := ${CURDIR}/../generic +VERSION := $(shell awk -F= '/^TCL_VERSION/ {print $$2; nextfile}' ${UNIX_DIR}/configure.in) +TCLSH := tclsh${VERSION} -PRODUCT_VERSION := $(shell eval $$(grep '^TCL_VERSION=' ${UNIX_DIR}/configure.in); \ - echo "$${TCL_VERSION}") -PRODUCT_LONGVERSION := $(shell eval $$(grep '^TCL_PATCH_LEVEL=' ${UNIX_DIR}/configure.in); \ - echo "${PRODUCT_VERSION}$${TCL_PATCH_LEVEL}") -YEAR := $(shell date +%Y) +BUILD_TARGET := tclsh tcltest +INSTALL_TARGET := install -TARGETS := tclsh tcltest -TCLSH := tclsh${PRODUCT_VERSION} -TCL_EXE ?= ${SYMROOT}/${TCLSH} +override GENERIC_FLAGS := ${GENERIC_FLAGS} -DTCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING +export CPPROG := cp -p -DYLIB_INSTALL_PATH ?= ${INSTALL_PATH} +INSTALL_TARGETS = install-binaries install-libraries +ifeq (${EMBEDDED_BUILD},) +INSTALL_TARGETS += install-private-headers +endif +ifeq (${INSTALL_BUILD}_${EMBEDDED_BUILD}_${BUILD_STYLE},1__Deployment) +INSTALL_TARGETS += html-tcl +ifneq (${INSTALL_MANPAGES},) +INSTALL_TARGETS += install-doc +endif +endif -LIBDIR := ${INSTALL_PATH}/${PRODUCT_NAME}.framework/Versions/${PRODUCT_VERSION} -DYLIB_INSTALL_DIR := ${DYLIB_INSTALL_PATH}/${PRODUCT_NAME}.framework/Versions/${PRODUCT_VERSION} -INCLUDEDIR := ${LIBDIR}/Headers -PRIVATEINCLUDEDIR := ${LIBDIR}/PrivateHeaders -SCRIPTDIR := ${LIBDIR}/Resources/Scripts -DOCDIR := ${LIBDIR}/Resources/Documentation/Reference -INFOPLIST := ${LIBDIR}/Resources/Info.plist +MAKE_VARS := INSTALL_ROOT INSTALL_TARGETS VERSION GENERIC_FLAGS +MAKE_ARGS_V = $(foreach v,${MAKE_VARS},$v='${$v}') -BUILD_STYLE = -OBJ_DIR = ${OBJROOT}/${BUILD_STYLE} +build-${PROJECT}: target = ${TARGET} +install-${PROJECT}: target = ${INSTALL_TARGET} +clean-${PROJECT} distclean-${PROJECT} test-${PROJECT}: \ + target = $* -${PROJECT}: override INSTALL_ROOT = ${OBJ_DIR}/ +DO_MAKE = +${MAKE} -C ${OBJ_DIR} ${target} ${MAKE_ARGS_V} ${MAKE_ARGS} ${EXTRA_MAKE_ARGS} -MAKE_VARS := INSTALL_ROOT TCL_PACKAGE_PATH TCL_MODULE_PATH DYLIB_INSTALL_DIR -MAKE_ARGS_V = $(foreach v,${MAKE_VARS},$v=${$v}) -export CPPROG := cp -p +${PROJECT}: override INSTALL_ROOT := ${OBJ_DIR}/ #------------------------------------------------------------------------------------------------------- # build rules @@ -126,109 +126,65 @@ ${PROJECT}: install-${PROJECT} ${OBJ_DIR}/Makefile: ${UNIX_DIR}/Makefile.in ${UNIX_DIR}/configure mkdir -p ${OBJ_DIR} && cd ${OBJ_DIR} && ${UNIX_DIR}/configure -C \ --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} \ - --includedir=${INCLUDEDIR} --mandir=${MANDIR} --enable-threads \ - --enable-framework ${CONFIGURE_ARGS} ${EXTRA_CONFIGURE_ARGS} - cd ${OBJ_DIR} && mkdir -p ${PRODUCT_NAME}.framework && \ - ln -fs ../${PRODUCT_NAME} ${PRODUCT_NAME}.framework/${PRODUCT_NAME} + --mandir=${MANDIR} --enable-threads --enable-framework \ + ${CONFIGURE_ARGS} ${EXTRA_CONFIGURE_ARGS} build-${PROJECT}: ${OBJ_DIR}/Makefile - ${MAKE} -C ${OBJ_DIR} ${TARGETS} ${MAKE_ARGS_V} ${MAKE_ARGS} ${EXTRA_MAKE_ARGS} +ifeq (${EMBEDDED_BUILD}_${INSTALL_ROOT},1_) + @echo "Cannot install-embedded with empty INSTALL_ROOT !" && false +else + @rm -rf "${INSTALL_ROOT}/${LIBDIR}/Tcl.framework" +endif + ${DO_MAKE} # symolic link hackery to trick # 'make install INSTALL_ROOT=${OBJ_DIR}' # into building Tcl.framework and tclsh in ${SYMROOT} - cd ${OBJ_DIR}; mkdir -p $(dir ./${INSTALL_PATH}) $(dir ./${BINDIR}) ${SYMROOT}; \ - rm -f ./${INSTALL_PATH}; ln -fs ${SYMROOT} ./${INSTALL_PATH}; \ - rm -f ./${BINDIR}; ln -fs ${SYMROOT} ./${BINDIR}; \ - ln -fs ${OBJ_DIR}/tcltest ${SYMROOT} - -clean-${PROJECT}: - ${MAKE} -C ${OBJ_DIR} clean ${EXTRA_MAKE_ARGS} - -distclean-${PROJECT}: - ${MAKE} -C ${OBJ_DIR} distclean ${EXTRA_MAKE_ARGS} - rm -rf ${OBJ_DIR} ${PRODUCT_NAME}.framework tclsh${PRODUCT_VERSION} tcltest - -test-${PROJECT}: build-${PROJECT} - ${MAKE} -C ${OBJ_DIR} test ${EXTRA_MAKE_ARGS} + @cd ${OBJ_DIR} && mkdir -p $(dir ./${LIBDIR}) $(dir ./${BINDIR}) ${SYMROOT} && \ + rm -f ./${LIBDIR} ./${BINDIR} && ln -fs ${SYMROOT} ./${LIBDIR} && \ + ln -fs ${SYMROOT} ./${BINDIR} && ln -fs ${OBJ_DIR}/tcltest ${SYMROOT} install-${PROJECT}: build-${PROJECT} -# install to ${INSTALL_ROOT} with optional stripping - ${MAKE} -C ${OBJ_DIR} install-binaries install-libraries install-private-headers \ - SCRIPT_INSTALL_DIR=${INSTALL_ROOT}${SCRIPTDIR} \ - PRIVATE_INCLUDE_INSTALL_DIR=${INSTALL_ROOT}${PRIVATEINCLUDEDIR} \ - ${MAKE_ARGS_V} ${MAKE_ARGS} ${EXTRA_MAKE_ARGS} -ifeq (${BUILD_STYLE},Development) -# keep copy of debug library around, so that -# Deployment build can be installed on top -# of Development build without overwriting -# the debug library - cd ${INSTALL_ROOT}${LIBDIR} && ln -f "${PRODUCT_NAME}" "${PRODUCT_NAME}_debug" -endif -# fixup Framework structure - cd ${INSTALL_ROOT}${LIBDIR}/.. && \ - rm -f Current && ln -fs ${PRODUCT_VERSION} Current && \ - cd .. && ln -fs Versions/Current/* . && \ - ln -fs Versions/${PRODUCT_VERSION}/lib*stub* . + ${DO_MAKE} ifeq (${INSTALL_BUILD},1) ifeq (${EMBEDDED_BUILD},1) # if we are embedding frameworks, don't install tclsh - rm -f "${INSTALL_ROOT}${BINDIR}/${TCLSH}" - -rmdir -p "${INSTALL_ROOT}${BINDIR}" 2>&- + @rm -f "${INSTALL_ROOT}${BINDIR}/${TCLSH}" && \ + rmdir -p "${INSTALL_ROOT}${BINDIR}" 2>&- || true else # redo prebinding - cd ${INSTALL_ROOT}/; \ - if [ ! -d usr/lib ]; then mkdir -p usr; ln -fs /usr/lib usr/; RM_USRLIB=1; fi; \ - if [ ! -d System ]; then ln -fs /System .; RM_SYSTEM=1; fi; \ + @cd ${INSTALL_ROOT}/ && \ + if [ ! -d usr/lib ]; then mkdir -p usr && ln -fs /usr/lib usr/ && RM_USRLIB=1; fi; \ + if [ ! -d System ]; then ln -fs /System . && RM_SYSTEM=1; fi; \ + redo_prebinding -r . "./${LIBDIR}/${PRODUCT_NAME}.framework/Versions/${VERSION}/${PRODUCT_NAME}"; \ redo_prebinding -r . "./${BINDIR}/${TCLSH}"; \ if [ -n "$${RM_USRLIB:-}" ]; then rm -f usr/lib; rmdir -p usr 2>&-; fi; \ if [ -n "$${RM_SYSTEM:-}" ]; then rm -f System; fi # install tclsh symbolic link - ln -fs ${TCLSH} ${INSTALL_ROOT}${BINDIR}/tclsh -ifeq (${BUILD_STYLE},Deployment) -ifneq (${INSTALL_MANPAGES},) -# install manpages - ${MAKE} -C ${OBJ_DIR} install-doc ${MAKE_ARGS_V} ${MAKE_ARGS} ${EXTRA_MAKE_ARGS} -endif -# build html documentation - export DYLD_FRAMEWORK_PATH=${SYMROOT} && \ - ${MAKE} -C ${OBJ_DIR} html-tcl ${MAKE_ARGS_V} ${MAKE_ARGS} ${EXTRA_MAKE_ARGS} \ - DISTDIR=${INSTALL_ROOT}${DOCDIR} TCL_EXE=${TCL_EXE} && \ - cd ${INSTALL_ROOT}${DOCDIR} && ln -fs contents.htm html/${PRODUCT_NAME}TOC.html && \ - rm -fr "${PRODUCT_NAME}" && mv -f html "${PRODUCT_NAME}" + @ln -fs ${TCLSH} ${INSTALL_ROOT}${BINDIR}/tclsh endif endif +ifeq (${BUILD_STYLE}_${EMBEDDED_BUILD},Development_) +# keep copy of debug library around, so that +# Deployment build can be installed on top +# of Development build without overwriting +# the debug library + @cd ${INSTALL_ROOT}${LIBDIR}/${PRODUCT_NAME}.framework/Versions/${VERSION} && \ + ln -f "${PRODUCT_NAME}" "${PRODUCT_NAME}_debug" endif -# write Info.plist file - @printf > ${INSTALL_ROOT}${INFOPLIST} '\ - <?xml version="1.0" encoding="UTF-8"?>\n\ - <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"\ - "http://www.apple.com/DTDs/PropertyList-1.0.dtd">\n\ - <plist version="1.0">\n\ - <dict>\n\ - <key>CFBundleDevelopmentRegion</key>\n\ - <string>English</string>\n\ - <key>CFBundleExecutable</key>\n\ - <string>Tcl</string>\n\ - <key>CFBundleGetInfoString</key>\n\ - <string>Tcl Library ${PRODUCT_VERSION}, Copyright © ${YEAR} Tcl Core Team.\n\ - MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright\ - © 2001-2002, Apple Computer, Inc.</string>\n\ - <key>CFBundleIdentifier</key>\n\ - <string>com.tcltk.tcllibrary</string>\n\ - <key>CFBundleInfoDictionaryVersion</key>\n\ - <string>6.0</string>\n\ - <key>CFBundleName</key>\n\ - <string>Tcl Library ${PRODUCT_VERSION}</string>\n\ - <key>CFBundlePackageType</key>\n\ - <string>FMWK</string>\n\ - <key>CFBundleShortVersionString</key>\n\ - <string>${PRODUCT_LONGVERSION}</string>\n\ - <key>CFBundleSignature</key>\n\ - <string>Tcl </string>\n\ - <key>CFBundleVersion</key>\n\ - <string>${PRODUCT_LONGVERSION}</string>\n\ - </dict>\n\ - </plist>\n' + +clean-${PROJECT}: %-${PROJECT}: + ${DO_MAKE} + rm -rf ${SYMROOT}/{${PRODUCT_NAME}.framework,${TCLSH},tcltest} + rm -f ${OBJ_DIR}{${LIBDIR},${BINDIR}} && \ + rmdir -p ${OBJ_DIR}$(dir ${LIBDIR}) 2>&- || true && \ + rmdir -p ${OBJ_DIR}$(dir ${BINDIR}) 2>&- || true + +distclean-${PROJECT}: %-${PROJECT}: clean-${PROJECT} + ${DO_MAKE} + rm -rf ${OBJ_DIR} + +test-${PROJECT}: %-${PROJECT}: build-${PROJECT} + ${DO_MAKE} #------------------------------------------------------------------------------------------------------- diff --git a/macosx/README b/macosx/README index 18a0968..17554ac 100644 --- a/macosx/README +++ b/macosx/README @@ -1,7 +1,7 @@ Tcl MacOSX README ----------------- -RCS: @(#) $Id: README,v 1.4 2005/05/10 18:34:56 kennykb Exp $ +RCS: @(#) $Id: README,v 1.5 2005/05/23 20:21:02 das Exp $ This is the README file for the Mac OS X native version of Tcl (framework build). @@ -77,8 +77,12 @@ that came with OSX preinstalled. It can also be downloaded from http://connect.apple.com (after you register for free ADC membership). - Tcl is built as a Mac OS X framework via the Makefile in tcl/macosx, but can -also be built from Apple's ProjectBuilder IDE using the Tcl.pbproj project (which -calls through to the Makefile). +but can also be built directly with the standard unix configure and make +buildsystem in tcl/unix. + +- It is still possible to build with Apple's Xcode IDE using the Tcl.pbproj +project but this is not recommended anymore (currently Tcl.pbproj calls through +to the tcl/macosx/Makefile so there should be no build differences). - Unpack the tcl source release archive. @@ -94,9 +98,7 @@ set ${ver} to the empty string instead: set ver="" ;: if your shell is csh ver="" ;: if your shell is sh -- If you're only interested in _building_ Tcl.framework and don't plan on doing -development with the ProjectBuilder projects, using the Makefile is easiest. -The following steps will build Tcl from the Terminal, assuming you are +- The following steps will build Tcl from the Terminal, assuming you are located in the directory containing the tcl source tree: make -C tcl${ver}/macosx and the following will then install Tcl onto the root volume (admin password diff --git a/macosx/Tcl-Info.plist.in b/macosx/Tcl-Info.plist.in new file mode 100644 index 0000000..b942956 --- /dev/null +++ b/macosx/Tcl-Info.plist.in @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleExecutable</key> + <string>@TCL_LIB_FILE@</string> + <key>CFBundleGetInfoString</key> + <string>Tcl Library @TCL_VERSION@, Copyright © @TCL_YEAR@ Tcl Core Team. +Initial MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright © 2001-2002, Apple Computer, Inc.</string> + <key>CFBundleIdentifier</key> + <string>com.tcltk.tcllibrary</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>Tcl Library @TCL_VERSION@</string> + <key>CFBundlePackageType</key> + <string>FMWK</string> + <key>CFBundleShortVersionString</key> + <string>@TCL_VERSION@@TCL_PATCH_LEVEL@</string> + <key>CFBundleSignature</key> + <string>Tcl </string> + <key>CFBundleVersion</key> + <string>@TCL_VERSION@@TCL_PATCH_LEVEL@</string> +</dict> +</plist> diff --git a/unix/Makefile.in b/unix/Makefile.in index 7245368..7e0cbac 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -5,7 +5,7 @@ # "autoconf" program (constructs like "@foo@" will get replaced in the # actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.167 2005/05/14 20:46:46 das Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.168 2005/05/23 20:20:53 das Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -38,10 +38,10 @@ mandir = @mandir@ # to be different than those used for actually reference files at # run-time. INSTALL_ROOT is prepended to $prefix and $exec_prefix # when installing files. -INSTALL_ROOT = +INSTALL_ROOT = $(DESTDIR) # Path for the platform independent Tcl scripting libraries: -TCL_LIBRARY = $(prefix)/lib/tcl$(VERSION) +TCL_LIBRARY = @TCL_LIBRARY@ # Path to use at runtime to refer to LIB_INSTALL_DIR: LIB_RUNTIME_DIR = $(libdir) @@ -58,8 +58,11 @@ SCRIPT_INSTALL_DIR = $(INSTALL_ROOT)$(TCL_LIBRARY) # Directory in which to install the include file tcl.h: INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(includedir) +# Path to the private tcl header dir: +PRIVATE_INCLUDE_DIR = @PRIVATE_INCLUDE_DIR@ + # Directory in which to (optionally) install the private tcl headers: -PRIVATE_INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(includedir) +PRIVATE_INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(PRIVATE_INCLUDE_DIR) # Top-level directory in which to install manual entries: MAN_INSTALL_DIR = $(INSTALL_ROOT)$(mandir) @@ -75,11 +78,17 @@ MAN3_INSTALL_DIR = $(MAN_INSTALL_DIR)/man3 # Tcl commands: MANN_INSTALL_DIR = $(MAN_INSTALL_DIR)/mann +# Path to the html documentation dir: +HTML_DIR = @HTML_DIR@ + +# Directory in which to install html documentation: +HTML_INSTALL_DIR = $(INSTALL_ROOT)$(HTML_DIR) + # Package search path. TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ # Tcl Module default path roots (TIP189). -TCL_MODULE_PATH = +TCL_MODULE_PATH = @TCL_MODULE_PATH@ # warning flags CFLAGS_WARNING = @CFLAGS_WARNING@ @@ -157,7 +166,7 @@ SHELL = /bin/sh # with the distribution, which is slower but guaranteed to work. INSTALL_STRIP_PROGRAM = -s -INSTALL_STRIP_LIBRARY = -S -S +INSTALL_STRIP_LIBRARY = -S -S INSTALL = @srcdir@/install-sh -c INSTALL_PROGRAM = ${INSTALL} @@ -268,16 +277,16 @@ DDD = ddd CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \ -I${BUILD_DIR} -I${UNIX_DIR} -I${GENERIC_DIR} -DTCL_TOMMATH -I${TOMMATH_DIR} \ ${AC_FLAGS} ${GENERIC_FLAGS} ${PROTO_FLAGS} \ -${NO_DEPRECATED_FLAGS} ${ENV_FLAGS} +${NO_DEPRECATED_FLAGS} ${ENV_FLAGS} @EXTRA_CC_SWITCHES@ STUB_CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \ -I${BUILD_DIR} -I${UNIX_DIR} -I${GENERIC_DIR} -DTCL_TOMMATH -I${TOMMATH_DIR} \ -${AC_FLAGS} ${GENERIC_FLAGS} ${PROTO_FLAGS} ${ENV_FLAGS} +${AC_FLAGS} ${GENERIC_FLAGS} ${PROTO_FLAGS} ${ENV_FLAGS} @EXTRA_CC_SWITCHES@ LIBS = @TCL_LIBS@ DEPEND_SWITCHES = ${CFLAGS} -I${UNIX_DIR} -I${GENERIC_DIR} \ -${AC_FLAGS} ${GENERIC_FLAGS} ${PROTO_FLAGS} +${AC_FLAGS} ${GENERIC_FLAGS} ${PROTO_FLAGS} @EXTRA_CC_SWITCHES@ TCLSH_OBJS = tclAppInit.o @@ -569,46 +578,46 @@ tcltest-real: # % make test TESTFLAGS="-verbose bps -file fileName.test" test: tcltest - @LD_LIBRARY_PATH_VAR@=`pwd`:${@LD_LIBRARY_PATH_VAR@}; export @LD_LIBRARY_PATH_VAR@; \ + @LD_LIBRARY_PATH_VAR@=`pwd`:$${@LD_LIBRARY_PATH_VAR@}; export @LD_LIBRARY_PATH_VAR@; \ TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \ ./tcltest $(TOP_DIR)/tests/all.tcl $(TESTFLAGS) $(TCLTESTARGS) # Useful target to launch a built tcltest with the proper path,... runtest: tcltest - @LD_LIBRARY_PATH_VAR@=`pwd`:${@LD_LIBRARY_PATH_VAR@}; export @LD_LIBRARY_PATH_VAR@; \ + @LD_LIBRARY_PATH_VAR@=`pwd`:$${@LD_LIBRARY_PATH_VAR@}; export @LD_LIBRARY_PATH_VAR@; \ TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \ ./tcltest # Useful target for running the test suite with an unwritable current # directory... ro-test: tcltest - @LD_LIBRARY_PATH_VAR@=`pwd`:${@LD_LIBRARY_PATH_VAR@}; export @LD_LIBRARY_PATH_VAR@; \ + @LD_LIBRARY_PATH_VAR@=`pwd`:$${@LD_LIBRARY_PATH_VAR@}; export @LD_LIBRARY_PATH_VAR@; \ TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \ echo 'exec chmod -w .;package require tcltest;tcltest::temporaryDirectory /tmp;source ../tests/all.tcl;exec chmod +w .' | ./tcltest # This target can be used to run tclsh from the build directory # via `make shell SCRIPT=/tmp/foo.tcl` shell: tclsh - @LD_LIBRARY_PATH_VAR@=`pwd`:${@LD_LIBRARY_PATH_VAR@}; export @LD_LIBRARY_PATH_VAR@; \ + @LD_LIBRARY_PATH_VAR@=`pwd`:$${@LD_LIBRARY_PATH_VAR@}; export @LD_LIBRARY_PATH_VAR@; \ TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \ ./tclsh $(SCRIPT) # This target can be used to run tclsh inside either gdb or insight gdb: tclsh - @echo "set env @LD_LIBRARY_PATH_VAR@=`pwd`:${@LD_LIBRARY_PATH_VAR@}" > gdb.run + @echo "set env @LD_LIBRARY_PATH_VAR@=`pwd`:$${@LD_LIBRARY_PATH_VAR@}" > gdb.run @echo "set env TCL_LIBRARY=${TCL_BUILDTIME_LIBRARY}" >> gdb.run $(GDB) ./tclsh --command=gdb.run rm gdb.run # This target can be used to run tclsh inside ddd ddd: tclsh - @echo "set env @LD_LIBRARY_PATH_VAR@=`pwd`:${@LD_LIBRARY_PATH_VAR@}" > gdb.run + @echo "set env @LD_LIBRARY_PATH_VAR@=`pwd`:$${@LD_LIBRARY_PATH_VAR@}" > gdb.run @echo "set env TCL_LIBRARY=${TCL_BUILDTIME_LIBRARY}" >> gdb.run $(DDD) -command=gdb.run ./tclsh rm gdb.run valgrind: tclsh tcltest - @LD_LIBRARY_PATH_VAR@=`pwd`:${@LD_LIBRARY_PATH_VAR@}; export @LD_LIBRARY_PATH_VAR@; \ + @LD_LIBRARY_PATH_VAR@=`pwd`:$${@LD_LIBRARY_PATH_VAR@}; export @LD_LIBRARY_PATH_VAR@; \ TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \ valgrind --num-callers=8 --leak-resolution=high -v --leak-check=yes --show-reachable=yes $(VALGRINDARGS) ./tcltest $(TOP_DIR)/tests/all.tcl -singleproc 1 $(TESTFLAGS) $(TCLTESTARGS) @@ -663,10 +672,12 @@ gentommath_h: dltest.marker: cd dltest ; $(MAKE) -install: install-binaries install-libraries install-doc +INSTALL_TARGETS = install-binaries install-libraries install-doc @EXTRA_INSTALL@ + +install: $(INSTALL_TARGETS) install-strip: - $(MAKE) install \ + $(MAKE) $(INSTALL_TARGETS) \ INSTALL_PROGRAM="$(INSTALL_PROGRAM) ${INSTALL_STRIP_PROGRAM}" \ INSTALL_LIBRARY="$(INSTALL_LIBRARY) ${INSTALL_STRIP_LIBRARY}" @@ -703,6 +714,7 @@ install-binaries: binaries echo "Installing $(STUB_LIB_FILE) to $(LIB_INSTALL_DIR)/"; \ @INSTALL_STUB_LIB@ ; \ fi + @EXTRA_INSTALL_BINARIES@ install-libraries: libraries install-tzdata install-msgs @for i in $(INCLUDE_INSTALL_DIR) $(SCRIPT_INSTALL_DIR); \ @@ -765,14 +777,14 @@ install-libraries: libraries install-tzdata install-msgs install-tzdata: @echo "Installing time zone data" - @@LD_LIBRARY_PATH_VAR@=`pwd`:${@LD_LIBRARY_PATH_VAR@}; export @LD_LIBRARY_PATH_VAR@; \ + @@LD_LIBRARY_PATH_VAR@=`pwd`:$${@LD_LIBRARY_PATH_VAR@}; export @LD_LIBRARY_PATH_VAR@; \ TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \ ./tclsh $(TOOL_DIR)/installData.tcl \ $(TOP_DIR)/library/tzdata $(SCRIPT_INSTALL_DIR)/tzdata install-msgs: @echo "Installing message catalogs" - @@LD_LIBRARY_PATH_VAR@=`pwd`:${@LD_LIBRARY_PATH_VAR@}; export @LD_LIBRARY_PATH_VAR@; \ + @@LD_LIBRARY_PATH_VAR@=`pwd`:$${@LD_LIBRARY_PATH_VAR@}; export @LD_LIBRARY_PATH_VAR@; \ TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \ ./tclsh $(TOOL_DIR)/installData.tcl \ $(TOP_DIR)/library/msgs $(SCRIPT_INSTALL_DIR)/msgs @@ -837,12 +849,12 @@ Makefile: $(UNIX_DIR)/Makefile.in $(DLTEST_DIR)/Makefile.in clean: rm -f *.a *.o libtcl* core errs *~ \#* TAGS *.E a.out \ - errors tclsh tcltest lib.exp + errors tclsh tcltest lib.exp Tcl cd dltest ; $(MAKE) clean distclean: clean rm -rf Makefile config.status config.cache config.log tclConfig.sh \ - $(PACKAGE).* prototype #tclConfig.h + $(PACKAGE).* prototype tclConfig.h *.plist Tcl.framework cd dltest ; $(MAKE) distclean depend: @@ -1421,7 +1433,6 @@ waitpid.o: $(COMPAT_DIR)/waitpid.c # Stub library binaries, these must be compiled for use in a shared library # even though they will be placed in a static archive - tclStubLib.o: $(GENERIC_DIR)/tclStubLib.c $(CC) -c $(STUB_CC_SWITCHES) $(GENERIC_DIR)/tclStubLib.c @@ -1510,7 +1521,7 @@ rpm: all /bin/rpm # # Target to create a proper Tcl distribution from information in the # master source directory. DISTDIR must be defined to indicate where -# to put the distribution. +# to put the distribution. DISTDIR must be an absolute path name. # DISTROOT = /tmp/dist @@ -1598,7 +1609,7 @@ dist: $(UNIX_DIR)/configure $(UNIX_DIR)/tclConfig.h.in cp -p $(TOP_DIR)/license.terms $(DISTDIR)/win mkdir $(DISTDIR)/macosx cp -p $(TOP_DIR)/macosx/Makefile \ - $(TOP_DIR)/macosx/*.c \ + $(TOP_DIR)/macosx/*.c $(TOP_DIR)/macosx/*.in \ $(DISTDIR)/macosx mkdir $(DISTDIR)/macosx/Tcl.pbproj cp -p $(TOP_DIR)/macosx/Tcl.pbproj/*.pbx* $(DISTDIR)/macosx/Tcl.pbproj @@ -1654,13 +1665,18 @@ allpatch: dist html: $(BUILD_HTML) + @EXTRA_BUILD_HTML@ html-tcl: $(BUILD_HTML) --tcl + @EXTRA_BUILD_HTML@ html-tk: $(BUILD_HTML) --tk + @EXTRA_BUILD_HTML@ BUILD_HTML = \ - $(TCL_EXE) $(TOOL_DIR)/tcltk-man2html.tcl --htmldir=$(DISTDIR)/html \ + @@LD_LIBRARY_PATH_VAR@=`pwd`:$${@LD_LIBRARY_PATH_VAR@}; export @LD_LIBRARY_PATH_VAR@; \ + TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \ + ./tclsh $(TOOL_DIR)/tcltk-man2html.tcl --htmldir=$(HTML_INSTALL_DIR) \ --srcdir=$(TOP_DIR)/.. # diff --git a/unix/configure b/unix/configure index 95d4611..3f90777 100755 --- a/unix/configure +++ b/unix/configure @@ -308,7 +308,7 @@ ac_includes_default="\ # include <unistd.h> #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS RANLIB ac_ct_RANLIB AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_SRC_DIR CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX TCL_SHARED_BUILD LD_LIBRARY_PATH_VAR TCL_BUILD_LIB_SPEC TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_SHARED_LIB_SUFFIX TCL_UNSHARED_LIB_SUFFIX TCL_HAS_LONGLONG BUILD_DLTEST TCL_PACKAGE_PATH' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS RANLIB ac_ct_RANLIB AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_YEAR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_SRC_DIR CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX TCL_SHARED_BUILD LD_LIBRARY_PATH_VAR TCL_BUILD_LIB_SPEC TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_SHARED_LIB_SUFFIX TCL_UNSHARED_LIB_SUFFIX TCL_HAS_LONGLONG BUILD_DLTEST TCL_PACKAGE_PATH TCL_MODULE_PATH TCL_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR EXTRA_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML' ac_subst_files='' # Initialize some variables set by options. @@ -856,8 +856,8 @@ Optional Features: --enable-symbols build with debugging symbols --disable-symbols --enable-langinfo use nl_langinfo if possible to determine encoding at startup, otherwise use old heuristic - --enable-framework package shared libraries in MacOSX frameworks --disable-framework --enable-dll-unloading turn on the 'unload' command (default: on) + --enable-framework package shared libraries in MacOSX frameworks --disable-framework Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1340,8 +1340,6 @@ fi if test "${exec_prefix}" = "NONE"; then exec_prefix=$prefix fi -# libdir must be a fully qualified path and (not ${exec_prefix}/lib) -eval libdir="$libdir" TCL_SRC_DIR=`cd $srcdir/..; pwd` #------------------------------------------------------------------------ @@ -7917,8 +7915,6 @@ echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6 LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH" PLAT_OBJS='${MAC_OSX_OBJS}' PLAT_SRCS='${MAC_OSX_SRCS}' - TCL_SHLIB_LD_EXTRAS='-compatibility_version ${VERSION} -current_version ${VERSION} -install_name ${DYLIB_INSTALL_DIR}/${TCL_LIB_FILE} -seg1addr 0xa000000' - TK_SHLIB_LD_EXTRAS=' -compatibility_version ${VERSION} -current_version ${VERSION} -install_name ${DYLIB_INSTALL_DIR}/${TK_LIB_FILE} -seg1addr 0xb000000 -unexported_symbols_list $$(f=$(TCL_STUB_LIB_FILE).E && nm -gjp $(TCL_BIN_DIR)/$(TCL_STUB_LIB_FILE) | tail +3 > $$f && echo $$f)' echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5 echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6 # Check whether --enable-corefoundation or --disable-corefoundation was given. @@ -8270,6 +8266,11 @@ cat >>confdefs.h <<\_ACEOF #define MODULE_SCOPE __private_extern__ _ACEOF + +cat >>confdefs.h <<\_ACEOF +#define TCL_LOAD_FROM_MEMORY 1 +_ACEOF + # prior to Darwin 7, realpath is not threadsafe, so don't # use it when threads are enabled, c.f. bug # 711232: echo "$as_me:$LINENO: checking for realpath" >&5 @@ -15292,6 +15293,23 @@ echo "${ECHO_T}O_NONBLOCK" >&6 esac +#------------------------------------------------------------------------ + +# Check whether --enable-dll-unloading or --disable-dll-unloading was given. +if test "${enable_dll_unloading+set}" = set; then + enableval="$enable_dll_unloading" + tcl_ok=$enableval +else + tcl_ok=yes +fi; +if test $tcl_ok = yes; then + +cat >>confdefs.h <<\_ACEOF +#define TCL_UNLOAD_DLLS 1 +_ACEOF + +fi + #-------------------------------------------------------------------- # The statements below define a collection of symbols related to # building libtcl as a shared library instead of a static library. @@ -15301,6 +15319,22 @@ TCL_UNSHARED_LIB_SUFFIX=${UNSHARED_LIB_SUFFIX} TCL_SHARED_LIB_SUFFIX=${SHARED_LIB_SUFFIX} eval "TCL_LIB_FILE=libtcl${LIB_SUFFIX}" +# tclConfig.sh needs a version of the _LIB_SUFFIX that has been eval'ed +# since on some platforms TCL_LIB_FILE contains shell escapes. +# (See also: TCL_TRIM_DOTS). + +eval "TCL_LIB_FILE=${TCL_LIB_FILE}" + +TCL_LIBRARY='$(prefix)/lib/tcl$(VERSION)' +PRIVATE_INCLUDE_DIR='$(includedir)' +HTML_DIR='$(DISTDIR)/html' + +# Note: in the following variable, it's important to use the absolute +# path name of the Tcl directory rather than "..": this is because +# AIX remembers this path and will attempt to use it at run-time to look +# up the Tcl library. + +if test "`uname -s`" = "Darwin" ; then echo "$as_me:$LINENO: checking how to package libraries" >&5 echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6 @@ -15339,45 +15373,68 @@ echo "${ECHO_T}standard shared library" >&6 FRAMEWORK_BUILD=0 fi - -# tclConfig.sh needs a version of the _LIB_SUFFIX that has been eval'ed -# since on some platforms TCL_LIB_FILE contains shell escapes. -# (See also: TCL_TRIM_DOTS). - -eval "TCL_LIB_FILE=${TCL_LIB_FILE}" - -# Note: in the following variable, it's important to use the absolute -# path name of the Tcl directory rather than "..": this is because -# AIX remembers this path and will attempt to use it at run-time to look -# up the Tcl library. + TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_VERSION} -current_version ${TCL_VERSION}`echo ${TCL_PATCH_LEVEL} | awk '{match($0, "\\\.[0-9]+"); print substr($0,RSTART,RLENGTH)}'`" + TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -install_name ${DYLIB_INSTALL_DIR}/${TCL_LIB_FILE} -seg1addr 0xa000000' +fi if test "$FRAMEWORK_BUILD" = "1" ; then - TCL_BUILD_LIB_SPEC="-F`pwd` -framework Tcl" - TCL_LIB_SPEC="-framework Tcl" - TCL_LIB_FILE="Tcl" cat >>confdefs.h <<\_ACEOF #define TCL_FRAMEWORK 1 _ACEOF -elif test "$SHARED_BUILD" = "0" || test "$TCL_NEEDS_EXP_FILE" = "0"; then - if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then - TCL_LIB_FLAG="-ltcl${TCL_VERSION}" - else - TCL_LIB_FLAG="-ltcl`echo ${TCL_VERSION} | tr -d .`" - fi - TCL_BUILD_LIB_SPEC="-L`pwd` ${TCL_LIB_FLAG}" - TCL_LIB_SPEC="-L${libdir} ${TCL_LIB_FLAG}" -else - TCL_BUILD_EXP_FILE="lib.exp" - eval "TCL_EXP_FILE=libtcl${TCL_EXPORT_FILE_SUFFIX}" + ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in" - if test "$GCC" = "yes" ; then - TCL_BUILD_LIB_SPEC="-Wl,-bI:`pwd`/${TCL_BUILD_EXP_FILE} -L`pwd`" - TCL_LIB_SPEC="-Wl,-bI:${libdir}/${TCL_EXP_FILE} -L`pwd`" + # Construct a fake local framework structure to make linking with + # '-framework Tcl' and running of tcltest work + ac_config_commands="$ac_config_commands Tcl.framework" + + LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH" + if test "${libdir}" = '${exec_prefix}/lib'; then + # override libdir default + libdir="/Library/Frameworks" + fi + TCL_LIB_FILE="Tcl" + TCL_LIB_FLAG="-framework Tcl" + TCL_BUILD_LIB_SPEC="-F`pwd` -framework Tcl" + TCL_LIB_SPEC="-F${libdir} -framework Tcl" + libdir="${libdir}/Tcl.framework/Versions/\${VERSION}" + TCL_LIBRARY="${libdir}/Resources/Scripts" + includedir="${libdir}/Headers" + PRIVATE_INCLUDE_DIR="${libdir}/PrivateHeaders" + HTML_DIR="${libdir}/Resources/Documentation/Reference/Tcl" + EXTRA_INSTALL="install-private-headers html-tcl" + EXTRA_BUILD_HTML='@ln -fs contents.htm $(HTML_INSTALL_DIR)/TclTOC.html' + EXTRA_INSTALL_BINARIES='@echo "Installing Info.plist to $(LIB_INSTALL_DIR)/Resources" && mkdir -p "$(LIB_INSTALL_DIR)/Resources" && $(INSTALL_DATA) "Tcl-Info.plist $(LIB_INSTALL_DIR)/Resources/Info.plist"' + EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Finalizing Tcl.framework" && rm -f "$(LIB_INSTALL_DIR)/../Current" && ln -s "$(VERSION)" "$(LIB_INSTALL_DIR)/../Current" && for f in "$(LIB_FILE)" "$(STUB_LIB_FILE)" tclConfig.sh Resources Headers PrivateHeaders; do rm -f "$(LIB_INSTALL_DIR)/../../$$f" && ln -s "Versions/Current/$$f" "$(LIB_INSTALL_DIR)/../.."; done' + TCL_YEAR="`date +%Y`" + # Don't use AC_DEFINE for the following as the framework version define + # needs to go into the Makefile even when using autoheader, so that we + # can pick up a potential make override of VERSION. Also, don't put this + # into CFLAGS as it should not go into tclConfig.sh + EXTRA_CC_SWITCHES='-DTCL_FRAMEWORK_VERSION=\"$(VERSION)\"' +else + # libdir must be a fully qualified path and not ${exec_prefix}/lib + eval libdir="$libdir" + if test "$SHARED_BUILD" = "0" || test "$TCL_NEEDS_EXP_FILE" = "0"; then + if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then + TCL_LIB_FLAG="-ltcl${TCL_VERSION}" + else + TCL_LIB_FLAG="-ltcl`echo ${TCL_VERSION} | tr -d .`" + fi + TCL_BUILD_LIB_SPEC="-L`pwd` ${TCL_LIB_FLAG}" + TCL_LIB_SPEC="-L${libdir} ${TCL_LIB_FLAG}" else - TCL_BUILD_LIB_SPEC="-bI:`pwd`/${TCL_BUILD_EXP_FILE}" - TCL_LIB_SPEC="-bI:${libdir}/${TCL_EXP_FILE}" + TCL_BUILD_EXP_FILE="lib.exp" + eval "TCL_EXP_FILE=libtcl${TCL_EXPORT_FILE_SUFFIX}" + + if test "$GCC" = "yes" ; then + TCL_BUILD_LIB_SPEC="-Wl,-bI:`pwd`/${TCL_BUILD_EXP_FILE} -L`pwd`" + TCL_LIB_SPEC="-Wl,-bI:${libdir}/${TCL_EXP_FILE} -L`pwd`" + else + TCL_BUILD_LIB_SPEC="-bI:`pwd`/${TCL_BUILD_EXP_FILE}" + TCL_LIB_SPEC="-bI:${libdir}/${TCL_EXP_FILE}" + fi fi fi VERSION='${VERSION}' @@ -15394,7 +15451,8 @@ VERSION=${TCL_VERSION} #-------------------------------------------------------------------- if test "$FRAMEWORK_BUILD" = "1" ; then - TCL_PACKAGE_PATH="${libdir}/Resources/Scripts" + TCL_PACKAGE_PATH="~/Library/Tcl /Library/Tcl /Network/Library/Tcl /System/Library/Tcl ~/Library/Frameworks /Library/Frameworks /Network/Library/Frameworks /System/Library/Frameworks" + TCL_MODULE_PATH="~/Library/Tcl /Library/Tcl /Network/Library/Tcl /System/Library/Tcl" elif test "$prefix/lib" != "$libdir"; then TCL_PACKAGE_PATH="${libdir} ${prefix}/lib" else @@ -15411,6 +15469,7 @@ fi # eval "TCL_STUB_LIB_FILE=libtclstub${TCL_UNSHARED_LIB_SUFFIX}" eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" +eval "TCL_STUB_LIB_DIR=${libdir}" if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then TCL_STUB_LIB_FLAG="-ltclstub${TCL_VERSION}" @@ -15419,35 +15478,29 @@ else fi TCL_BUILD_STUB_LIB_SPEC="-L`pwd` ${TCL_STUB_LIB_FLAG}" -TCL_STUB_LIB_SPEC="-L${libdir} ${TCL_STUB_LIB_FLAG}" +TCL_STUB_LIB_SPEC="-L${TCL_STUB_LIB_DIR} ${TCL_STUB_LIB_FLAG}" TCL_BUILD_STUB_LIB_PATH="`pwd`/${TCL_STUB_LIB_FILE}" -TCL_STUB_LIB_PATH="${libdir}/${TCL_STUB_LIB_FILE}" +TCL_STUB_LIB_PATH="${TCL_STUB_LIB_DIR}/${TCL_STUB_LIB_FILE}" # Install time header dir can be set via --includedir eval "TCL_INCLUDE_SPEC=\"-I${includedir}\"" #------------------------------------------------------------------------ +# tclConfig.sh refers to this by a different name +#------------------------------------------------------------------------ + +TCL_SHARED_BUILD=${SHARED_BUILD} + + + + + + -# Check whether --enable-dll-unloading or --disable-dll-unloading was given. -if test "${enable_dll_unloading+set}" = set; then - enableval="$enable_dll_unloading" - tcl_ok=$enableval -else - tcl_ok=yes -fi; -if test $tcl_ok = yes; then -cat >>confdefs.h <<\_ACEOF -#define TCL_UNLOAD_DLLS 1 -_ACEOF -fi -#------------------------------------------------------------------------ -# tclConfig.sh refers to this by a different name -#------------------------------------------------------------------------ -TCL_SHARED_BUILD=${SHARED_BUILD} @@ -15489,6 +15542,7 @@ TCL_SHARED_BUILD=${SHARED_BUILD} ac_config_files="$ac_config_files Makefile dltest/Makefile tclConfig.sh" + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -15918,6 +15972,9 @@ Usage: $0 [OPTIONS] [FILE]... Configuration files: $config_files +Configuration commands: +$config_commands + Report bugs to <bug-autoconf@gnu.org>." _ACEOF @@ -16016,7 +16073,14 @@ fi _ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +# +# INIT-COMMANDS section. +# + +VERSION=${TCL_VERSION} +_ACEOF @@ -16025,9 +16089,11 @@ for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. + "Tcl-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;; "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "dltest/Makefile" ) CONFIG_FILES="$CONFIG_FILES dltest/Makefile" ;; "tclConfig.sh" ) CONFIG_FILES="$CONFIG_FILES tclConfig.sh" ;; + "Tcl.framework" ) CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; @@ -16040,6 +16106,7 @@ done # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree @@ -16155,6 +16222,7 @@ s,@TCL_VERSION@,$TCL_VERSION,;t t s,@TCL_MAJOR_VERSION@,$TCL_MAJOR_VERSION,;t t s,@TCL_MINOR_VERSION@,$TCL_MINOR_VERSION,;t t s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t +s,@TCL_YEAR@,$TCL_YEAR,;t t s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t @@ -16181,6 +16249,14 @@ s,@TCL_UNSHARED_LIB_SUFFIX@,$TCL_UNSHARED_LIB_SUFFIX,;t t s,@TCL_HAS_LONGLONG@,$TCL_HAS_LONGLONG,;t t s,@BUILD_DLTEST@,$BUILD_DLTEST,;t t s,@TCL_PACKAGE_PATH@,$TCL_PACKAGE_PATH,;t t +s,@TCL_MODULE_PATH@,$TCL_MODULE_PATH,;t t +s,@TCL_LIBRARY@,$TCL_LIBRARY,;t t +s,@PRIVATE_INCLUDE_DIR@,$PRIVATE_INCLUDE_DIR,;t t +s,@HTML_DIR@,$HTML_DIR,;t t +s,@EXTRA_CC_SWITCHES@,$EXTRA_CC_SWITCHES,;t t +s,@EXTRA_INSTALL@,$EXTRA_INSTALL,;t t +s,@EXTRA_INSTALL_BINARIES@,$EXTRA_INSTALL_BINARIES,;t t +s,@EXTRA_BUILD_HTML@,$EXTRA_BUILD_HTML,;t t CEOF _ACEOF @@ -16414,6 +16490,130 @@ s,@abs_top_builddir@,$ac_abs_top_builddir,;t t done _ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + +# +# CONFIG_COMMANDS section. +# +for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue + ac_dest=`echo "$ac_file" | sed 's,:.*,,'` + ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_dir=`(dirname "$ac_dest") 2>/dev/null || +$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_dest" : 'X\(//\)[^/]' \| \ + X"$ac_dest" : 'X\(//\)$' \| \ + X"$ac_dest" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_dest" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + + { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 +echo "$as_me: executing $ac_dest commands" >&6;} + case $ac_dest in + Tcl.framework ) n=Tcl && + f=$n.framework && v=Versions/$VERSION && + rm -rf $f && mkdir -p $f/$v/Resources && + ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v && + ln -s ../../../../$n-Info.plist $f/$v/Resources/Info.plist && + unset n f v + ;; + esac +done +_ACEOF cat >>$CONFIG_STATUS <<\_ACEOF diff --git a/unix/configure.in b/unix/configure.in index 8c9a91c..633a04a 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 Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.129 2005/05/14 20:46:48 das Exp $ +# RCS: @(#) $Id: configure.in,v 1.130 2005/05/23 20:20:53 das Exp $ AC_INIT([tcl],[8.5]) AC_PREREQ(2.57) @@ -30,8 +30,6 @@ fi if test "${exec_prefix}" = "NONE"; then exec_prefix=$prefix fi -# libdir must be a fully qualified path and (not ${exec_prefix}/lib) -eval libdir="$libdir" TCL_SRC_DIR=`cd $srcdir/..; pwd` #------------------------------------------------------------------------ @@ -431,6 +429,15 @@ AC_CHECK_FUNCS(getattrlist) SC_BLOCKING_STYLE +#------------------------------------------------------------------------ + +AC_ARG_ENABLE(dll-unloading, + [ --enable-dll-unloading turn on the 'unload' command (default: on)], + [tcl_ok=$enableval], [tcl_ok=yes]) +if test $tcl_ok = yes; then + AC_DEFINE(TCL_UNLOAD_DLLS, 1, [Do we allow unloading of shared libraries?]) +fi + #-------------------------------------------------------------------- # The statements below define a collection of symbols related to # building libtcl as a shared library instead of a static library. @@ -440,42 +447,85 @@ TCL_UNSHARED_LIB_SUFFIX=${UNSHARED_LIB_SUFFIX} TCL_SHARED_LIB_SUFFIX=${SHARED_LIB_SUFFIX} eval "TCL_LIB_FILE=libtcl${LIB_SUFFIX}" -SC_ENABLE_FRAMEWORK - # tclConfig.sh needs a version of the _LIB_SUFFIX that has been eval'ed # since on some platforms TCL_LIB_FILE contains shell escapes. # (See also: TCL_TRIM_DOTS). eval "TCL_LIB_FILE=${TCL_LIB_FILE}" +TCL_LIBRARY='$(prefix)/lib/tcl$(VERSION)' +PRIVATE_INCLUDE_DIR='$(includedir)' +HTML_DIR='$(DISTDIR)/html' + # Note: in the following variable, it's important to use the absolute # path name of the Tcl directory rather than "..": this is because # AIX remembers this path and will attempt to use it at run-time to look # up the Tcl library. +if test "`uname -s`" = "Darwin" ; then + SC_ENABLE_FRAMEWORK + TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_VERSION} -current_version ${TCL_VERSION}`echo ${TCL_PATCH_LEVEL} | awk ['{match($0, "\\\.[0-9]+"); print substr($0,RSTART,RLENGTH)}']`" + TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -install_name ${DYLIB_INSTALL_DIR}/${TCL_LIB_FILE} -seg1addr 0xa000000' +fi + if test "$FRAMEWORK_BUILD" = "1" ; then - TCL_BUILD_LIB_SPEC="-F`pwd` -framework Tcl" - TCL_LIB_SPEC="-framework Tcl" - TCL_LIB_FILE="Tcl" AC_DEFINE(TCL_FRAMEWORK, 1, [Is Tcl built as a framework?]) -elif test "$SHARED_BUILD" = "0" || test "$TCL_NEEDS_EXP_FILE" = "0"; then - if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then - TCL_LIB_FLAG="-ltcl${TCL_VERSION}" - else - TCL_LIB_FLAG="-ltcl`echo ${TCL_VERSION} | tr -d .`" + AC_CONFIG_FILES([Tcl-Info.plist:../macosx/Tcl-Info.plist.in]) + # Construct a fake local framework structure to make linking with + # '-framework Tcl' and running of tcltest work + AC_CONFIG_COMMANDS([Tcl.framework], [n=Tcl && + f=$n.framework && v=Versions/$VERSION && + rm -rf $f && mkdir -p $f/$v/Resources && + ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v && + ln -s ../../../../$n-Info.plist $f/$v/Resources/Info.plist && + unset n f v + ], VERSION=${TCL_VERSION}) + LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH" + if test "${libdir}" = '${exec_prefix}/lib'; then + # override libdir default + libdir="/Library/Frameworks" fi - TCL_BUILD_LIB_SPEC="-L`pwd` ${TCL_LIB_FLAG}" - TCL_LIB_SPEC="-L${libdir} ${TCL_LIB_FLAG}" + TCL_LIB_FILE="Tcl" + TCL_LIB_FLAG="-framework Tcl" + TCL_BUILD_LIB_SPEC="-F`pwd` -framework Tcl" + TCL_LIB_SPEC="-F${libdir} -framework Tcl" + libdir="${libdir}/Tcl.framework/Versions/\${VERSION}" + TCL_LIBRARY="${libdir}/Resources/Scripts" + includedir="${libdir}/Headers" + PRIVATE_INCLUDE_DIR="${libdir}/PrivateHeaders" + HTML_DIR="${libdir}/Resources/Documentation/Reference/Tcl" + EXTRA_INSTALL="install-private-headers html-tcl" + EXTRA_BUILD_HTML='@ln -fs contents.htm $(HTML_INSTALL_DIR)/TclTOC.html' + EXTRA_INSTALL_BINARIES='@echo "Installing Info.plist to $(LIB_INSTALL_DIR)/Resources" && mkdir -p "$(LIB_INSTALL_DIR)/Resources" && $(INSTALL_DATA) "Tcl-Info.plist $(LIB_INSTALL_DIR)/Resources/Info.plist"' + EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Finalizing Tcl.framework" && rm -f "$(LIB_INSTALL_DIR)/../Current" && ln -s "$(VERSION)" "$(LIB_INSTALL_DIR)/../Current" && for f in "$(LIB_FILE)" "$(STUB_LIB_FILE)" tclConfig.sh Resources Headers PrivateHeaders; do rm -f "$(LIB_INSTALL_DIR)/../../$$f" && ln -s "Versions/Current/$$f" "$(LIB_INSTALL_DIR)/../.."; done' + TCL_YEAR="`date +%Y`" + # Don't use AC_DEFINE for the following as the framework version define + # needs to go into the Makefile even when using autoheader, so that we + # can pick up a potential make override of VERSION. Also, don't put this + # into CFLAGS as it should not go into tclConfig.sh + EXTRA_CC_SWITCHES='-DTCL_FRAMEWORK_VERSION=\"$(VERSION)\"' else - TCL_BUILD_EXP_FILE="lib.exp" - eval "TCL_EXP_FILE=libtcl${TCL_EXPORT_FILE_SUFFIX}" - - if test "$GCC" = "yes" ; then - TCL_BUILD_LIB_SPEC="-Wl,-bI:`pwd`/${TCL_BUILD_EXP_FILE} -L`pwd`" - TCL_LIB_SPEC="-Wl,-bI:${libdir}/${TCL_EXP_FILE} -L`pwd`" + # libdir must be a fully qualified path and not ${exec_prefix}/lib + eval libdir="$libdir" + if test "$SHARED_BUILD" = "0" || test "$TCL_NEEDS_EXP_FILE" = "0"; then + if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then + TCL_LIB_FLAG="-ltcl${TCL_VERSION}" + else + TCL_LIB_FLAG="-ltcl`echo ${TCL_VERSION} | tr -d .`" + fi + TCL_BUILD_LIB_SPEC="-L`pwd` ${TCL_LIB_FLAG}" + TCL_LIB_SPEC="-L${libdir} ${TCL_LIB_FLAG}" else - TCL_BUILD_LIB_SPEC="-bI:`pwd`/${TCL_BUILD_EXP_FILE}" - TCL_LIB_SPEC="-bI:${libdir}/${TCL_EXP_FILE}" + TCL_BUILD_EXP_FILE="lib.exp" + eval "TCL_EXP_FILE=libtcl${TCL_EXPORT_FILE_SUFFIX}" + + if test "$GCC" = "yes" ; then + TCL_BUILD_LIB_SPEC="-Wl,-bI:`pwd`/${TCL_BUILD_EXP_FILE} -L`pwd`" + TCL_LIB_SPEC="-Wl,-bI:${libdir}/${TCL_EXP_FILE} -L`pwd`" + else + TCL_BUILD_LIB_SPEC="-bI:`pwd`/${TCL_BUILD_EXP_FILE}" + TCL_LIB_SPEC="-bI:${libdir}/${TCL_EXP_FILE}" + fi fi fi VERSION='${VERSION}' @@ -492,7 +542,8 @@ VERSION=${TCL_VERSION} #-------------------------------------------------------------------- if test "$FRAMEWORK_BUILD" = "1" ; then - TCL_PACKAGE_PATH="${libdir}/Resources/Scripts" + TCL_PACKAGE_PATH="~/Library/Tcl /Library/Tcl /Network/Library/Tcl /System/Library/Tcl ~/Library/Frameworks /Library/Frameworks /Network/Library/Frameworks /System/Library/Frameworks" + TCL_MODULE_PATH="~/Library/Tcl /Library/Tcl /Network/Library/Tcl /System/Library/Tcl" elif test "$prefix/lib" != "$libdir"; then TCL_PACKAGE_PATH="${libdir} ${prefix}/lib" else @@ -509,6 +560,7 @@ fi # eval "TCL_STUB_LIB_FILE=libtclstub${TCL_UNSHARED_LIB_SUFFIX}" eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" +eval "TCL_STUB_LIB_DIR=${libdir}" if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then TCL_STUB_LIB_FLAG="-ltclstub${TCL_VERSION}" @@ -517,23 +569,14 @@ else fi TCL_BUILD_STUB_LIB_SPEC="-L`pwd` ${TCL_STUB_LIB_FLAG}" -TCL_STUB_LIB_SPEC="-L${libdir} ${TCL_STUB_LIB_FLAG}" +TCL_STUB_LIB_SPEC="-L${TCL_STUB_LIB_DIR} ${TCL_STUB_LIB_FLAG}" TCL_BUILD_STUB_LIB_PATH="`pwd`/${TCL_STUB_LIB_FILE}" -TCL_STUB_LIB_PATH="${libdir}/${TCL_STUB_LIB_FILE}" +TCL_STUB_LIB_PATH="${TCL_STUB_LIB_DIR}/${TCL_STUB_LIB_FILE}" # Install time header dir can be set via --includedir eval "TCL_INCLUDE_SPEC=\"-I${includedir}\"" #------------------------------------------------------------------------ - -AC_ARG_ENABLE(dll-unloading, - [ --enable-dll-unloading turn on the 'unload' command (default: on)], - [tcl_ok=$enableval], [tcl_ok=yes]) -if test $tcl_ok = yes; then - AC_DEFINE(TCL_UNLOAD_DLLS, 1, [Do we allow unloading of shared libraries?]) -fi - -#------------------------------------------------------------------------ # tclConfig.sh refers to this by a different name #------------------------------------------------------------------------ @@ -543,6 +586,7 @@ AC_SUBST(TCL_VERSION) AC_SUBST(TCL_MAJOR_VERSION) AC_SUBST(TCL_MINOR_VERSION) AC_SUBST(TCL_PATCH_LEVEL) +AC_SUBST(TCL_YEAR) AC_SUBST(TCL_LIB_FILE) AC_SUBST(TCL_LIB_FLAG) @@ -576,8 +620,19 @@ AC_SUBST(TCL_HAS_LONGLONG) AC_SUBST(BUILD_DLTEST) AC_SUBST(TCL_PACKAGE_PATH) +AC_SUBST(TCL_MODULE_PATH) + +AC_SUBST(TCL_LIBRARY) +AC_SUBST(PRIVATE_INCLUDE_DIR) +AC_SUBST(HTML_DIR) + +AC_SUBST(EXTRA_CC_SWITCHES) +AC_SUBST(EXTRA_INSTALL) +AC_SUBST(EXTRA_INSTALL_BINARIES) +AC_SUBST(EXTRA_BUILD_HTML) dnl Disable the automake-friendly normalization of LIBOBJS dnl performed by autoconf 2.53 and later. It's not correct for us. define([_AC_LIBOBJS_NORMALIZE],[]) -AC_OUTPUT([Makefile dltest/Makefile tclConfig.sh]) +AC_CONFIG_FILES([Makefile dltest/Makefile tclConfig.sh]) +AC_OUTPUT diff --git a/unix/tcl.m4 b/unix/tcl.m4 index fc4247f..ee19532 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1412,8 +1412,6 @@ dnl AC_CHECK_TOOL(AR, ar) LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH" PLAT_OBJS='${MAC_OSX_OBJS}' PLAT_SRCS='${MAC_OSX_SRCS}' - TCL_SHLIB_LD_EXTRAS='-compatibility_version ${VERSION} -current_version ${VERSION} -install_name ${DYLIB_INSTALL_DIR}/${TCL_LIB_FILE} -seg1addr 0xa000000' - TK_SHLIB_LD_EXTRAS=' -compatibility_version ${VERSION} -current_version ${VERSION} -install_name ${DYLIB_INSTALL_DIR}/${TK_LIB_FILE} -seg1addr 0xb000000 -unexported_symbols_list $$(f=$(TCL_STUB_LIB_FILE).E && nm -gjp $(TCL_BIN_DIR)/$(TCL_STUB_LIB_FILE) | tail +3 > $$f && echo $$f)' AC_MSG_CHECKING([whether to use CoreFoundation]) AC_ARG_ENABLE(corefoundation, [ --enable-corefoundation use CoreFoundation API [--enable-corefoundation]], [tcl_corefoundation=$enableval], [tcl_corefoundation=yes]) @@ -1439,6 +1437,7 @@ dnl AC_CHECK_TOOL(AR, ar) AC_DEFINE(TCL_DEFAULT_ENCODING,"utf-8", [Are we to override what our default encoding is?]) AC_DEFINE(MODULE_SCOPE, __private_extern__, [Linker support for module scope symbols]) + AC_DEFINE(TCL_LOAD_FROM_MEMORY, 1, [Can this platform load code from memory?]) # prior to Darwin 7, realpath is not threadsafe, so don't # use it when threads are enabled, c.f. bug # 711232: AC_CHECK_FUNC(realpath) diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c index ec708f2..5c833b4 100644 --- a/unix/tclUnixInit.c +++ b/unix/tclUnixInit.c @@ -7,7 +7,7 @@ * Copyright (c) 1999 by Scriptics Corporation. * All rights reserved. * - * RCS: @(#) $Id: tclUnixInit.c,v 1.57 2005/05/14 20:46:48 das Exp $ + * RCS: @(#) $Id: tclUnixInit.c,v 1.58 2005/05/23 20:21:02 das Exp $ */ #include "tclInt.h" @@ -1138,7 +1138,7 @@ MacOSXGetLibraryPath(Tcl_Interp *interp, int maxPathLen, char *tclLibPath) int foundInFramework = TCL_ERROR; #ifdef TCL_FRAMEWORK foundInFramework = Tcl_MacOSXOpenVersionedBundleResources(interp, - "com.tcltk.tcllibrary", TCL_VERSION, 0, maxPathLen, tclLibPath); + "com.tcltk.tcllibrary", TCL_FRAMEWORK_VERSION, 0, maxPathLen, tclLibPath); #endif return foundInFramework; } |