summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordas <das>2008-03-11 22:33:21 (GMT)
committerdas <das>2008-03-11 22:33:21 (GMT)
commit1e1e566f937cdb6742040e51aa3a1f1f07518d86 (patch)
treeaf4a8a514a1fc2b14f82b0edd272568f0bbe444d
parentde5c5f505cb34caac65e24f2f9b9f62e8982f440 (diff)
downloadtk-1e1e566f937cdb6742040e51aa3a1f1f07518d86.zip
tk-1e1e566f937cdb6742040e51aa3a1f1f07518d86.tar.gz
tk-1e1e566f937cdb6742040e51aa3a1f1f07518d86.tar.bz2
* macosx/GNUmakefile: fix quoting to allow paths to
* macosx/Wish-Common.xcconfig: ${builddir}, ${INSTALL_ROOT} * unix/Makefile.in: and ${TCL_BIN_DIR} to contain * unix/configure.in: spaces. * unix/install-sh: * unix/tcl.m4: * unix/Makefile.in (install-strip): strip non-global symbols from dynamic library.
-rw-r--r--ChangeLog23
-rw-r--r--macosx/GNUmakefile78
-rw-r--r--macosx/Wish-Common.xcconfig13
-rw-r--r--unix/Makefile.in102
-rw-r--r--unix/configure.in36
-rw-r--r--unix/install-sh22
-rw-r--r--unix/tcl.m488
7 files changed, 196 insertions, 166 deletions
diff --git a/ChangeLog b/ChangeLog
index a11509d..a2ae1ed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+2008-03-11 Daniel Steffen <das@users.sourceforge.net>
+
+ * library/demos/knightstour.tcl: Aqua GOOBE.
+ * library/demos/widget:
+
+ * macosx/Wish.xcodeproj/project.pbxproj: add support for Xcode 3.1 and
+ * macosx/Wish.xcodeproj/default.pbxuser: targets for building with
+ * macosx/Wish-Common.xcconfig: gcc-4.2 and llvm-gcc-4.2.
+
+ * generic/tkCanvUtil.c: fix gcc-4.2 warnings.
+
+ * macosx/GNUmakefile: fix quoting to allow paths to
+ * macosx/Wish-Common.xcconfig: ${builddir}, ${INSTALL_ROOT}
+ * unix/Makefile.in: and ${TCL_BIN_DIR} to contain
+ * unix/configure.in: spaces.
+ * unix/install-sh:
+ * unix/tcl.m4:
+
+ * unix/configure: autoconf-2.59
+
+ * unix/Makefile.in (install-strip): strip non-global symbols from
+ dynamic library.
+
2008-03-10 Don Porter <dgp@users.sourceforge.net>
* changes: Updates for 8.5.2 release.
diff --git a/macosx/GNUmakefile b/macosx/GNUmakefile
index 8514f71..771ce4c 100644
--- a/macosx/GNUmakefile
+++ b/macosx/GNUmakefile
@@ -4,12 +4,12 @@
# uses the standard unix build system in tk/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/04/23 21:24:32 das Exp $
+# RCS: @(#) $Id: GNUmakefile,v 1.9 2008/03/11 22:33:22 das Exp $
#
########################################################################################################
@@ -84,6 +84,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
embedded_make_args := EMBEDDED_BUILD=1
@@ -108,15 +112,17 @@ WISH = wish${VERSION}
BUILD_TARGET := all tktest
INSTALL_TARGET := install
-ifneq ($(wildcard ${TCL_BUILD_DIR}/tclConfig.sh),)
+ifneq ($(wildcard $(subst ${space},\ ,${TCL_BUILD_DIR})/tclConfig.sh),)
TCL_DIR := ${TCL_BUILD_DIR}
TCL_FRAMEWORK_DIR := ${TCL_BUILD_DIR}/..
+MAKE_VARS :=
else
TCL_DIR := ${TCL_FRAMEWORK_DIR}/Tcl.framework
TCL_EXE := ${TCLSH_DIR}/tclsh${TCL_VERSION}
-MAKE_VARS = TCL_EXE
+MAKE_VARS := TCL_EXE
export DYLD_FRAMEWORK_PATH := ${TCL_FRAMEWORK_DIR}
endif
+
export CPPROG := cp -p
ifeq (${TK_X11},)
@@ -146,7 +152,7 @@ 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}
#-------------------------------------------------------------------------------------------------------
# locations for custom tk install actions
@@ -168,37 +174,37 @@ TK_FMWK_DIR := ${FMWK_DIR}/${PRODUCT_NAME}.framework/Versions/${VERSION}
# 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}/tkConfig.sh.in Tk-Info.plist.in Wish-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 \
- --with-tcl=${TCL_DIR} \
+ --prefix="${PREFIX}" --bindir="${BINDIR}" --libdir="${LIBDIR}" \
+ --mandir="${MANDIR}" --enable-threads --enable-framework \
+ --with-tcl="${TCL_DIR}" \
${CONFIGURE_ARGS} ${EXTRA_CONFIGURE_ARGS}; else ./config.status; fi
ifneq (${TK_X11},)
- @cd ${OBJ_DIR} && sed -e 's#/Versions/${TCL_VERSION}#/Versions/${VERSION}#' \
+ @cd "${OBJ_DIR}" && sed -e 's#/Versions/${TCL_VERSION}#/Versions/${VERSION}#' \
tkConfig.sh > tkConfig.sh.1 && mv -f tkConfig.sh.1 tkConfig.sh
endif
-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 Tk.framework and wish in ${SYMROOT}
- @cd ${OBJ_DIR} && mkdir -p $(dir ./${LIBDIR}) $(dir ./${BINDIR}) ${SYMROOT} && \
- rm -rf ./${LIBDIR} ./${BINDIR} && ln -fs ${SYMROOT} ./${LIBDIR} && \
- ln -fs ${SYMROOT} ./${BINDIR} && ln -fs ${OBJ_DIR}/tktest ${SYMROOT}
+ @cd "${OBJ_DIR}" && mkdir -p $(dir $(subst ${space},\ ,./${LIBDIR})) $(dir $(subst ${space},\ ,./${BINDIR})) "${SYMROOT}" && \
+ rm -rf "./${LIBDIR}" "./${BINDIR}" && ln -fs "${SYMROOT}" "./${LIBDIR}" && \
+ ln -fs "${SYMROOT}" "./${BINDIR}" && ln -fs "${OBJ_DIR}/tktest" "${SYMROOT}"
ifeq (${TK_X11},)
- @rm -f ${OBJ_DIR}/${BINDIR} && \
- ln -fs Wish.app/Contents/MacOS/Wish ${SYMROOT}/${WISH}
+ @rm -f "${OBJ_DIR}/${BINDIR}" && \
+ ln -fs Wish.app/Contents/MacOS/Wish "${SYMROOT}/${WISH}"
endif
# Create symbolic link to Tcl.framework in ${SYMROOT}if necessary
- @cd ${SYMROOT} && if [ ! -e Tcl.framework -o -L Tcl.framework ]; then \
- rm -f Tcl.framework && ln -s ${TCL_FRAMEWORK_DIR}/Tcl.framework . ; fi
+ @cd "${SYMROOT}" && if [ ! -e Tcl.framework -o -L Tcl.framework ]; then \
+ rm -f Tcl.framework && ln -s "${TCL_FRAMEWORK_DIR}/Tcl.framework" . ; fi
endif
install-${PROJECT}: build-${PROJECT}
@@ -212,7 +218,7 @@ endif
ifeq (${EMBEDDED_BUILD}_${TK_X11},1_)
# workaround bug with 'cp -pRH' on Darwin 6 and earlier
@if [ "`uname -r | awk -F. '{print $$1}'`" -lt 7 ]; then \
- mkdir -p ${TOP_DIR}/{"${TCL_FMWK_DIR}","${TK_FMWK_DIR}"}/PrivateHeaders; fi
+ mkdir -p "${TOP_DIR}"/{"${TCL_FMWK_DIR}","${TK_FMWK_DIR}"}/PrivateHeaders; fi
endif
ifeq (${INSTALL_BUILD},1)
ifeq (${EMBEDDED_BUILD},1)
@@ -228,16 +234,16 @@ else
if [ ! -d usr/lib ]; then mkdir -p usr && ln -fs /usr/lib usr/ && RM_USRLIB=1; fi; \
if [ -n "${TK_X11}" -a ! -d usr/X11R6 ]; then mkdir -p usr && ln -fs /usr/X11R6 usr/ && RM_USRX11=1; fi; \
if [ ! -d System ]; then ln -fs /System . && RM_SYSTEM=1; fi; \
- if [ ! -d ./${LIBDIR}/Tcl.framework ]; then ln -fs ${TCL_FRAMEWORK_DIR}/Tcl.framework ./${LIBDIR}; RM_TCL=1; fi; \
+ if [ ! -d "./${LIBDIR}/Tcl.framework" ]; then ln -fs "${TCL_FRAMEWORK_DIR}/Tcl.framework" "./${LIBDIR}"; RM_TCL=1; fi; \
redo_prebinding -r . "./${TK_FMWK_DIR}/${PRODUCT_NAME}"; \
if [ -z "${TK_X11}" ]; then redo_prebinding -r . "./${TK_FMWK_DIR}/Resources/Wish.app/Contents/MacOS/Wish"; \
else redo_prebinding -r . "./${BINDIR}/${WISH}"; fi; \
if [ -n "$${RM_USRLIB:-}" ]; then rm -f usr/lib; rmdir -p usr 2>&-; fi; \
if [ -n "$${RM_USRX11:-}" ]; then rm -f usr/X11R6; rmdir -p usr 2>&-; fi; \
if [ -n "$${RM_SYSTEM:-}" ]; then rm -f System; fi; \
- if [ -n "$${RM_TCL:-}" ]; then rm -f ./${LIBDIR}/Tcl.framework; fi; fi
+ if [ -n "$${RM_TCL:-}" ]; then rm -f "./${LIBDIR}/Tcl.framework"; fi; fi
# install wish symbolic link
- @ln -fs ${WISH} ${INSTALL_ROOT}${BINDIR}/${wish}
+ @ln -fs ${WISH} "${INSTALL_ROOT}${BINDIR}/${wish}"
endif
endif
ifeq (${BUILD_STYLE}_${EMBEDDED_BUILD},Development_)
@@ -245,20 +251,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
ifeq (${TK_X11},)
ifeq (${EMBEDDED_BUILD},)
# install Wish.app link in APPLICATION_INSTALL_PATH and setup 'Wish Shell' compatibility links
- @cd ${TOP_DIR} && if [ -n "${APP_DIR}" ]; then mkdir -p "./${APP_DIR}" && rm -rf "./${APP_DIR}/Wish.app" && \
- ln -fsh "./$$(echo ${APP_DIR} | sed -e 's#/[^/][^/]*#/..#g')/${FMWK_DIR}/${PRODUCT_NAME}.framework/Resources/Wish.app" "./${APP_DIR}" && \
+ @cd "${TOP_DIR}" && if [ -n "${APP_DIR}" ]; then mkdir -p "./${APP_DIR}" && rm -rf "./${APP_DIR}/Wish.app" && \
+ ln -fsh "./$$(echo "${APP_DIR}" | sed -e 's#/[^/][^/]*#/..#g')/${FMWK_DIR}/${PRODUCT_NAME}.framework/Resources/Wish.app" "./${APP_DIR}" && \
ln -fsh Wish.app "./${APP_DIR}/Wish Shell.app"; fi && \
ln -fsh Wish.app "./${TK_FMWK_DIR}/Resources/Wish Shell.app" && \
ln -fsh Wish "./${TK_FMWK_DIR}/Resources/Wish.app/Contents/MacOS/Wish Shell"
else
# if we are embedding frameworks, move them into the app and fix their install names
- @cd ${TOP_DIR} && \
+ @cd "${TOP_DIR}" && \
rm -rf "./${APP_DIR}/Wish.app" && mkdir -p "./${APP_DIR}" && \
mv -f "./${TK_FMWK_DIR}/Resources/Wish.app" "./${APP_DIR}" && \
ln -fsh Wish.app "./${APP_DIR}/Wish Shell.app" && \
@@ -266,8 +272,8 @@ else
mkdir -p "./${APP_DIR}/Wish.app/Contents/Frameworks" && \
${CPPROG} -RH "./${FMWK_DIR}"/T{cl,k}.framework "./${APP_DIR}/Wish.app/Contents/Frameworks" && \
cd "./${APP_DIR}/Wish.app/Contents" && \
- rm -rf Frameworks/Tcl.framework/{,/Versions/$(TCL_VERSION)}/{Headers,PrivateHeaders,*_debug,lib*.a,*Config.sh} && \
- rm -rf Frameworks/Tk.framework/{,/Versions/$(VERSION)}/{Headers,PrivateHeaders,*_debug,lib*.a,*Config.sh} && \
+ rm -rf Frameworks/Tcl.framework/{,/Versions/${TCL_VERSION}}/{Headers,PrivateHeaders,*_debug,lib*.a,*Config.sh} && \
+ rm -rf Frameworks/Tk.framework/{,/Versions/${VERSION}}/{Headers,PrivateHeaders,*_debug,lib*.a,*Config.sh} && \
fix_install_id ( ) { \
chmod -RH a+w "$$1"; \
install_name_tool -id $$(otool -L "$$1" | awk "/$$2\.framework.*[^:]\$$/ {sub(\"^.*/Frameworks\",\"@executable_path/../Frameworks\",\$$1); print \$$1}") "$$1"; \
@@ -281,21 +287,21 @@ else
fix_install_id Frameworks/Tcl.framework/Tcl Tcl && fix_install_id Frameworks/Tk.framework/Tk Tk && \
fix_install_name MacOS/Wish Tcl && fix_install_name MacOS/Wish Tk
ifeq (${INSTALL_BUILD},1)
- @cd ${TOP_DIR} && rm -rf "./${FMWK_DIR}"/T{cl,k}.framework && rmdir -p "./${FMWK_DIR}" 2>&- || true
+ @cd "${TOP_DIR}" && rm -rf "./${FMWK_DIR}"/T{cl,k}.framework && rmdir -p "./${FMWK_DIR}" 2>&- || true
endif
endif
endif
clean-${PROJECT}: %-${PROJECT}:
${DO_MAKE}
- rm -rf ${SYMROOT}/{${PRODUCT_NAME}.framework,${WISH},tktest}
- 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,${WISH},tktest}
+ 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/Wish-Common.xcconfig b/macosx/Wish-Common.xcconfig
index 59f9812..4736c2c 100644
--- a/macosx/Wish-Common.xcconfig
+++ b/macosx/Wish-Common.xcconfig
@@ -4,27 +4,28 @@
// This file contains the Xcode build settings comon to all
// project configurations in Wish.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: Wish-Common.xcconfig,v 1.8 2007/12/13 15:27:08 dgp Exp $
+// RCS: @(#) $Id: Wish-Common.xcconfig,v 1.9 2008/03/11 22:33:22 das Exp $
//
-HEADER_SEARCH_PATHS = $(TK_SRCROOT)/generic $(TK_SRCROOT)/xlib $(DERIVED_FILE_DIR)/tcl $(DERIVED_FILE_DIR)/tk $(HEADER_SEARCH_PATHS)
+HEADER_SEARCH_PATHS = $(TK_SRCROOT)/generic $(TK_SRCROOT)/xlib "$(DERIVED_FILE_DIR)/tcl" "$(DERIVED_FILE_DIR)/tk" $(HEADER_SEARCH_PATHS)
REZ_SEARCH_PATHS = $(TK_SRCROOT)/generic $(TCL_SRCROOT)/generic $(REZ_SEARCH_PATHS)
-OTHER_LDFLAGS = -headerpad_max_install_names -sectcreate __TEXT __info_plist $(DERIVED_FILE_DIR)/tk/Wish-Info.plist $(OTHER_LDFLAGS)
-OTHER_LDFLAGS_AQUA = -sectcreate __TEXT __tk_rsrc $(REZ_COLLECTOR_DIR)/$(PRODUCT_NAME).rsrc
+OTHER_LDFLAGS = -headerpad_max_install_names -sectcreate __TEXT __info_plist "$(DERIVED_FILE_DIR)/tk/Wish-Info.plist" $(OTHER_LDFLAGS)
+OTHER_LDFLAGS_AQUA = -sectcreate __TEXT __tk_rsrc "$(REZ_COLLECTOR_DIR)/$(PRODUCT_NAME).rsrc"
INSTALL_PATH = "$(BINDIR)"
GCC_PREFIX_HEADER = $(DERIVED_FILE_DIR)/tk/tkConfig.h
-OTHER_CFLAGS = -imacros $(DERIVED_FILE_DIR)/tcl/tclConfig.h $(OTHER_CFLAGS)
+OTHER_CFLAGS = -imacros "$(DERIVED_FILE_DIR)/tcl/tclConfig.h" $(OTHER_CFLAGS)
GCC_GENERATE_DEBUGGING_SYMBOLS = YES
GCC_NO_COMMON_BLOCKS = YES
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)
REZ_RESOURCE_MAP_READ_ONLY = YES
diff --git a/unix/Makefile.in b/unix/Makefile.in
index 66a2277..0742a4f 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.138 2007/12/13 15:28:49 dgp Exp $
+# RCS: @(#) $Id: Makefile.in,v 1.139 2008/03/11 22:33:22 das Exp $
# Current Tk version; used in various names.
@@ -210,7 +210,7 @@ TCL_EXE = @TCLSH_PROG@
# with the distribution, which is slower but guaranteed to work.
INSTALL_STRIP_PROGRAM = -s
-INSTALL_STRIP_LIBRARY = -S -S
+INSTALL_STRIP_LIBRARY = -S -x
INSTALL = @srcdir@/install-sh -c
INSTALL_PROGRAM = ${INSTALL}
@@ -555,7 +555,7 @@ PRIVATE_HDRS = $(GENERIC_DIR)/tkInt.h $(GENERIC_DIR)/tkIntDecls.h \
DEMOPROGS = browse hello ixset rmt rolodex square tcolor timer widget
SHELL_ENV = \
- @LD_LIBRARY_PATH_VAR@=`pwd`:${TCL_BIN_DIR}:$${@LD_LIBRARY_PATH_VAR@}; \
+ @LD_LIBRARY_PATH_VAR@="`pwd`:${TCL_BIN_DIR}:$${@LD_LIBRARY_PATH_VAR@}"; \
export @LD_LIBRARY_PATH_VAR@; \
TCL_LIBRARY=@TCL_SRC_DIR@/library; export TCL_LIBRARY; \
TK_LIBRARY=@TK_SRC_DIR@/library; export TK_LIBRARY;
@@ -614,7 +614,7 @@ wish: $(WISH_OBJS) $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) @APP_RSRC_FILE@
# Tk shared libraries.
tktest: $(TKTEST_OBJS) $(TK_LIB_FILE)
- $(MAKE) tktest-real LIB_RUNTIME_DIR=`pwd`:$(TCL_BIN_DIR)
+ $(MAKE) tktest-real LIB_RUNTIME_DIR="`pwd`:$(TCL_BIN_DIR)"
tktest-real:
${CC} ${CFLAGS} ${LDFLAGS} $(TKTEST_OBJS) @TK_BUILD_LIB_SPEC@ \
@@ -670,7 +670,7 @@ demo:
# This target can be used to run wish inside either gdb or insight
gdb: wish
- @echo "set env @LD_LIBRARY_PATH_VAR@=`pwd`:${TCL_BIN_DIR}:$${@LD_LIBRARY_PATH_VAR@}" > gdb.run
+ @echo "set env @LD_LIBRARY_PATH_VAR@=\"`pwd`:${TCL_BIN_DIR}:$${@LD_LIBRARY_PATH_VAR@}\"" > gdb.run
@echo "set env TCL_LIBRARY=@TCL_SRC_DIR@/library" >> gdb.run
@echo "set env TK_LIBRARY=@TK_SRC_DIR@/library" >> gdb.run
gdb ./wish --command=gdb.run
@@ -690,12 +690,12 @@ install-strip:
# possible (e.g. if installing as root).
install-binaries: $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) $(TK_BUILD_EXP_FILE) wish
- @for i in $(LIB_INSTALL_DIR) $(BIN_INSTALL_DIR) $(PKG_INSTALL_DIR); \
+ @for i in "$(LIB_INSTALL_DIR)" "$(BIN_INSTALL_DIR)" "$(PKG_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;
@@ -704,27 +704,27 @@ install-binaries: $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) $(TK_BUILD_EXP_FILE) wish
fi
@if test "x$(TK_SHARED_BUILD)" = "x1"; then \
echo "Creating package index $(PKG_INDEX)"; \
- rm -f $(PKG_INDEX); \
+ rm -f "$(PKG_INDEX)"; \
(\
echo "if {[catch {package present Tcl\
$(TCLVERSION)$(TCLPATCHL)}]} { return }";\
relative=`echo | awk '{ORS=" "; split("$(TK_PKG_DIR)",a,"/"); for (f in a) {print ".."}}'`;\
echo "package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL)\
[list load [file join \$$dir $${relative}$(TK_LIB_FILE)] Tk]";\
- ) > $(PKG_INDEX); \
+ ) > "$(PKG_INDEX)"; \
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 "$(TK_BUILD_EXP_FILE)" != ""; then \
echo "Installing $(TK_EXP_FILE) to $(LIB_INSTALL_DIR)/"; \
$(INSTALL_DATA) $(TK_BUILD_EXP_FILE) \
- $(LIB_INSTALL_DIR)/$(TK_EXP_FILE); \
+ "$(LIB_INSTALL_DIR)"/$(TK_EXP_FILE); \
fi
@echo "Installing wish as $(BIN_INSTALL_DIR)/wish$(VERSION)"
- @$(INSTALL_PROGRAM) wish $(BIN_INSTALL_DIR)/wish$(VERSION)
+ @$(INSTALL_PROGRAM) wish "$(BIN_INSTALL_DIR)"/wish$(VERSION)
@echo "Installing tkConfig.sh to $(LIB_INSTALL_DIR)/"
- @$(INSTALL_DATA) tkConfig.sh $(LIB_INSTALL_DIR)/tkConfig.sh
+ @$(INSTALL_DATA) tkConfig.sh "$(LIB_INSTALL_DIR)"/tkConfig.sh
@if test "$(STUB_LIB_FILE)" != "" ; then \
echo "Installing $(STUB_LIB_FILE) to $(LIB_INSTALL_DIR)/"; \
@INSTALL_STUB_LIB@ ; \
@@ -733,15 +733,15 @@ install-binaries: $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) $(TK_BUILD_EXP_FILE) wish
install-libraries: libraries
@if test "$(@TK_WINDOWINGSYSTEM@_XLIB_HDRS)" != ""; then \
- XLIB_INCLUDE_INSTALL_DIR=$(INCLUDE_INSTALL_DIR)/X11; fi; \
- for i in $(INCLUDE_INSTALL_DIR) $${XLIB_INCLUDE_INSTALL_DIR} \
- $(SCRIPT_INSTALL_DIR) $(SCRIPT_INSTALL_DIR)/images \
- $(SCRIPT_INSTALL_DIR)/msgs $(SCRIPT_INSTALL_DIR)/ttk; \
+ XLIB_INCLUDE_INSTALL_DIR="$(INCLUDE_INSTALL_DIR)"/X11; fi; \
+ for i in "$(INCLUDE_INSTALL_DIR)" "$${XLIB_INCLUDE_INSTALL_DIR}" \
+ "$(SCRIPT_INSTALL_DIR)" "$(SCRIPT_INSTALL_DIR)"/images \
+ "$(SCRIPT_INSTALL_DIR)"/msgs "$(SCRIPT_INSTALL_DIR)"/ttk; \
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;
@@ -751,49 +751,49 @@ install-libraries: libraries
@echo "Installing header files";
@for i in $(PUBLIC_HDRS); \
do \
- $(INSTALL_DATA) $$i $(INCLUDE_INSTALL_DIR); \
+ $(INSTALL_DATA) $$i "$(INCLUDE_INSTALL_DIR)"; \
done;
@list='$(@TK_WINDOWINGSYSTEM@_XLIB_HDRS)'; for i in $$list ; \
do \
- $(INSTALL_DATA) $$i $(INCLUDE_INSTALL_DIR)/X11; \
+ $(INSTALL_DATA) $$i "$(INCLUDE_INSTALL_DIR)"/X11; \
done;
@echo "Installing library files to $(SCRIPT_INSTALL_DIR)";
@for i in $(TOP_DIR)/library/*.tcl $(GENERIC_DIR)/prolog.ps \
$(TOP_DIR)/library/tclIndex $(UNIX_DIR)/tkAppInit.c; \
do \
- $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR); \
+ $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"; \
done;
@echo "Installing library ttk directory";
@for i in $(TOP_DIR)/library/ttk/*.tcl; \
do \
if [ -f $$i ] ; then \
- $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR)/ttk; \
+ $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/ttk; \
fi; \
done;
@echo "Installing library images directory";
@for i in $(TOP_DIR)/library/images/*; \
do \
if [ -f $$i ] ; then \
- $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR)/images; \
+ $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/images; \
fi; \
done;
@echo "Installing translation directory";
@for i in $(TOP_DIR)/library/msgs/*.msg; \
do \
if [ -f $$i ] ; then \
- $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR)/msgs; \
+ $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/msgs; \
fi; \
done;
install-demos:
- @for i in $(SCRIPT_INSTALL_DIR) \
- $(SCRIPT_INSTALL_DIR)/demos \
- $(SCRIPT_INSTALL_DIR)/demos/images ; \
+ @for i in "$(SCRIPT_INSTALL_DIR)" \
+ "$(SCRIPT_INSTALL_DIR)"/demos \
+ "$(SCRIPT_INSTALL_DIR)"/demos/images ; \
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;
@@ -802,18 +802,18 @@ install-demos:
do \
if [ -f $$i ] ; then \
sed -e '3 s|exec wish|exec wish$(VERSION)|' \
- $$i > $(SCRIPT_INSTALL_DIR)/demos/`basename $$i`; \
+ $$i > "$(SCRIPT_INSTALL_DIR)"/demos/`basename $$i`; \
fi; \
done;
@for i in $(DEMOPROGS); \
do \
- chmod 755 $(SCRIPT_INSTALL_DIR)/demos/$$i; \
+ chmod 755 "$(SCRIPT_INSTALL_DIR)"/demos/$$i; \
done;
@echo "Installing demo images";
@for i in $(TOP_DIR)/library/demos/images/*; \
do \
if [ -f $$i ] ; then \
- $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR)/demos/images; \
+ $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/demos/images; \
fi; \
done;
@@ -821,38 +821,38 @@ install-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;
@@ -862,10 +862,10 @@ install-private-headers: libraries
@echo "Installing private header files";
@for i in $(PRIVATE_HDRS); \
do \
- $(INSTALL_DATA) $$i $(PRIVATE_INCLUDE_INSTALL_DIR); \
+ $(INSTALL_DATA) $$i "$(PRIVATE_INCLUDE_INSTALL_DIR)"; \
done;
@if test -f tkConfig.h; then\
- $(INSTALL_DATA) tkConfig.h $(PRIVATE_INCLUDE_INSTALL_DIR); \
+ $(INSTALL_DATA) tkConfig.h "$(PRIVATE_INCLUDE_INSTALL_DIR)"; \
fi;
Makefile: $(UNIX_DIR)/Makefile.in
@@ -1677,7 +1677,7 @@ BUILD_HTML = \
@if test -f "$(BUILD_TCLSH)"; then \
$(SHELL_ENV) TCLSH="$(BUILD_TCLSH)"; else \
TCLSH="$(TCL_EXE)"; fi ;\
- $${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 0244088..98abba4 100644
--- a/unix/configure.in
+++ b/unix/configure.in
@@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to
dnl generate the file "configure", which is run during Tk installation
dnl to configure the system for the local environment.
#
-# RCS: @(#) $Id: configure.in,v 1.150 2008/02/04 17:32:40 dgp Exp $
+# RCS: @(#) $Id: configure.in,v 1.151 2008/03/11 22:33:23 das Exp $
AC_INIT([tk],[8.5])
AC_PREREQ(2.59)
@@ -58,8 +58,8 @@ if test "${exec_prefix}" = "NONE"; then
exec_prefix=$prefix
fi
# Make sure srcdir is fully qualified!
-srcdir=`cd $srcdir ; pwd`
-TK_SRC_DIR=`cd $srcdir/..; pwd`
+srcdir="`cd "$srcdir" ; pwd`"
+TK_SRC_DIR="`cd "$srcdir"/..; pwd`"
#------------------------------------------------------------------------
# Compress and/or soft link the manpages?
@@ -573,7 +573,7 @@ WISH_RSRC_FILE='wish$(VERSION).rsrc'
if test "`uname -s`" = "Darwin" ; then
SC_ENABLE_FRAMEWORK
TK_SHLIB_LD_EXTRAS="-compatibility_version ${TK_VERSION} -current_version ${TK_VERSION}`echo ${TK_PATCH_LEVEL} | awk ['{match($0, "\\\.[0-9]+"); print substr($0,RSTART,RLENGTH)}']`"
- TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -install_name ${DYLIB_INSTALL_DIR}/${TK_LIB_FILE} -unexported_symbols_list $$(f=$(TCL_STUB_LIB_FILE).E && nm -gjp $(TCL_BIN_DIR)/$(TCL_STUB_LIB_FILE) | grep ^_[[^_]] > $$f && echo $$f)'
+ TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -install_name "${DYLIB_INSTALL_DIR}"/${TK_LIB_FILE} -unexported_symbols_list $$(f=$(TCL_STUB_LIB_FILE).E && nm -gjp "$(TCL_BIN_DIR)"/$(TCL_STUB_LIB_FILE) | grep ^_[[^_]] > $$f && echo $$f)'
echo "$LDFLAGS " | grep -q -- '-prebind ' && TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -seg1addr 0xb000000'
TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tk-Info.plist'
EXTRA_WISH_LIBS='-sectcreate __TEXT __info_plist Wish-Info.plist'
@@ -602,8 +602,8 @@ if test "$FRAMEWORK_BUILD" = "1" ; then
fi
TK_LIB_FILE="Tk"
TK_LIB_FLAG="-framework Tk"
- TK_BUILD_LIB_SPEC="-F`pwd` -framework Tk"
- TK_LIB_SPEC="-F${libdir} -framework Tk"
+ TK_BUILD_LIB_SPEC="-F\"`pwd`\" -framework Tk"
+ TK_LIB_SPEC="-F\"${libdir}\" -framework Tk"
libdir="${libdir}/Tk.framework/Versions/\${VERSION}"
TK_LIBRARY="${libdir}/Resources/Scripts"
TK_PKG_DIR="Resources/Scripts"
@@ -613,7 +613,7 @@ if test "$FRAMEWORK_BUILD" = "1" ; then
PRIVATE_INCLUDE_DIR="${libdir}/PrivateHeaders"
HTML_DIR="${libdir}/Resources/Documentation/Reference/Tk"
EXTRA_INSTALL="install-private-headers html-tk"
- EXTRA_BUILD_HTML='@ln -fs contents.htm $(HTML_INSTALL_DIR)/TkTOC.html'
+ EXTRA_BUILD_HTML='@ln -fs contents.htm "$(HTML_INSTALL_DIR)"/TkTOC.html'
EXTRA_INSTALL_BINARIES='@echo "Installing Info.plist to $(LIB_INSTALL_DIR)/Resources" && mkdir -p "$(LIB_INSTALL_DIR)/Resources" && $(INSTALL_DATA) Tk-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"'
if test $tk_aqua = yes; then
@@ -639,18 +639,18 @@ else
else
TK_LIB_FLAG="-ltk`echo ${TK_VERSION} | tr -d .`"
fi
- TK_BUILD_LIB_SPEC="-L`pwd` ${TK_LIB_FLAG}"
- TK_LIB_SPEC="-L${libdir} ${TK_LIB_FLAG}"
+ TK_BUILD_LIB_SPEC="-L\"`pwd`\" ${TK_LIB_FLAG}"
+ TK_LIB_SPEC="-L\"${libdir}\" ${TK_LIB_FLAG}"
else
TK_BUILD_EXP_FILE="lib.exp"
eval "TK_EXP_FILE=libtk${TCL_EXPORT_FILE_SUFFIX}"
if test "$GCC" = "yes" ; then
- TK_BUILD_LIB_SPEC="-Wl,-bI:`pwd`/${TK_BUILD_EXP_FILE} -L`pwd`"
- TK_LIB_SPEC="-Wl,-bI:${libdir}/${TK_EXP_FILE} -L`pwd`"
+ TK_BUILD_LIB_SPEC="-Wl,-bI:\"`pwd`\"/${TK_BUILD_EXP_FILE} -L\"`pwd`\""
+ TK_LIB_SPEC="-Wl,-bI:\"${libdir}\"/${TK_EXP_FILE} -L\"`pwd`\""
else
- TK_BUILD_LIB_SPEC="-bI:`pwd`/${TK_BUILD_EXP_FILE}"
- TK_LIB_SPEC="-bI:${libdir}/${TK_EXP_FILE}"
+ TK_BUILD_LIB_SPEC="-bI:\"`pwd`\"/${TK_BUILD_EXP_FILE}"
+ TK_LIB_SPEC="-bI:\"${libdir}\"/${TK_EXP_FILE}"
fi
fi
fi
@@ -662,9 +662,9 @@ if test $tk_aqua = yes; then
REZ=/Developer/Tools/Rez
REZ_FLAGS='-d "SystemSevenOrLater=1" -useDF -ro'
if test "$SHARED_BUILD" = 0; then
- EXTRA_INSTALL_BINARIES='@echo "Installing $(TK_RSRC_FILE) to $(LIB_INSTALL_DIR)" && $(INSTALL_DATA) $(TK_RSRC_FILE) $(LIB_INSTALL_DIR)'
- TK_BUILD_LIB_SPEC="$TK_BUILD_LIB_SPEC -sectcreate __TEXT __tk_rsrc `pwd`/\${TK_RSRC_FILE}"
- TK_LIB_SPEC="$TK_LIB_SPEC -sectcreate __TEXT __tk_rsrc ${libdir}/\${TK_RSRC_FILE}"
+ EXTRA_INSTALL_BINARIES='@echo "Installing $(TK_RSRC_FILE) to $(LIB_INSTALL_DIR)" && $(INSTALL_DATA) $(TK_RSRC_FILE) "$(LIB_INSTALL_DIR)"'
+ TK_BUILD_LIB_SPEC="$TK_BUILD_LIB_SPEC -sectcreate __TEXT __tk_rsrc \"`pwd`\"/\${TK_RSRC_FILE}"
+ TK_LIB_SPEC="$TK_LIB_SPEC -sectcreate __TEXT __tk_rsrc \"${libdir}\"/\${TK_RSRC_FILE}"
else
TK_SHLIB_LD_EXTRAS="$TK_SHLIB_LD_EXTRAS -sectcreate __TEXT __tk_rsrc \${TK_RSRC_FILE}"
fi
@@ -685,8 +685,8 @@ else
TK_STUB_LIB_FLAG="-ltkstub`echo ${TK_VERSION} | tr -d .`"
fi
-TK_BUILD_STUB_LIB_SPEC="-L`pwd` ${TK_STUB_LIB_FLAG}"
-TK_STUB_LIB_SPEC="-L${TK_STUB_LIB_DIR} ${TK_STUB_LIB_FLAG}"
+TK_BUILD_STUB_LIB_SPEC="-L\"`pwd`\" ${TK_STUB_LIB_FLAG}"
+TK_STUB_LIB_SPEC="-L\"${TK_STUB_LIB_DIR}\" ${TK_STUB_LIB_FLAG}"
TK_BUILD_STUB_LIB_PATH="`pwd`/${TK_STUB_LIB_FILE}"
TK_STUB_LIB_PATH="${TK_STUB_LIB_DIR}/${TK_STUB_LIB_FILE}"
diff --git a/unix/install-sh b/unix/install-sh
index a9a1f27..8cff938 100644
--- 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.