summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog25
-rw-r--r--macosx/Makefile38
-rw-r--r--macosx/Wish.pbproj/project.pbxproj52
-rwxr-xr-xmacosx/buildTkConfig.tcl44
-rw-r--r--macosx/tkMacOSXNotify.c3
-rw-r--r--macosx/tkMacOSXPort.h84
-rw-r--r--unix/Makefile.in10
-rw-r--r--unix/install-sh5
8 files changed, 215 insertions, 46 deletions
diff --git a/ChangeLog b/ChangeLog
index 50ccfce..89dd79c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,28 @@
+2002-09-26 Daniel Steffen <das@users.sourceforge.net>
+
+ * macosx/Makefile: preserve environment value of INSTALL_ROOT.
+ When embedding only use deployment build. Force relink before
+ embedded build to ensure new linker flags are picked up.
+
+ * macosx/buildTkConfig.tcl (new):
+ * macosx/Wish.pbproj/project.pbxproj: synthesize tkConfig.sh
+ based on tclConfig.sh in Tcl.framework and tkConfig.sh.in.
+ Add symbolic links to debug lib, stub libs and tkConfig.sh
+ in framework toplevel. Made tkIntXlibDecls.h a public header
+ since Headers/X11/Xlib.h includes it. Install wish8.4 script
+ that runs "Wish Shell.app" and corresponding wish link.
+ Use tcl headers from built Tcl.framework instead of from tcl
+ source directory.
+
+ * macosx/tkMacOSXPort.h: added missing standard unix includes
+ and defines, similarly to tkUnixPort.h.
+ * macosx/tkMacOSXNotify.c: removed dependency on internal tcl
+ header "tclPort.h"
+
+ * unix/Makefile.in:
+ * unix/install-sh: copied support for 'install-strip' target
+ over from tcl/unix/{Makefile.in,install-sh}
+
2002-09-22 Jim Ingham <jingham@apple.com>
* macosx/tkMacOSXScrlbr.c (UpdateControlValue): HiliteControl
diff --git a/macosx/Makefile b/macosx/Makefile
index 920f43e..64e1ca6 100644
--- a/macosx/Makefile
+++ b/macosx/Makefile
@@ -3,13 +3,13 @@
# Simple makefile for building on Mac OS X with the
# Project Builder command line tool 'pbxbuild'
#
-# RCS: @(#) $Id: Makefile,v 1.3 2002/09/10 09:59:16 das Exp $
+# RCS: @(#) $Id: Makefile,v 1.4 2002/09/26 17:07:33 das Exp $
#
################################################################################
-INSTALL_ROOT =
+INSTALL_ROOT ?=
-BUILD_DIR = ../../build
+BUILD_DIR ?= ${CURDIR}/../../build
TARGET = Wish
@@ -33,9 +33,9 @@ all: develop deploy
install: install-develop install-deploy
-embedded: embedded-develop embedded-deploy
+embedded: embedded-deploy
-install-embedded: install-embedded-develop install-embedded-deploy cleanup-embedded
+install-embedded: install-embedded-deploy cleanup-embedded forceRelink forceRelinkTcl
clean: clean-develop clean-deploy
@@ -53,13 +53,13 @@ install-develop:
install-deploy:
${DEPBUILD} install ${INSTALLOPTS}
-embedded-develop:
+embedded-develop: forceRelink
${DEVBUILD} ${EMBEDDEDOPTS}
-embedded-deploy:
+embedded-deploy: forceRelink
${DEPBUILD} ${EMBEDDEDOPTS}
-install-embedded-develop:
+install-embedded-develop:
${DEVBUILD} install ${INSTALLOPTS} ${EMBEDDEDOPTS}
install-embedded-deploy:
@@ -73,14 +73,28 @@ clean-deploy:
################################################################################
+forceRelink:
+ @-cd ${BUILD_DIR}; \
+ rm -rf Tk.framework Wish\ Shell.app libtkstub8.4.a
+
+forceRelinkTcl:
+ @-cd ${BUILD_DIR}; \
+ rm -rf Tcl.framework tclsh8.4 \
+ Development.build/Tcl.build/Tcl Deployment.build/Tcl.build/Tcl
+
cleanup-embedded:
- @( \
- cd ${INSTALL_ROOT}; \
+ @-cd ${INSTALL_ROOT}; \
rm -f Frameworks; \
rm -rf @executable_path; \
rm -rf Library/Frameworks/Tcl.framework; \
rm -rf Library/Frameworks/Tk.framework; \
- if [ -d Library/Frameworks ]; then rmdir -p Library/Frameworks; fi; \
- )
+ rmdir -p Library/Frameworks 2>&-;
+
+################################################################################
+
+.PHONY: all install embedded clean develop deploy install-develop install-deploy \
+embedded-develop embedded-deploy install-embedded-develop install-embedded-deploy \
+clean-develop clean-deploy forceRelinkTcl \
+cleanup-embedded
################################################################################
diff --git a/macosx/Wish.pbproj/project.pbxproj b/macosx/Wish.pbproj/project.pbxproj
index a62d2e3..ace6258 100644
--- a/macosx/Wish.pbproj/project.pbxproj
+++ b/macosx/Wish.pbproj/project.pbxproj
@@ -112,7 +112,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "if [ \"${BUILD_STYLE}\" = \"Development\" ]; then\n\t# keep copy of debug library around, so that\n\t# Deployment build can be installed on top\n\t# of Development build without overwriting it\n\tcd \"${TARGET_BUILD_DIR}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}/Versions/${FRAMEWORK_VERSION}\"\n\tcp -fp \"${PRODUCT_NAME}\" \"${PRODUCT_NAME}_debug\"\n\n\t# force Deployment build to be relinked next time\n\tif [ -f \"${OBJROOT}/Deployment.build/${PROJECT_NAME}.build/${TARGET_NAME}.build/Objects-normal/LinkFileList\" ]; then\n\t touch -t `date -r \\`expr \\\\\\`date +\"%s\"\\\\\\` + 30\\` +\"%Y%m%d%H%M.%S\"` \"${OBJROOT}/Deployment.build/${PROJECT_NAME}.build/${TARGET_NAME}.build/Objects-normal/LinkFileList\"\n\tfi\nelse\n\t# force Development build to be relinked next time\n\tif [ -f \"${OBJROOT}/Development.build/${PROJECT_NAME}.build/${TARGET_NAME}.build/Objects-normal/LinkFileList\" ]; then\n\t touch -t `date -r \\`expr \\\\\\`date +\"%s\"\\\\\\` + 30\\` +\"%Y%m%d%H%M.%S\"` \"${OBJROOT}/Development.build/${PROJECT_NAME}.build/${TARGET_NAME}.build/Objects-normal/LinkFileList\"\n\tfi\nfi";
+ shellScript = "if [ \"${BUILD_STYLE}\" = \"Development\" ]; then\n\t# keep copy of debug library around, so that\n\t# Deployment build can be installed on top\n\t# of Development build without overwriting it\n\tcd \"${TARGET_BUILD_DIR}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}/Versions/${FRAMEWORK_VERSION}\"\n\tcp -fp \"${PRODUCT_NAME}\" \"${PRODUCT_NAME}_debug\"\n\tln -fs \"Versions/Current/${PRODUCT_NAME}_debug\" ../..\n\tcp -fp \"libtkstub${FRAMEWORK_VERSION}.a\" \"libtkstub${FRAMEWORK_VERSION}g.a\"\n\n\t# force Deployment build to be relinked next time\n\tif [ -f \"${OBJROOT}/Deployment.build/${PROJECT_NAME}.build/${TARGET_NAME}.build/Objects-normal/LinkFileList\" ]; then\n\t touch -t `date -r \\`expr \\\\\\`date +\"%s\"\\\\\\` + 30\\` +\"%Y%m%d%H%M.%S\"` \"${OBJROOT}/Deployment.build/${PROJECT_NAME}.build/${TARGET_NAME}.build/Objects-normal/LinkFileList\"\n\tfi\nelse\n\t# force Development build to be relinked next time\n\tif [ -f \"${OBJROOT}/Development.build/${PROJECT_NAME}.build/${TARGET_NAME}.build/Objects-normal/LinkFileList\" ]; then\n\t touch -t `date -r \\`expr \\\\\\`date +\"%s\"\\\\\\` + 30\\` +\"%Y%m%d%H%M.%S\"` \"${OBJROOT}/Development.build/${PROJECT_NAME}.build/${TARGET_NAME}.build/Objects-normal/LinkFileList\"\n\tfi\nfi\n\n# fixup Framework structure\ncd \"${TARGET_BUILD_DIR}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}/Versions/${FRAMEWORK_VERSION}\"\nln -fs `ls libtkstub* | sed -e 's|.*|Versions/Current/&|'` ../..\nln -fs \"Resources/tkConfig.sh\" ../..\nranlib libtkstub${FRAMEWORK_VERSION}*.a";
};
F537552A016C352C01DC9062 = {
buildStyles = (
@@ -1355,9 +1355,9 @@
F5B1FC08016FFE3501DC9062,
F51D903F018149BD01DC9062,
F548F8C80313C9E0016F146B,
+ F5C1D51901B88F9A01DC9062,
F52D38C5031F4259016F146B,
F5877FBC031FA968016F146B,
- F5C1D51901B88F9A01DC9062,
);
buildSettings = {
DYLIB_COMPATIBILITY_VERSION = 8.4;
@@ -1366,14 +1366,15 @@
FRAMEWORK_SEARCH_PATHS = "\"$(SYMROOT)\"";
FRAMEWORK_VERSION = 8.4;
GLOBAL_CFLAGS = "`source \"${SYMROOT}/Tcl.framework/Resources/tclConfig.sh\"; echo $${}{TCL_EXTRA_CFLAGS} $${}{TCL_DEFS} | sed -e 's|\\\\\\\\\\\\\\\"|\\\"|g' | sed -e 's| -DTCL_WIDE_INT_TYPE=long. long||'` -U_REENTRANT";
- HEADER_SEARCH_PATHS = "../../tcl/generic ../../tcl/unix ../bitmaps ../generic ../xlib";
+ HEADER_SEARCH_PATHS = "\"$(SYMROOT)/Tcl.framework/Headers\" \"$(SYMROOT)/Tcl.framework/PrivateHeaders\" ../bitmaps ../generic ../xlib";
INSTALL_PATH = "${DYLIB_INSTALL_PATH}";
LIBRARY_SEARCH_PATHS = "";
OPTIMIZATION_CFLAGS = "-O0";
OTHER_CFLAGS = "-DMAC_OSX_TK -DTCL_WIDE_INT_TYPE=\"long long\"";
OTHER_LDFLAGS = "-seg1addr 0xb000000";
OTHER_LIBTOOL_FLAGS = "";
- OTHER_REZFLAGS = "-i \"../../tcl/generic\" -i \"../generic\"";
+ OTHER_REZFLAGS = "-i \"$(SYMROOT)/Tcl.framework/Headers\" -i \"../generic\"";
+ PRECOMPILE_PREFIX_HEADER = YES;
PRINCIPAL_CLASS = "";
PRODUCT_NAME = Tk;
SECTORDER_FLAGS = "";
@@ -1381,7 +1382,7 @@
TK_MINOR_VERSION = 4;
TK_PATCH_LEVEL = .0;
TK_VERSION = 8.4;
- USE_GCC3_PFE_SUPPORT = NO;
+ USE_GCC3_PFE_SUPPORT = YES;
WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
WRAPPER_EXTENSION = framework;
};
@@ -1732,7 +1733,7 @@ MacOS X Port by Jim Ingham &lt;jingham@apple.com&gt; &amp; Ian Reid, Copyright Â
isa = PBXBuildFile;
settings = {
ATTRIBUTES = (
- Private,
+ Public,
);
};
};
@@ -2745,14 +2746,15 @@ MacOS X Port by Jim Ingham &lt;jingham@apple.com&gt; &amp; Ian Reid, Copyright Â
);
buildSettings = {
FRAMEWORK_SEARCH_PATHS = "\"$(SYMROOT)\"";
+ FRAMEWORK_VERSION = 8.4;
GLOBAL_CFLAGS = "`source \"${SYMROOT}/Tcl.framework/Resources/tclConfig.sh\"; echo $${}{TCL_EXTRA_CFLAGS} $${}{TCL_DEFS} | sed -e 's|\\\\\\\\\\\\\\\"|\\\"|g' | sed -e 's| -DTCL_WIDE_INT_TYPE=long. long||'` -U_REENTRANT";
- HEADER_SEARCH_PATHS = "../../tcl/generic ../../tcl/unix ../generic ../xlib";
+ HEADER_SEARCH_PATHS = "\"$(SYMROOT)/Tcl.framework/Headers\" \"$(SYMROOT)/Tcl.framework/PrivateHeaders\" ../generic ../xlib";
INSTALL_PATH = /Applications/Utilities;
LIBRARY_SEARCH_PATHS = "";
OPTIMIZATION_CFLAGS = "-O0";
OTHER_CFLAGS = "-DMAC_OSX_TK -DTCL_WIDE_INT_TYPE=\"long long\"";
OTHER_LDFLAGS = "-sectcreate __TEXT __info_plist \"$TEMP_DIR/Info.plist\"";
- OTHER_REZFLAGS = "-i \"../../tcl/generic\" -i \"../generic\"";
+ OTHER_REZFLAGS = "-i \"$(SYMROOT)/Tcl.framework/Headers\" -i \"../generic\"";
PRODUCT_NAME = "Wish Shell";
SECTORDER_FLAGS = "";
USE_GCC3_PFE_SUPPORT = NO;
@@ -2923,23 +2925,16 @@ MacOS X Port by Jim Ingham &lt;jingham@apple.com&gt; &amp; Ian Reid, Copyright Â
isa = PBXFrameworksBuildPhase;
runOnlyForDeploymentPostprocessing = 0;
};
- F548F8CD0313CEF0016F146B = {
- buildActionMask = 2147483647;
- files = (
- );
- isa = PBXRezBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
F548F8CE0313CEF0016F146B = {
buildPhases = (
F548F8CA0313CEF0016F146B,
F548F8CB0313CEF0016F146B,
F548F8CC0313CEF0016F146B,
- F548F8CD0313CEF0016F146B,
+ F59D847903390D7E016F146B,
);
buildSettings = {
GLOBAL_CFLAGS = "`source \"${SYMROOT}/Tcl.framework/Resources/tclConfig.sh\"; echo $${}{TCL_EXTRA_CFLAGS} $${}{TCL_DEFS} | sed -e 's|\\\\\\\\\\\\\\\"|\\\"|g' | sed -e 's| -DTCL_WIDE_INT_TYPE=long. long||'` -U_REENTRANT";
- HEADER_SEARCH_PATHS = "../../tcl/generic ../../tcl/unix ../generic ../xlib";
+ HEADER_SEARCH_PATHS = "\"$(SYMROOT)/Tcl.framework/Headers\" \"$(SYMROOT)/Tcl.framework/PrivateHeaders\" ../generic ../xlib";
LIBRARY_STYLE = STATIC;
OPTIMIZATION_CFLAGS = "-O0";
OTHER_CFLAGS = "-DMAC_OSX_TK -DTCL_WIDE_INT_TYPE=\"long long\"";
@@ -3077,7 +3072,7 @@ MacOS X Port by Jim Ingham &lt;jingham@apple.com&gt; &amp; Ian Reid, Copyright Â
);
runOnlyForDeploymentPostprocessing = 1;
shellPath = /bin/sh;
- shellScript = "# redo prebinding\ncd \"${INSTALL_ROOT}\"\nif [ ! -d usr/lib ]; then mkdir -p usr; ln -fs /usr/lib usr/; RM_USRLIB=1; fi\nif [ ! -d System ]; then ln -fs /System .; RM_SYSTEM=1; fi\nredo_prebinding -r . \"./${INSTALL_PATH}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}/Versions/${FRAMEWORK_VERSION}/${PRODUCT_NAME}\"\nif [ -n \"${RM_USRLIB:-}\" ]; then rm -f usr/lib; rmdir -p usr; fi\nif [ -n \"${RM_SYSTEM:-}\" ]; then rm -f System; fi";
+ shellScript = "# redo prebinding\ncd \"${INSTALL_ROOT}\"\nif [ ! -d usr/lib ]; then mkdir -p usr; ln -fs /usr/lib usr/; RM_USRLIB=1; fi\nif [ ! -d System ]; then ln -fs /System .; RM_SYSTEM=1; fi\nredo_prebinding -r . \"./${INSTALL_PATH}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}/Versions/${FRAMEWORK_VERSION}/${PRODUCT_NAME}\"\nif [ -n \"${RM_USRLIB:-}\" ]; then rm -f usr/lib; rmdir -p usr 2>&-; fi\nif [ -n \"${RM_SYSTEM:-}\" ]; then rm -f System; fi";
};
F5877FBD031FAC6A016F146B = {
buildActionMask = 8;
@@ -3090,7 +3085,20 @@ MacOS X Port by Jim Ingham &lt;jingham@apple.com&gt; &amp; Ian Reid, Copyright Â
);
runOnlyForDeploymentPostprocessing = 1;
shellPath = /bin/sh;
- shellScript = "# redo prebinding\ncd \"${INSTALL_ROOT}\"\nif [ ! -d usr/lib ]; then mkdir -p usr; ln -fs /usr/lib usr/; RM_USRLIB=1; fi\nif [ ! -d System ]; then ln -fs /System .; RM_SYSTEM=1; fi\nredo_prebinding -r . \"./${INSTALL_PATH}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}/Contents/MacOS/${PRODUCT_NAME}\"\nif [ -n \"${RM_USRLIB:-}\" ]; then rm -f usr/lib; rmdir -p usr; fi\nif [ -n \"${RM_SYSTEM:-}\" ]; then rm -f System; fi";
+ shellScript = "# redo prebinding\ncd \"${INSTALL_ROOT}\"\nif [ ! -d usr/lib ]; then mkdir -p usr; ln -fs /usr/lib usr/; RM_USRLIB=1; fi\nif [ ! -d System ]; then ln -fs /System .; RM_SYSTEM=1; fi\nredo_prebinding -r . \"./${INSTALL_PATH}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}/Contents/MacOS/${PRODUCT_NAME}\"\nif [ -n \"${RM_USRLIB:-}\" ]; then rm -f usr/lib; rmdir -p usr 2>&-; fi\nif [ -n \"${RM_SYSTEM:-}\" ]; then rm -f System; fi\n\n# install wish script & symbolic links\nif [ `echo \"${DYLIB_INSTALL_PATH:-}\" | grep -c \"@executable_path\"` -eq 0 ]; then\nmkdir -p \"${INSTALL_ROOT}/usr/bin\"\nrm -f \"${INSTALL_ROOT}/usr/bin/wish${FRAMEWORK_VERSION}\"\ncat > \"${INSTALL_ROOT}/usr/bin/wish${FRAMEWORK_VERSION}\" <<EOF\n#!/bin/sh\n\"${INSTALL_PATH}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}/Contents/MacOS/${PRODUCT_NAME}\" \"\\$@\"\nEOF\nchmod a+x \"${INSTALL_ROOT}/usr/bin/wish${FRAMEWORK_VERSION}\"\nln -fs \"wish${FRAMEWORK_VERSION}\" \"${INSTALL_ROOT}/usr/bin/wish\"\nfi";
+ };
+ F59D847903390D7E016F146B = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ generatedFileNames = (
+ );
+ isa = PBXShellScriptBuildPhase;
+ neededFileNames = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "if [ \"${BUILD_STYLE}\" = \"Development\" ]; then\n\t# force Deployment build to be relinked next time\n\tif [ -f \"${OBJROOT}/Deployment.build/${PROJECT_NAME}.build/${TARGET_NAME}.build/Objects-normal/LinkFileList\" ]; then\n\t touch -t `date -r \\`expr \\\\\\`date +\"%s\"\\\\\\` + 30\\` +\"%Y%m%d%H%M.%S\"` \"${OBJROOT}/Deployment.build/${PROJECT_NAME}.build/${TARGET_NAME}.build/Objects-normal/LinkFileList\"\n\tfi\nelse\n\t# force Development build to be relinked next time\n\tif [ -f \"${OBJROOT}/Development.build/${PROJECT_NAME}.build/${TARGET_NAME}.build/Objects-normal/LinkFileList\" ]; then\n\t touch -t `date -r \\`expr \\\\\\`date +\"%s\"\\\\\\` + 30\\` +\"%Y%m%d%H%M.%S\"` \"${OBJROOT}/Development.build/${PROJECT_NAME}.build/${TARGET_NAME}.build/Objects-normal/LinkFileList\"\n\tfi\nfi";
};
F5B1FC08016FFE3501DC9062 = {
buildActionMask = 2147483647;
@@ -3349,7 +3357,7 @@ MacOS X Port by Jim Ingham &lt;jingham@apple.com&gt; &amp; Ian Reid, Copyright Â
};
};
F5C1D51901B88F9A01DC9062 = {
- buildActionMask = 8;
+ buildActionMask = 12;
files = (
);
generatedFileNames = (
@@ -3357,9 +3365,9 @@ MacOS X Port by Jim Ingham &lt;jingham@apple.com&gt; &amp; Ian Reid, Copyright Â
isa = PBXShellScriptBuildPhase;
neededFileNames = (
);
- runOnlyForDeploymentPostprocessing = 1;
+ runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "#source buildConfig";
+ shellScript = "# synthesize tkConfig.sh via buildTkConfig.tcl script\nexport DYLD_FRAMEWORK_PATH=${SYMROOT}\n\"${SYMROOT}/tclsh${FRAMEWORK_VERSION}\" \"${SRCROOT}/buildTkConfig.tcl\" \"${TARGET_BUILD_DIR}/Tcl.${WRAPPER_EXTENSION}/Resources/tclConfig.sh\" \"${SRCROOT}/../unix/tkConfig.sh.in\" \"${TARGET_BUILD_DIR}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}/Resources/tkConfig.sh\"";
};
F5C88659017D625C01DC9062 = {
children = (
diff --git a/macosx/buildTkConfig.tcl b/macosx/buildTkConfig.tcl
new file mode 100755
index 0000000..7f1350a
--- /dev/null
+++ b/macosx/buildTkConfig.tcl
@@ -0,0 +1,44 @@
+#!/bin/sh
+#
+# Synthesize tkConfig.sh for Mac OS X based
+# on tclConfig.sh and tkConfig.sh.in
+#
+# RCS: @(#) $Id: buildTkConfig.tcl,v 1.1 2002/09/26 17:07:33 das Exp $
+#
+# the next line restarts using tclsh \
+exec tclsh8.4 "$0" "$@"
+
+proc main {tclConfigFile tkConfigFileIn tkConfigFile} {
+ set in [open $tclConfigFile]
+ set tclConfig [read $in]
+ close $in
+ set in [open $tkConfigFileIn]
+ set tkConfig [read $in]
+ close $in
+ set tclconfvars [regexp -all -inline -line -- {^TCL_([^=]*)=(.*)$} $tclConfig]
+ lappend tclconfvars {} {XINCLUDES} \
+ [lindex [regexp -inline -line -- {^TCL_INCLUDE_SPEC=(.*)$} $tclConfig] 1]
+ set tkconfvars [regexp -all -inline -line -- {^TK_([^=]*)=} $tkConfig]
+ foreach {-> var val} $tclconfvars {
+ regsub -all -- {([Tt])cl((?![[:alnum:]])|stub)} $val {\1k\2} val
+ foreach {-> tkvar} $tkconfvars {
+ regsub -all -- "TCL_$tkvar" $val "TK_$tkvar" val
+ }
+ regsub -line -- "^TK_$var=.*\$" $tkConfig "TK_$var=$val" tkConfig
+ }
+ regsub -line -all -- {@[^@]+@} $tkConfig {} tkConfig
+ regsub -line -all -- {/[^/]+\.build/Tk.build} $tkConfig {} tkConfig
+ regsub -line {^(TK_DEFS=')} $tkConfig {\1 -DMAC_OSX_TK} tkConfig
+
+ set out [open $tkConfigFile w]
+ puts $out $tkConfig
+ close $out
+}
+
+if {$argc != 3} {
+ puts stderr "usage: $argv0 /path/to/tclConfig.sh \
+/path/to/tkConfig.sh.in /path/to/tkConfig.sh"
+ exit 1
+}
+
+main [lindex $argv 0] [lindex $argv 1] [lindex $argv 2]
diff --git a/macosx/tkMacOSXNotify.c b/macosx/tkMacOSXNotify.c
index e64fee7..0d0764f 100644
--- a/macosx/tkMacOSXNotify.c
+++ b/macosx/tkMacOSXNotify.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXNotify.c,v 1.4 2002/09/23 07:17:16 wolfsuit Exp $
+ * RCS: @(#) $Id: tkMacOSXNotify.c,v 1.5 2002/09/26 17:07:33 das Exp $
*/
#include "tclInt.h"
@@ -23,7 +23,6 @@
#include "tkMacOSX.h"
#include "tkMacOSXEvent.h"
-#include "tclPort.h"
#include <signal.h>
extern TclStubs tclStubs;
diff --git a/macosx/tkMacOSXPort.h b/macosx/tkMacOSXPort.h
index c59a005..8f9d2be 100644
--- a/macosx/tkMacOSXPort.h
+++ b/macosx/tkMacOSXPort.h
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXPort.h,v 1.2 2002/08/31 06:12:30 das Exp $
+ * RCS: @(#) $Id: tkMacOSXPort.h,v 1.3 2002/09/26 17:07:33 das Exp $
*/
#ifndef _TKMACPORT
@@ -32,17 +32,46 @@
# endif
#endif
+#include <stdio.h>
+#include <ctype.h>
+#include <fcntl.h>
+#ifdef HAVE_LIMITS_H
+# include <limits.h>
+#else
+# include "../compat/limits.h"
+#endif
+#include <math.h>
+#include <pwd.h>
+#ifdef NO_STDLIB_H
+# include "../compat/stdlib.h"
+#else
+# include <stdlib.h>
+#endif
+#include <string.h>
+#include <sys/types.h>
+#include <sys/file.h>
+#ifdef HAVE_SYS_SELECT_H
+# include <sys/select.h>
+#endif
+#include <sys/stat.h>
#ifndef _TCL
# include <tcl.h>
#endif
-
-#include <time.h>
-#include <stdlib.h>
-#include <string.h>
-#include "tclMath.h"
-#include <ctype.h>
-#include <limits.h>
-
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+# include <sys/time.h>
+# else
+# include <time.h>
+# endif
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#else
+# include "../compat/unistd.h"
+#endif
#include <X11/Xlib.h>
#include <X11/cursorfont.h>
#include <X11/keysym.h>
@@ -52,6 +81,43 @@
#include "tkIntXlibDecls.h"
/*
+ * The following macro defines the type of the mask arguments to
+ * select:
+ */
+
+#ifndef NO_FD_SET
+# define SELECT_MASK fd_set
+#else
+# ifndef _AIX
+ typedef long fd_mask;
+# endif
+# if defined(_IBMR2)
+# define SELECT_MASK void
+# else
+# define SELECT_MASK int
+# endif
+#endif
+
+/*
+ * The following macro defines the number of fd_masks in an fd_set:
+ */
+
+#ifndef FD_SETSIZE
+# ifdef OPEN_MAX
+# define FD_SETSIZE OPEN_MAX
+# else
+# define FD_SETSIZE 256
+# endif
+#endif
+#if !defined(howmany)
+# define howmany(x, y) (((x)+((y)-1))/(y))
+#endif
+#ifndef NFDBITS
+# define NFDBITS NBBY*sizeof(fd_mask)
+#endif
+#define MASK_SIZE howmany(FD_SETSIZE, NFDBITS)
+
+/*
* Not all systems declare the errno variable in errno.h. so this
* file does it explicitly.
*/
diff --git a/unix/Makefile.in b/unix/Makefile.in
index 1b280a7..ff40657 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.82 2002/09/10 09:59:15 das Exp $
+# RCS: @(#) $Id: Makefile.in,v 1.83 2002/09/26 17:07:33 das Exp $
# Current Tk version; used in various names.
@@ -172,6 +172,9 @@ SHELL = /bin/sh
# "install" around; better to use the install-sh script that comes
# with the distribution, which is slower but guaranteed to work.
+INSTALL_STRIP_PROGRAM = -s
+INSTALL_STRIP_LIBRARY = -S -S
+
INSTALL = @srcdir@/install-sh -c
INSTALL_PROGRAM = ${INSTALL}
INSTALL_LIBRARY = ${INSTALL}
@@ -493,6 +496,11 @@ gdb: wish
install: all install-binaries install-libraries install-demos install-doc
+install-strip:
+ $(MAKE) install \
+ INSTALL_PROGRAM="$(INSTALL_PROGRAM) ${INSTALL_STRIP_PROGRAM}" \
+ INSTALL_LIBRARY="$(INSTALL_LIBRARY) ${INSTALL_STRIP_LIBRARY}"
+
# Note: before running ranlib below, must cd to target directory because
# some ranlibs write to current directory, and this might not always be
# possible (e.g. if installing as root).
diff --git a/unix/install-sh b/unix/install-sh
index 0ff4b6a..a9a1f27 100644
--- a/unix/install-sh
+++ b/unix/install-sh
@@ -62,6 +62,11 @@ while [ x"$1" != x ]; do
shift
continue;;
+ -S) stripcmd="$stripprog $2"
+ shift
+ shift
+ continue;;
+
*) if [ x"$src" = x ]
then
src=$1