summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog39
-rw-r--r--macosx/GNUmakefile42
-rw-r--r--macosx/Tcl-Common.xcconfig9
-rw-r--r--tests/ioCmd.test8
-rw-r--r--unix/Makefile.in142
-rw-r--r--unix/configure.in30
-rwxr-xr-xunix/install-sh22
-rw-r--r--unix/tcl.m488
8 files changed, 212 insertions, 168 deletions
diff --git a/ChangeLog b/ChangeLog
index 7355edb..031edc6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,42 @@
+2008-03-11 Daniel Steffen <das@users.sourceforge.net>
+
+ * generic/tclEncoding.c (LoadEscapeEncoding): avoid leaking escape
+ sub-encodings, fixes encoding-11.1 failing after iso2022-jp loaded
+ (e.g. TESTFLAGS='-singleproc 1 -match "chan-io-1.8 encoding-11.1"').
+
+ * macosx/tclMacOSXNotify.c: avoid using CoreFoundation after fork() on
+ Darwin 9 even when TclpCreateProcess() uses vfork().
+
+ * macosx/Tcl.xcodeproj/project.pbxproj: add support for Xcode 3.1 and
+ * macosx/Tcl.xcodeproj/default.pbxuser: targets for building with
+ * macosx/Tcl-Common.xcconfig: gcc-4.2 and llvm-gcc-4.2.
+
+ * unix/tclUnixPort.h: workaround vfork() problems
+ in llvm-gcc-4.2.1 -O4 build.
+
+ * unix/tclUnixPort.h: move MODULE_SCOPE compat define
+ to top [Bug 1911102].
+
+ * macosx/GNUmakefile: fix quoting to allow paths to
+ * macosx/Tcl-Common.xcconfig: ${builddir} and ${INSTALL_ROOT}
+ * unix/Makefile.in: to contain spaces.
+ * unix/configure.in:
+ * unix/install-sh:
+ * unix/tcl.m4:
+ * tests/ioCmd.test:
+
+ * unix/configure: autoconf-2.59
+
+ * unix/Makefile.in (install-strip): strip non-global symbols from
+ dynamic library.
+
+ * unix/tclUnixNotfy.c: fix warning
+
+ * tests/exec.test (exec-9.7): reduce timing sensitivity
+ * tests/socket.test (socket-2.11): (esp. on multi-proc machines).
+
+ * tests/fCmd.test (fCmd-9.4): skip on Darwin 9 (xfail).
+
2008-03-11 Miguel Sofer <msofer@users.sf.net>
* generic/tclVar.c (TclDeleteNamespaceVars):
diff --git a/macosx/GNUmakefile b/macosx/GNUmakefile
index fb21e63..2b3b8bb 100644
--- a/macosx/GNUmakefile
+++ b/macosx/GNUmakefile
@@ -4,12 +4,12 @@
# 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).
#
-# Copyright (c) 2002-2007 Daniel A. Steffen <das@users.sourceforge.net>
+# Copyright (c) 2002-2008 Daniel A. Steffen <das@users.sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: GNUmakefile,v 1.8 2007/12/13 15:26:03 dgp Exp $
+# RCS: @(#) $Id: GNUmakefile,v 1.9 2008/03/11 22:28:34 das Exp $
#
########################################################################################################
@@ -74,6 +74,10 @@ BUILD_STYLE =
CONFIGURE_ARGS =
OBJ_DIR = ${OBJROOT}/${BUILD_STYLE}
+empty :=
+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 \
EXTRA_CFLAGS=-DNDEBUG
@@ -118,31 +122,31 @@ install-${PROJECT}: target = ${INSTALL_TARGET}
clean-${PROJECT} distclean-${PROJECT} test-${PROJECT}: \
target = $*
-DO_MAKE = +${MAKE} -C ${OBJ_DIR} ${target} ${MAKE_ARGS_V} ${MAKE_ARGS} ${EXTRA_MAKE_ARGS}
+DO_MAKE = +${MAKE} -C "${OBJ_DIR}" ${target} ${MAKE_ARGS_V} ${MAKE_ARGS} ${EXTRA_MAKE_ARGS}
#-------------------------------------------------------------------------------------------------------
# build rules
${PROJECT}:
- ${MAKE} install-${PROJECT} INSTALL_ROOT=${OBJ_DIR}/
+ ${MAKE} install-${PROJECT} INSTALL_ROOT="${OBJ_DIR}/"
-${OBJ_DIR}/Makefile: ${UNIX_DIR}/Makefile.in ${UNIX_DIR}/configure \
+${objdir}/Makefile: ${UNIX_DIR}/Makefile.in ${UNIX_DIR}/configure \
${UNIX_DIR}/tclConfig.sh.in Tcl-Info.plist.in
- mkdir -p ${OBJ_DIR} && cd ${OBJ_DIR} && \
+ mkdir -p "${OBJ_DIR}" && cd "${OBJ_DIR}" && \
if [ ${UNIX_DIR}/configure -nt config.status ]; then ${UNIX_DIR}/configure -C \
- --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} \
- --mandir=${MANDIR} --enable-threads --enable-framework --enable-dtrace \
+ --prefix="${PREFIX}" --bindir="${BINDIR}" --libdir="${LIBDIR}" \
+ --mandir="${MANDIR}" --enable-threads --enable-framework --enable-dtrace \
${CONFIGURE_ARGS} ${EXTRA_CONFIGURE_ARGS}; else ./config.status; fi
-build-${PROJECT}: ${OBJ_DIR}/Makefile
+build-${PROJECT}: ${objdir}/Makefile
${DO_MAKE}
ifeq (${INSTALL_BUILD},)
# 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 ./${LIBDIR}) $(dir ./${BINDIR}) ${SYMROOT} && \
- rm -f ./${LIBDIR} ./${BINDIR} && ln -fs ${SYMROOT} ./${LIBDIR} && \
- ln -fs ${SYMROOT} ./${BINDIR} && ln -fs ${OBJ_DIR}/tcltest ${SYMROOT}
+ @cd "${OBJ_DIR}" && mkdir -p $(dir $(subst ${space},\ ,./${LIBDIR})) $(dir $(subst ${space},\ ,./${BINDIR})) "${SYMROOT}" && \
+ rm -f "./${LIBDIR}" "./${BINDIR}" && ln -fs "${SYMROOT}" "./${LIBDIR}" && \
+ ln -fs "${SYMROOT}" "./${BINDIR}" && ln -fs "${OBJ_DIR}/tcltest" "${SYMROOT}"
endif
install-${PROJECT}: build-${PROJECT}
@@ -171,7 +175,7 @@ else
if [ -n "$${RM_USRLIB:-}" ]; then rm -f usr/lib; rmdir -p usr 2>&-; fi; \
if [ -n "$${RM_SYSTEM:-}" ]; then rm -f System; fi; fi
# install tclsh symbolic link
- @ln -fs ${TCLSH} ${INSTALL_ROOT}${BINDIR}/tclsh
+ @ln -fs ${TCLSH} "${INSTALL_ROOT}${BINDIR}/tclsh"
endif
endif
ifeq (${BUILD_STYLE}_${EMBEDDED_BUILD},Development_)
@@ -179,20 +183,20 @@ ifeq (${BUILD_STYLE}_${EMBEDDED_BUILD},Development_)
# Deployment build can be installed on top
# of Development build without overwriting
# the debug library
- @cd ${INSTALL_ROOT}${LIBDIR}/${PRODUCT_NAME}.framework/Versions/${VERSION} && \
+ @cd "${INSTALL_ROOT}${LIBDIR}/${PRODUCT_NAME}.framework/Versions/${VERSION}" && \
ln -f "${PRODUCT_NAME}" "${PRODUCT_NAME}_debug"
endif
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
+ rm -rf "${SYMROOT}"/{${PRODUCT_NAME}.framework,${TCLSH},tcltest}
+ rm -f "${OBJ_DIR}"{"${LIBDIR}","${BINDIR}"} && \
+ rmdir -p "${OBJ_DIR}"$(dir $(subst ${space},\ ,${LIBDIR})) 2>&- || true && \
+ rmdir -p "${OBJ_DIR}"$(dir $(subst ${space},\ ,${BINDIR})) 2>&- || true
distclean-${PROJECT}: %-${PROJECT}: clean-${PROJECT}
${DO_MAKE}
- rm -rf ${OBJ_DIR}
+ rm -rf "${OBJ_DIR}"
test-${PROJECT}: %-${PROJECT}: build-${PROJECT}
${DO_MAKE}
diff --git a/macosx/Tcl-Common.xcconfig b/macosx/Tcl-Common.xcconfig
index 634a850..43467b9 100644
--- a/macosx/Tcl-Common.xcconfig
+++ b/macosx/Tcl-Common.xcconfig
@@ -4,16 +4,16 @@
// This file contains the Xcode build settings comon to all
// project configurations in Tcl.xcodeproj.
//
-// Copyright (c) 2007 Daniel A. Steffen <das@users.sourceforge.net>
+// Copyright (c) 2007-2008 Daniel A. Steffen <das@users.sourceforge.net>
//
// See the file "license.terms" for information on usage and redistribution
// of this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
-// RCS: @(#) $Id: Tcl-Common.xcconfig,v 1.8 2007/12/13 15:26:03 dgp Exp $
+// RCS: @(#) $Id: Tcl-Common.xcconfig,v 1.9 2008/03/11 22:28:34 das Exp $
//
-HEADER_SEARCH_PATHS = $(DERIVED_FILE_DIR)/tcl $(HEADER_SEARCH_PATHS)
-OTHER_LDFLAGS = -headerpad_max_install_names -sectcreate __TEXT __info_plist $(DERIVED_FILE_DIR)/tcl/Tclsh-Info.plist $(OTHER_LDFLAGS)
+HEADER_SEARCH_PATHS = "$(DERIVED_FILE_DIR)/tcl" $(HEADER_SEARCH_PATHS)
+OTHER_LDFLAGS = -headerpad_max_install_names -sectcreate __TEXT __info_plist "$(DERIVED_FILE_DIR)/tcl/Tclsh-Info.plist" $(OTHER_LDFLAGS)
INSTALL_PATH = "$(BINDIR)"
GCC_PREFIX_HEADER = $(DERIVED_FILE_DIR)/tcl/tclConfig.h
GCC_GENERATE_DEBUGGING_SYMBOLS = YES
@@ -22,6 +22,7 @@ GCC_DYNAMIC_NO_PIC = YES
GCC = $(DEVELOPER_DIR)/usr/bin/gcc
GCC_VERSION = 4.0
CC = $(GCC)-$(GCC_VERSION)
+LD = $(CC)
WARNING_CFLAGS_GCC3 = -Wall -Wno-implicit-int -Wno-unused-parameter -Wno-deprecated-declarations
WARNING_CFLAGS = -Wextra -Wno-missing-field-initializers -Winit-self -Wpointer-arith -Wcast-align -Wdisabled-optimization -Winline $(WARNING_CFLAGS_GCC3) $(WARNING_CFLAGS)
BINDIR = $(PREFIX)/bin
diff --git a/tests/ioCmd.test b/tests/ioCmd.test
index 088d637..2b4877f 100644
--- a/tests/ioCmd.test
+++ b/tests/ioCmd.test
@@ -13,7 +13,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: ioCmd.test,v 1.35 2007/12/13 15:26:06 dgp Exp $
+# RCS: @(#) $Id: ioCmd.test,v 1.36 2008/03/11 22:28:34 das Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -372,13 +372,13 @@ file delete $path(test5)
test iocmd-11.1 {I/O to command pipelines} {unixOrPc unixExecs} {
set f [open $path(test4) w]
close $f
- list [catch {open "| cat < $path(test4) > $path(test5)" w} msg] $msg $::errorCode
+ list [catch {open "| cat < \"$path(test4)\" > \"$path(test5)\"" w} msg] $msg $::errorCode
} {1 {can't write input to command: standard input was redirected} NONE}
test iocmd-11.2 {I/O to command pipelines} {unixOrPc unixExecs} {
- list [catch {open "| echo > $path(test5)" r} msg] $msg $::errorCode
+ list [catch {open "| echo > \"$path(test5)\"" r} msg] $msg $::errorCode
} {1 {can't read output from command: standard output was redirected} NONE}
test iocmd-11.3 {I/O to command pipelines} {unixOrPc unixExecs} {
- list [catch {open "| echo > $path(test5)" r+} msg] $msg $::errorCode
+ list [catch {open "| echo > \"$path(test5)\"" r+} msg] $msg $::errorCode
} {1 {can't read output from command: standard output was redirected} NONE}
test iocmd-12.1 {POSIX open access modes: RDONLY} {
diff --git a/unix/Makefile.in b/unix/Makefile.in
index bdaf9b0..673d9a1 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -4,7 +4,7 @@
# "./configure", which is a configuration script generated by the "autoconf"
# program (constructs like "@foo@" will get replaced in the actual Makefile.
#
-# RCS: @(#) $Id: Makefile.in,v 1.227 2008/02/26 19:52:54 patthoyts Exp $
+# RCS: @(#) $Id: Makefile.in,v 1.228 2008/03/11 22:28:33 das Exp $
VERSION = @TCL_VERSION@
MAJOR_VERSION = @TCL_MAJOR_VERSION@
@@ -147,7 +147,7 @@ SHELL = /bin/sh
# distribution, which is slower but guaranteed to work.
INSTALL_STRIP_PROGRAM = -s
-INSTALL_STRIP_LIBRARY = -S -S
+INSTALL_STRIP_LIBRARY = -S -x
INSTALL = @srcdir@/../unix/install-sh -c
INSTALL_PROGRAM = ${INSTALL}
@@ -257,7 +257,7 @@ DDD = ddd
#--------------------------------------------------------------------------
STUB_CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \
--I${BUILD_DIR} -I${UNIX_DIR} -I${GENERIC_DIR} -I${TOMMATH_DIR} \
+-I"${BUILD_DIR}" -I${UNIX_DIR} -I${GENERIC_DIR} -I${TOMMATH_DIR} \
${AC_FLAGS} ${PROTO_FLAGS} ${ENV_FLAGS} ${EXTRA_CFLAGS} @EXTRA_CC_SWITCHES@
CC_SWITCHES = $(STUB_CC_SWITCHES) ${NO_DEPRECATED_FLAGS}
@@ -575,7 +575,7 @@ tclsh: ${TCLSH_OBJS} ${TCL_LIB_FILE}
# library.
tcltest: ${TCLTEST_OBJS} ${TCL_LIB_FILE} ${BUILD_DLTEST}
- $(MAKE) tcltest-real LIB_RUNTIME_DIR=`pwd`
+ $(MAKE) tcltest-real LIB_RUNTIME_DIR="`pwd`"
tcltest-real:
${CC} ${CFLAGS} ${LDFLAGS} ${TCLTEST_OBJS} @TCL_BUILD_LIB_SPEC@ ${LIBS} @EXTRA_TCLSH_LIBS@ \
@@ -590,12 +590,12 @@ 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)
gdb-test: tcltest
- @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
@echo "set args $(TOP_DIR)/tests/all.tcl $(TESTFLAGS) -singleproc 1" >> gdb.run
$(GDB) ./tcltest --command=gdb.run
@@ -603,34 +603,34 @@ gdb-test: tcltest
# 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
@@ -638,12 +638,12 @@ ddd: tclsh
VALGRINDARGS=--tool=memcheck --num-callers=8 --leak-resolution=high --leak-check=yes --show-reachable=yes -v
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 $(VALGRINDARGS) ./tcltest $(TOP_DIR)/tests/all.tcl -singleproc 1 $(TESTFLAGS)
valgrindshell: 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; \
valgrind $(VALGRINDARGS) ./tclsh $(SCRIPT)
@@ -711,30 +711,30 @@ install-strip:
# (e.g. if installing as root).
install-binaries: binaries
- @for i in $(LIB_INSTALL_DIR) $(BIN_INSTALL_DIR) ; \
+ @for i in "$(LIB_INSTALL_DIR)" "$(BIN_INSTALL_DIR)" ; \
do \
- if [ ! -d $$i ] ; then \
+ if [ ! -d "$$i" ] ; then \
echo "Making directory $$i"; \
- mkdir -p $$i; \
- chmod 755 $$i; \
+ mkdir -p "$$i"; \
+ chmod 755 "$$i"; \
else true; \
fi; \
done;
- @if test ! -x $(SRC_DIR)../unix/install-sh; then \
+ @if test ! -x $(SRC_DIR)/../unix/install-sh; then \
chmod +x $(SRC_DIR)/../unix/install-sh; \
fi
@echo "Installing $(LIB_FILE) to $(LIB_INSTALL_DIR)/"
@@INSTALL_LIB@
- @chmod 555 $(LIB_INSTALL_DIR)/$(LIB_FILE)
+ @chmod 555 "$(LIB_INSTALL_DIR)"/$(LIB_FILE)
@if test "$(TCL_BUILD_EXP_FILE)" != ""; then \
echo "Installing $(TCL_EXP_FILE) to $(LIB_INSTALL_DIR)/"; \
$(INSTALL_DATA) $(TCL_BUILD_EXP_FILE) \
- $(LIB_INSTALL_DIR)/$(TCL_EXP_FILE); \
+ "$(LIB_INSTALL_DIR)"/$(TCL_EXP_FILE); \
fi
@echo "Installing tclsh as $(BIN_INSTALL_DIR)/tclsh$(VERSION)"
- @$(INSTALL_PROGRAM) tclsh $(BIN_INSTALL_DIR)/tclsh$(VERSION)
+ @$(INSTALL_PROGRAM) tclsh "$(BIN_INSTALL_DIR)"/tclsh$(VERSION)
@echo "Installing tclConfig.sh to $(LIB_INSTALL_DIR)/"
- @$(INSTALL_DATA) tclConfig.sh $(LIB_INSTALL_DIR)/tclConfig.sh
+ @$(INSTALL_DATA) tclConfig.sh "$(LIB_INSTALL_DIR)"/tclConfig.sh
@if test "$(STUB_LIB_FILE)" != "" ; then \
echo "Installing $(STUB_LIB_FILE) to $(LIB_INSTALL_DIR)/"; \
@INSTALL_STUB_LIB@ ; \
@@ -742,21 +742,21 @@ install-binaries: binaries
@EXTRA_INSTALL_BINARIES@
install-libraries: libraries $(INSTALL_TZDATA) install-msgs
- @for i in $(INCLUDE_INSTALL_DIR) $(SCRIPT_INSTALL_DIR); \
+ @for i in "$(INCLUDE_INSTALL_DIR)" "$(SCRIPT_INSTALL_DIR)"; \
do \
- if [ ! -d $$i ] ; then \
+ if [ ! -d "$$i" ] ; then \
echo "Making directory $$i"; \
- mkdir -p $$i; \
- chmod 755 $$i; \
+ mkdir -p "$$i"; \
+ chmod 755 "$$i"; \
else true; \
fi; \
done;
@for i in opt0.4 http1.0 encoding ../tcl8 ../tcl8/8.3 ../tcl8/8.4 ../tcl8/8.4/platform ../tcl8/8.5; \
do \
- if [ ! -d $(SCRIPT_INSTALL_DIR)/$$i ] ; then \
+ if [ ! -d "$(SCRIPT_INSTALL_DIR)"/$$i ] ; then \
echo "Making directory $(SCRIPT_INSTALL_DIR)/$$i"; \
- mkdir -p $(SCRIPT_INSTALL_DIR)/$$i; \
- chmod 755 $(SCRIPT_INSTALL_DIR)/$$i; \
+ mkdir -p "$(SCRIPT_INSTALL_DIR)"/$$i; \
+ chmod 755 "$(SCRIPT_INSTALL_DIR)"/$$i; \
else true; \
fi; \
done;
@@ -769,96 +769,96 @@ install-libraries: libraries $(INSTALL_TZDATA) install-msgs
$(GENERIC_DIR)/tclTomMath.h \
$(GENERIC_DIR)/tclTomMathDecls.h ; \
do \
- $(INSTALL_DATA) $$i $(INCLUDE_INSTALL_DIR); \
+ $(INSTALL_DATA) $$i "$(INCLUDE_INSTALL_DIR)"; \
done;
@echo "Installing library files to $(SCRIPT_INSTALL_DIR)";
@for i in $(TOP_DIR)/library/*.tcl $(TOP_DIR)/library/tclIndex \
$(UNIX_DIR)/tclAppInit.c $(UNIX_DIR)/ldAix @DTRACE_SRC@; \
do \
- $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR); \
+ $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"; \
done;
@echo "Installing library http1.0 directory";
- @for j in $(TOP_DIR)/library/http1.0/*.tcl ; \
+ @for i in $(TOP_DIR)/library/http1.0/*.tcl ; \
do \
- $(INSTALL_DATA) $$j $(SCRIPT_INSTALL_DIR)/http1.0; \
+ $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/http1.0; \
done;
@echo "Installing package http 2.5.5 as a Tcl Module";
- @$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/http-2.5.5.tm;
+ @$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/http-2.5.5.tm;
@echo "Installing library opt0.4 directory";
- @for j in $(TOP_DIR)/library/opt/*.tcl ; \
+ @for i in $(TOP_DIR)/library/opt/*.tcl ; \
do \
- $(INSTALL_DATA) $$j $(SCRIPT_INSTALL_DIR)/opt0.4; \
+ $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/opt0.4; \
done;
@echo "Installing package msgcat 1.4.2 as a Tcl Module";
- @$(INSTALL_DATA) $(TOP_DIR)/library/msgcat/msgcat.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/msgcat-1.4.2.tm;
+ @$(INSTALL_DATA) $(TOP_DIR)/library/msgcat/msgcat.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.5/msgcat-1.4.2.tm;
@echo "Installing package tcltest 2.3.0 as a Tcl Module";
- @$(INSTALL_DATA) $(TOP_DIR)/library/tcltest/tcltest.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/tcltest-2.3.0.tm;
+ @$(INSTALL_DATA) $(TOP_DIR)/library/tcltest/tcltest.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.5/tcltest-2.3.0.tm;
@echo "Installing package platform 1.0.3 as a Tcl Module";
- @$(INSTALL_DATA) $(TOP_DIR)/library/platform/platform.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/platform-1.0.3.tm;
+ @$(INSTALL_DATA) $(TOP_DIR)/library/platform/platform.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/platform-1.0.3.tm;
@echo "Installing package platform::shell 1.1.3 as a Tcl Module";
- @$(INSTALL_DATA) $(TOP_DIR)/library/platform/shell.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/platform/shell-1.1.3.tm;
+ @$(INSTALL_DATA) $(TOP_DIR)/library/platform/shell.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/platform/shell-1.1.3.tm;
@echo "Installing library encoding directory";
@for i in $(TOP_DIR)/library/encoding/*.enc ; do \
- $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR)/encoding; \
+ $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/encoding; \
done;
@if [ -n "$(TCL_MODULE_PATH)" -a -f $(TOP_DIR)/library/tm.tcl ]; then \
echo "Customizing tcl module path"; \
echo "::tcl::tm::roots {$(TCL_MODULE_PATH)}" >> \
- $(SCRIPT_INSTALL_DIR)/tm.tcl; \
+ "$(SCRIPT_INSTALL_DIR)"/tm.tcl; \
fi
install-tzdata: tclsh
@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
+ $(TOP_DIR)/library/tzdata "$(SCRIPT_INSTALL_DIR)"/tzdata
install-msgs: tclsh
@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
+ $(TOP_DIR)/library/msgs "$(SCRIPT_INSTALL_DIR)"/msgs
install-doc: doc
@if test ! -x $(UNIX_DIR)/installManPage; then \
chmod +x $(UNIX_DIR)/installManPage; \
fi
- @for i in $(MAN_INSTALL_DIR) $(MAN1_INSTALL_DIR) $(MAN3_INSTALL_DIR) $(MANN_INSTALL_DIR) ; \
+ @for i in "$(MAN_INSTALL_DIR)" "$(MAN1_INSTALL_DIR)" "$(MAN3_INSTALL_DIR)" "$(MANN_INSTALL_DIR)" ; \
do \
- if [ ! -d $$i ] ; then \
+ if [ ! -d "$$i" ] ; then \
echo "Making directory $$i"; \
- mkdir -p $$i; \
- chmod 755 $$i; \
+ mkdir -p "$$i"; \
+ chmod 755 "$$i"; \
else true; \
fi; \
done;
@echo "Installing and cross-linking top-level (.1) docs";
@for i in $(TOP_DIR)/doc/*.1; do \
- $(UNIX_DIR)/installManPage $(MAN_FLAGS) $$i $(MAN1_INSTALL_DIR); \
+ $(UNIX_DIR)/installManPage $(MAN_FLAGS) $$i "$(MAN1_INSTALL_DIR)"; \
done
@echo "Installing and cross-linking C API (.3) docs";
@for i in $(TOP_DIR)/doc/*.3; do \
- $(UNIX_DIR)/installManPage $(MAN_FLAGS) $$i $(MAN3_INSTALL_DIR); \
+ $(UNIX_DIR)/installManPage $(MAN_FLAGS) $$i "$(MAN3_INSTALL_DIR)"; \
done
@echo "Installing and cross-linking command (.n) docs";
@for i in $(TOP_DIR)/doc/*.n; do \
- $(UNIX_DIR)/installManPage $(MAN_FLAGS) $$i $(MANN_INSTALL_DIR); \
+ $(UNIX_DIR)/installManPage $(MAN_FLAGS) $$i "$(MANN_INSTALL_DIR)"; \
done
# Optional target to install private headers
install-private-headers: libraries
- @for i in $(PRIVATE_INCLUDE_INSTALL_DIR); \
+ @for i in "$(PRIVATE_INCLUDE_INSTALL_DIR)"; \
do \
- if [ ! -d $$i ] ; then \
+ if [ ! -d "$$i" ] ; then \
echo "Making directory $$i"; \
- mkdir -p $$i; \
- chmod 755 $$i; \
+ mkdir -p "$$i"; \
+ chmod 755 "$$i"; \
else true; \
fi; \
done;
@@ -870,10 +870,10 @@ install-private-headers: libraries
$(GENERIC_DIR)/tclIntPlatDecls.h $(GENERIC_DIR)/tclPort.h \
$(UNIX_DIR)/tclUnixPort.h; \
do \
- $(INSTALL_DATA) $$i $(PRIVATE_INCLUDE_INSTALL_DIR); \
+ $(INSTALL_DATA) $$i "$(PRIVATE_INCLUDE_INSTALL_DIR)"; \
done;
@if test -f tclConfig.h; then\
- $(INSTALL_DATA) tclConfig.h $(PRIVATE_INCLUDE_INSTALL_DIR); \
+ $(INSTALL_DATA) tclConfig.h "$(PRIVATE_INCLUDE_INSTALL_DIR)"; \
fi;
Makefile: $(UNIX_DIR)/Makefile.in $(DLTEST_DIR)/Makefile.in
@@ -1130,17 +1130,17 @@ tclPkg.o: $(GENERIC_DIR)/tclPkg.c
tclPkgConfig.o: $(GENERIC_DIR)/tclPkgConfig.c
$(CC) -c $(CC_SWITCHES) \
- -DCFG_INSTALL_LIBDIR=\"$(LIB_INSTALL_DIR)\" \
- -DCFG_INSTALL_BINDIR=\"$(BIN_INSTALL_DIR)\" \
- -DCFG_INSTALL_SCRDIR=\"$(SCRIPT_INSTALL_DIR)\" \
- -DCFG_INSTALL_INCDIR=\"$(INCLUDE_INSTALL_DIR)\" \
- -DCFG_INSTALL_DOCDIR=\"$(MAN_INSTALL_DIR)\" \
+ -DCFG_INSTALL_LIBDIR="\"$(LIB_INSTALL_DIR)\"" \
+ -DCFG_INSTALL_BINDIR="\"$(BIN_INSTALL_DIR)\"" \
+ -DCFG_INSTALL_SCRDIR="\"$(SCRIPT_INSTALL_DIR)\"" \
+ -DCFG_INSTALL_INCDIR="\"$(INCLUDE_INSTALL_DIR)\"" \
+ -DCFG_INSTALL_DOCDIR="\"$(MAN_INSTALL_DIR)\"" \
\
- -DCFG_RUNTIME_LIBDIR=\"$(libdir)\" \
- -DCFG_RUNTIME_BINDIR=\"$(bindir)\" \
- -DCFG_RUNTIME_SCRDIR=\"$(TCL_LIBRARY)\" \
- -DCFG_RUNTIME_INCDIR=\"$(includedir)\" \
- -DCFG_RUNTIME_DOCDIR=\"$(mandir)\" \
+ -DCFG_RUNTIME_LIBDIR="\"$(libdir)\"" \
+ -DCFG_RUNTIME_BINDIR="\"$(bindir)\"" \
+ -DCFG_RUNTIME_SCRDIR="\"$(TCL_LIBRARY)\"" \
+ -DCFG_RUNTIME_INCDIR="\"$(includedir)\"" \
+ -DCFG_RUNTIME_DOCDIR="\"$(mandir)\"" \
\
$(GENERIC_DIR)/tclPkgConfig.c
@@ -1761,9 +1761,9 @@ html-tk: tclsh
@EXTRA_BUILD_HTML@
BUILD_HTML = \
- @@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)/tcltk-man2html.tcl --htmldir=$(HTML_INSTALL_DIR) \
+ ./tclsh $(TOOL_DIR)/tcltk-man2html.tcl --htmldir="$(HTML_INSTALL_DIR)" \
--srcdir=$(TOP_DIR)/.. $(BUILD_HTML_FLAGS)
#
diff --git a/unix/configure.in b/unix/configure.in
index 50fb99a..160d7ee 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.177 2008/02/26 21:19:51 jenglish Exp $
+# RCS: @(#) $Id: configure.in,v 1.178 2008/03/11 22:28:34 das Exp $
AC_INIT([tcl],[8.5])
AC_PREREQ(2.59)
@@ -41,8 +41,8 @@ if test "${exec_prefix}" = "NONE"; then
exec_prefix=$prefix
fi
# Make sure srcdir is fully qualified!
-srcdir=`cd $srcdir ; pwd`
-TCL_SRC_DIR=`cd $srcdir/..; pwd`
+srcdir="`cd "$srcdir" ; pwd`"
+TCL_SRC_DIR="`cd "$srcdir"/..; pwd`"
#------------------------------------------------------------------------
# Compress and/or soft link the manpages?
@@ -704,7 +704,7 @@ HTML_DIR='$(DISTDIR)/html'
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}'
+ TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -install_name "${DYLIB_INSTALL_DIR}"/${TCL_LIB_FILE}'
echo "$LDFLAGS " | grep -q -- '-prebind ' && TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -seg1addr 0xa000000'
TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tcl-Info.plist'
EXTRA_TCLSH_LIBS='-sectcreate __TEXT __info_plist Tclsh-Info.plist'
@@ -731,15 +731,15 @@ if test "$FRAMEWORK_BUILD" = "1" ; then
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"
+ 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_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 "Installing license.terms to $(LIB_INSTALL_DIR)/Resources" && $(INSTALL_DATA) "$(TOP_DIR)/license.terms" "$(LIB_INSTALL_DIR)/Resources"'
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)" tclConfig.sh Resources Headers PrivateHeaders; do rm -f "$(LIB_INSTALL_DIR)/../../$$f" && ln -s "Versions/Current/$$f" "$(LIB_INSTALL_DIR)/../.."; done && f="$(STUB_LIB_FILE)" && rm -f "$(LIB_INSTALL_DIR)/../../$$f" && ln -s "Versions/$(VERSION)/$$f" "$(LIB_INSTALL_DIR)/../.."'
@@ -757,18 +757,18 @@ else
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}"
+ 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}"
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`"
+ 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}"
+ TCL_BUILD_LIB_SPEC="-bI:\"`pwd`\"/${TCL_BUILD_EXP_FILE}"
+ TCL_LIB_SPEC="-bI:\"${libdir}\"/${TCL_EXP_FILE}"
fi
fi
fi
@@ -814,8 +814,8 @@ else
TCL_STUB_LIB_FLAG="-ltclstub`echo ${TCL_VERSION} | tr -d .`"
fi
-TCL_BUILD_STUB_LIB_SPEC="-L`pwd` ${TCL_STUB_LIB_FLAG}"
-TCL_STUB_LIB_SPEC="-L${TCL_STUB_LIB_DIR} ${TCL_STUB_LIB_FLAG}"
+TCL_BUILD_STUB_LIB_SPEC="-L\"`pwd`\" ${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="${TCL_STUB_LIB_DIR}/${TCL_STUB_LIB_FILE}"
diff --git a/unix/install-sh b/unix/install-sh
index a9a1f27..8cff938 100755
--- a/unix/install-sh
+++ b/unix/install-sh
@@ -94,31 +94,31 @@ fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
-if [ -d $dst ]
+if [ -d "$dst" ]
then
- dst="$dst"/`basename $src`
+ dst="$dst/`basename "$src"`"
fi
# Make a temp file name in the proper directory.
-dstdir=`dirname $dst`
-dsttmp=$dstdir/#inst.$$#
+dstdir="`dirname "$dst"`"
+dsttmp="$dstdir"/#inst.$$#
# Move or copy the file name to the temp name
-$doit $instcmd $src $dsttmp
+$doit $instcmd "$src" "$dsttmp"
# and set any options; do chmod last to preserve setuid bits
-if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; fi
-if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; fi
-if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; fi
-if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi
+if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; fi
+if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; fi
+if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; fi
+if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; fi
# Now rename the file to the real destination.
-$doit $rmcmd $dst
-$doit $mvcmd $dsttmp $dst
+$doit $rmcmd "$dst"
+$doit $mvcmd "$dsttmp" "$dst"
exit 0
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 3cc5dc9..2e9b80e 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -30,21 +30,21 @@ AC_DEFUN([SC_PATH_TCLCONFIG], [
AC_ARG_WITH(tcl,
AC_HELP_STRING([--with-tcl],
[directory containing tcl configuration (tclConfig.sh)]),
- with_tclconfig=${withval})
+ with_tclconfig="${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
- case ${with_tclconfig} in
+ case "${with_tclconfig}" in
*/tclConfig.sh )
- if test -f ${with_tclconfig}; then
+ if test -f "${with_tclconfig}"; then
AC_MSG_WARN([--with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself])
- with_tclconfig=`echo ${with_tclconfig} | sed 's!/tclConfig\.sh$!!'`
+ with_tclconfig="`echo "${with_tclconfig}" | sed 's!/tclConfig\.sh$!!'`"
fi ;;
esac
if test -f "${with_tclconfig}/tclConfig.sh" ; then
- ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
+ ac_cv_c_tclconfig="`(cd "${with_tclconfig}"; pwd)`"
else
AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh])
fi
@@ -66,7 +66,7 @@ AC_DEFUN([SC_PATH_TCLCONFIG], [
`ls -dr ../../../tcl[[8-9]].[[0-9]] 2>/dev/null` \
`ls -dr ../../../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do
if test -f "$i/unix/tclConfig.sh" ; then
- ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
+ ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
break
fi
done
@@ -80,7 +80,7 @@ AC_DEFUN([SC_PATH_TCLCONFIG], [
`ls -d /System/Library/Frameworks 2>/dev/null` \
; do
if test -f "$i/Tcl.framework/tclConfig.sh" ; then
- ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
+ ac_cv_c_tclconfig="`(cd $i/Tcl.framework; pwd)`"
break
fi
done
@@ -96,7 +96,7 @@ AC_DEFUN([SC_PATH_TCLCONFIG], [
`ls -d /usr/lib 2>/dev/null` \
; do
if test -f "$i/tclConfig.sh" ; then
- ac_cv_c_tclconfig=`(cd $i; pwd)`
+ ac_cv_c_tclconfig="`(cd $i; pwd)`"
break
fi
done
@@ -110,7 +110,7 @@ AC_DEFUN([SC_PATH_TCLCONFIG], [
`ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]] 2>/dev/null` \
`ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do
if test -f "$i/unix/tclConfig.sh" ; then
- ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
+ ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
break
fi
done
@@ -123,7 +123,7 @@ AC_DEFUN([SC_PATH_TCLCONFIG], [
exit 0
else
no_tcl=
- TCL_BIN_DIR=${ac_cv_c_tclconfig}
+ TCL_BIN_DIR="${ac_cv_c_tclconfig}"
AC_MSG_RESULT([found ${TCL_BIN_DIR}/tclConfig.sh])
fi
fi
@@ -160,21 +160,21 @@ AC_DEFUN([SC_PATH_TKCONFIG], [
AC_ARG_WITH(tk,
AC_HELP_STRING([--with-tk],
[directory containing tk configuration (tkConfig.sh)]),
- with_tkconfig=${withval})
+ with_tkconfig="${withval}")
AC_MSG_CHECKING([for Tk configuration])
AC_CACHE_VAL(ac_cv_c_tkconfig,[
# First check to see if --with-tkconfig was specified.
if test x"${with_tkconfig}" != x ; then
- case ${with_tkconfig} in
+ case "${with_tkconfig}" in
*/tkConfig.sh )
- if test -f ${with_tkconfig}; then
+ if test -f "${with_tkconfig}"; then
AC_MSG_WARN([--with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself])
- with_tkconfig=`echo ${with_tkconfig} | sed 's!/tkConfig\.sh$!!'`
+ with_tkconfig="`echo "${with_tkconfig}" | sed 's!/tkConfig\.sh$!!'`"
fi ;;
esac
if test -f "${with_tkconfig}/tkConfig.sh" ; then
- ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
+ ac_cv_c_tkconfig="`(cd "${with_tkconfig}"; pwd)`"
else
AC_MSG_ERROR([${with_tkconfig} directory doesn't contain tkConfig.sh])
fi
@@ -196,7 +196,7 @@ AC_DEFUN([SC_PATH_TKCONFIG], [
`ls -dr ../../../tk[[8-9]].[[0-9]] 2>/dev/null` \
`ls -dr ../../../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do
if test -f "$i/unix/tkConfig.sh" ; then
- ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
+ ac_cv_c_tkconfig="`(cd $i/unix; pwd)`"
break
fi
done
@@ -210,7 +210,7 @@ AC_DEFUN([SC_PATH_TKCONFIG], [
`ls -d /System/Library/Frameworks 2>/dev/null` \
; do
if test -f "$i/Tk.framework/tkConfig.sh" ; then
- ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
+ ac_cv_c_tkconfig="`(cd $i/Tk.framework; pwd)`"
break
fi
done
@@ -226,7 +226,7 @@ AC_DEFUN([SC_PATH_TKCONFIG], [
`ls -d /usr/lib 2>/dev/null` \
; do
if test -f "$i/tkConfig.sh" ; then
- ac_cv_c_tkconfig=`(cd $i; pwd)`
+ ac_cv_c_tkconfig="`(cd $i; pwd)`"
break
fi
done
@@ -240,7 +240,7 @@ AC_DEFUN([SC_PATH_TKCONFIG], [
`ls -dr ${srcdir}/../tk[[8-9]].[[0-9]] 2>/dev/null` \
`ls -dr ${srcdir}/../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do
if test -f "$i/unix/tkConfig.sh" ; then
- ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
+ ac_cv_c_tkconfig="`(cd $i/unix; pwd)`"
break
fi
done
@@ -253,7 +253,7 @@ AC_DEFUN([SC_PATH_TKCONFIG], [
exit 0
else
no_tk=
- TK_BIN_DIR=${ac_cv_c_tkconfig}
+ TK_BIN_DIR="${ac_cv_c_tkconfig}"
AC_MSG_RESULT([found ${TK_BIN_DIR}/tkConfig.sh])
fi
fi
@@ -299,9 +299,9 @@ AC_DEFUN([SC_LOAD_TCLCONFIG], [
# instead of TCL_BUILD_LIB_SPEC since it will work with both an
# installed and uninstalled version of Tcl.
if test -f "${TCL_BIN_DIR}/Makefile" ; then
- TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
- TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
- TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
+ TCL_LIB_SPEC="${TCL_BUILD_LIB_SPEC}"
+ TCL_STUB_LIB_SPEC="${TCL_BUILD_STUB_LIB_SPEC}"
+ TCL_STUB_LIB_PATH="${TCL_BUILD_STUB_LIB_PATH}"
elif test "`uname -s`" = "Darwin"; then
# If Tcl was built as a framework, attempt to use the libraries
# from the framework at the given location so that linking works
@@ -309,16 +309,16 @@ AC_DEFUN([SC_LOAD_TCLCONFIG], [
case ${TCL_DEFS} in
*TCL_FRAMEWORK*)
if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
- for i in "`cd ${TCL_BIN_DIR}; pwd`" \
- "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
+ for i in "`cd "${TCL_BIN_DIR}"; pwd`" \
+ "`cd "${TCL_BIN_DIR}"/../..; pwd`"; do
if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
- TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
+ TCL_LIB_SPEC="-F\"`dirname "$i"`\" -framework ${TCL_LIB_FILE}"
break
fi
done
fi
if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
- TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
+ TCL_STUB_LIB_SPEC="-L\"${TCL_BIN_DIR}\" ${TCL_STUB_LIB_FLAG}"
TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
fi
;;
@@ -327,9 +327,9 @@ AC_DEFUN([SC_LOAD_TCLCONFIG], [
# eval is required to do the TCL_DBGX substitution
eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
- eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
+ eval "TCL_LIB_SPEC=\"`echo "${TCL_LIB_SPEC}" | sed -e 's/"/\\\\"/g'`\""
eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
- eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
+ eval "TCL_STUB_LIB_SPEC=\"`echo "${TCL_STUB_LIB_SPEC}" | sed -e 's/"/\\\\"/g'`\""
AC_SUBST(TCL_VERSION)
AC_SUBST(TCL_PATCH_LEVEL)
@@ -382,9 +382,9 @@ AC_DEFUN([SC_LOAD_TKCONFIG], [
# instead of TK_BUILD_LIB_SPEC since it will work with both an
# installed and uninstalled version of Tcl.
if test -f "${TK_BIN_DIR}/Makefile" ; then
- TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
- TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
- TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
+ TK_LIB_SPEC="${TK_BUILD_LIB_SPEC}"
+ TK_STUB_LIB_SPEC="${TK_BUILD_STUB_LIB_SPEC}"
+ TK_STUB_LIB_PATH="${TK_BUILD_STUB_LIB_PATH}"
elif test "`uname -s`" = "Darwin"; then
# If Tk was built as a framework, attempt to use the libraries
# from the framework at the given location so that linking works
@@ -392,16 +392,16 @@ AC_DEFUN([SC_LOAD_TKCONFIG], [
case ${TK_DEFS} in
*TK_FRAMEWORK*)
if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
- for i in "`cd ${TK_BIN_DIR}; pwd`" \
- "`cd ${TK_BIN_DIR}/../..; pwd`"; do
+ for i in "`cd "${TK_BIN_DIR}"; pwd`" \
+ "`cd "${TK_BIN_DIR}"/../..; pwd`"; do
if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
- TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
+ TK_LIB_SPEC="-F\"`dirname "$i"`\" -framework ${TK_LIB_FILE}"
break
fi
done
fi
if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
- TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
+ TK_STUB_LIB_SPEC="-L\"${TK_BIN_DIR}\" ${TK_STUB_LIB_FLAG}"
TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
fi
;;
@@ -410,9 +410,9 @@ AC_DEFUN([SC_LOAD_TKCONFIG], [
# eval is required to do the TK_DBGX substitution
eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
- eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
+ eval "TK_LIB_SPEC=\"`echo "${TK_LIB_SPEC}" | sed -e 's/"/\\\\"/g'`\""
eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
- eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
+ eval "TK_STUB_LIB_SPEC=\"`echo "${TK_STUB_LIB_SPEC}" | sed -e 's/"/\\\\"/g'`\""
AC_SUBST(TK_VERSION)
AC_SUBST(TK_BIN_DIR)
@@ -494,7 +494,7 @@ AC_DEFUN([SC_PROG_TCLSH], [
AC_DEFUN([SC_BUILD_TCLSH], [
AC_MSG_CHECKING([for tclsh in Tcl build directory])
- BUILD_TCLSH=${TCL_BIN_DIR}/tclsh
+ BUILD_TCLSH="${TCL_BIN_DIR}"/tclsh
AC_MSG_RESULT([$BUILD_TCLSH])
AC_SUBST(BUILD_TCLSH)
])
@@ -2043,26 +2043,26 @@ dnl # preprocessing tests use only CPPFLAGS.
AS_IF([test "${SHARED_BUILD}" = 1 -a "${SHLIB_SUFFIX}" != ""], [
LIB_SUFFIX=${SHARED_LIB_SUFFIX}
MAKE_LIB='${SHLIB_LD} -o [$]@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
- INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
+ INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE)'
], [
LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
AS_IF([test "$RANLIB" = ""], [
MAKE_LIB='$(STLIB_LD) [$]@ ${OBJS}'
- INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
+ INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE)'
], [
MAKE_LIB='${STLIB_LD} [$]@ ${OBJS} ; ${RANLIB} [$]@'
- INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(LIB_FILE))'
+ INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE) ; (cd "$(LIB_INSTALL_DIR)" ; $(RANLIB) $(LIB_FILE))'
])
])
# Stub lib does not depend on shared/static configuration
AS_IF([test "$RANLIB" = ""], [
MAKE_STUB_LIB='${STLIB_LD} [$]@ ${STUB_LIB_OBJS}'
- INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)'
+ INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) "$(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)"'
], [
MAKE_STUB_LIB='${STLIB_LD} [$]@ ${STUB_LIB_OBJS} ; ${RANLIB} [$]@'
- INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(STUB_LIB_FILE))'
+ INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) "$(LIB_INSTALL_DIR)"/$(STUB_LIB_FILE) ; (cd "$(LIB_INSTALL_DIR)" ; $(RANLIB) $(STUB_LIB_FILE))'
])
# Define TCL_LIBS now that we know what DL_LIBS is.