os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/macosx/README
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 Tcl Mac OS X README
     2 -------------------
     3 
     4 RCS: @(#) $Id: README,v 1.1.2.9 2007/04/29 02:21:33 das Exp $
     5 
     6 This is the README file for the Mac OS X/Darwin version of Tcl.
     7 
     8 
     9 1. Where to go for support
    10 --------------------------
    11 
    12 - The tcl-mac mailing list on sourceforge is the best place to ask questions
    13 specific to Tcl & Tk on Mac OS X:
    14 	http://lists.sourceforge.net/lists/listinfo/tcl-mac
    15 (this page also has a link to searchable archives of the list, please check them
    16 before asking on the list, many questions have already been answered).
    17 
    18 - For general Tcl/Tk questions, the newsgroup comp.lang.tcl is your best bet:
    19 	http://groups.google.com/group/comp.lang.tcl/
    20 
    21 - The Tcl'ers Wiki also has many pages dealing with Tcl & Tk on Mac OS X, see
    22 	http://wiki.tcl.tk/references/3753!
    23 	http://wiki.tcl.tk/references/8361!
    24 
    25 - Please report bugs with Tcl or Tk on Mac OS X to the sourceforge bug trackers:
    26 	Tcl: http://sf.net/tracker/?func=add&group_id=10894&atid=110894
    27 	Tk:  http://sf.net/tracker/?func=add&group_id=12997&atid=112997
    28 please make sure that your report Tk specific bugs to the tktoolkit project bug
    29 tracker rather than the tcl project bug tracker.
    30 Mac OS X specific bugs should usually be assigned to 'das' or 'wolfsuit'.
    31 
    32 
    33 2. Using Tcl on Mac OS X
    34 ------------------------
    35 
    36 - At a minimum, Mac OS X 10.1 is required to run Tcl, but OS X 10.3 or higher is
    37 recommended (certain [file] operations behave incorrectly on earlier releases).
    38 
    39 - Unless weak-linking is used, Tcl built on Mac OS X 10.x will not run on 10.y
    40 with y < x; on the other hand Tcl built on 10.y will always run on 10.x with
    41 y <= x (but without any of the fixes and optimizations that would be available
    42 in a binary built on 10.x).
    43 Weak-linking is available on OS X 10.2 or later, it additionally allows Tcl
    44 built on 10.x to run on any 10.y with x > y >= z (for a chosen z >= 2).
    45 
    46 - Tcl extensions can be installed in any of:
    47 	$HOME/Library/Tcl /Library/Tcl /Network/Library/Tcl /System/Library/Tcl
    48 	$HOME/Library/Frameworks /Library/Frameworks /Network/Library/Frameworks
    49 	/System/Library/Frameworks (searched in that order).
    50 Given a potential package directory $pkg, Tcl on OSX checks for the file
    51 $pkg/Resources/Scripts/pkgIndex.tcl as well as the usual $pkg/pkgIndex.tcl.
    52 This allows building extensions as frameworks with all script files contained in
    53 the Resources/Scripts directory of the framework.
    54 
    55 - [load]able binary extensions can linked as either ordinary shared libraries
    56 (.dylib) or as MachO bundles (since 8.4.10/8.5a3); only bundles can be unloaded,
    57 and bundles are also loaded more efficiently from VFS (no temporary copy to the
    58 native filesystem required).
    59 
    60 - The 'deploy' target of macosx/Makefile installs the html manpages into the
    61 standard documentation location in the Tcl framework:
    62 	Tcl.framework/Resources/Documentation/Reference/Tcl
    63 No nroff manpages are installed by default by the Makefile.
    64 
    65 - The Tcl framework can be installed in any of the system's standard
    66 framework directories:
    67 	$HOME/Library/Frameworks /Library/Frameworks
    68 	/Network/Library/Frameworks /System/Library/Frameworks
    69 
    70 
    71 3. Building Tcl on Mac OS X
    72 ---------------------------
    73 
    74 - At least Mac OS X 10.1 is required to build Tcl, and Apple's Developer Tools
    75 need to be installed (only the most recent version matching your OS release is
    76 supported). The Developer Tools installer is available on Mac OS X retail disks
    77 or is present in /Applications/Installers on Macs that came with OS X
    78 preinstalled. The most recent version can be downloaded from the ADC website
    79 http://connect.apple.com (after you register for free ADC membership).
    80 
    81 - Tcl is most easily built as a Mac OS X framework via Makefile in tcl/macosx
    82 (see below for details), but can also be built with the standard unix configure
    83 and make buildsystem in tcl/unix as on any other unix platform (indeed, the
    84 Makefile is just a wrapper around the unix buildsystem).
    85 The Mac OS X specific configure flags are --enable-framework and
    86 --disable-corefoundation (which disables CF and notably reverts to the standard
    87 select based notifier).
    88 
    89 - It is also possible to build with Apple's IDE via the tcl/macosx/Tcl.pbproj
    90 project, this simply calls through to the tcl/macosx/Makefile.
    91 
    92 - To build universal binaries, set CFLAGS as follows:
    93     export CFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 \
    94 	-isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4"
    95 This requires Mac OS X 10.4 and Xcode 2.4 (or Xcode 2.2 if -arch x86_64 is
    96 omitted, but _not_ Xcode 2.1) and will work on any of the architectures (the
    97 -isysroot flag is only required on PowerPC Tiger).
    98 Note that configure requires CFLAGS to contain a least one architecture that can
    99 be run on the build machine (i.e. ppc on G3/G4, ppc or ppc64 on G5, ppc or i386
   100 on Core and ppc, i386 or x86_64 on Core2/Xeon).
   101 Universal builds of Tcl TEA extensions are also possible with CFLAGS set as
   102 above, they will be [load]able by universal as well as thin binaries of Tcl.
   103 
   104 - To enable weak-linking, set the MACOSX_DEPLOYMENT_TARGET environment variable
   105 to the minimal OS version (>= 10.2) the binaries should be able to run on, e.g:
   106     export MACOSX_DEPLOYMENT_TARGET=10.2
   107 This requires Mac OS X 10.2 and gcc 3.1; if you have gcc 4 or later you can set
   108 CFLAGS instead:
   109     export CFLAGS="-mmacosx-version-min=10.2"
   110 Support for weak-linking was added to the code for 8.4.14/8.5a5.
   111 
   112 Detailed Instructions for building with macosx/Makefile
   113 -------------------------------------------------------
   114 
   115 - Unpack the tcl source release archive.
   116 
   117 - The following instructions assume the tcl source tree is named "tcl${ver}",
   118 where ${ver} is a shell variable containing the tcl version number (for example
   119 '8.4.12').
   120 Setup the shell variable as follows:
   121 	set ver="8.4.12" ;: if your shell is csh
   122 	ver="8.4.12"	 ;: if your shell is sh
   123 The source tree will be named this way only if you are building from a release
   124 archive, if you are building from CVS, the version numbers will be missing; so
   125 set ${ver} to the empty string instead:
   126 	set ver=""	 ;: if your shell is csh
   127 	ver=""		 ;: if your shell is sh
   128 
   129 - The following steps will build Tcl from the Terminal, assuming you are located
   130 in the directory containing the tcl source tree:
   131 	make -C tcl${ver}/macosx
   132 and the following will then install Tcl onto the root volume (admin password
   133 required):
   134 	sudo make -C tcl${ver}/macosx install
   135 if you don't have the admin password, you can install into your home directory,
   136 instead by passing an INSTALL_ROOT argument to make:
   137 	make -C tcl${ver}/macosx install INSTALL_ROOT="${HOME}/"
   138 
   139 - The default Makefile targets will build _both_ debug and optimized versions of
   140 the Tcl framework with the standard convention of naming the debug library
   141 Tcl.framework/Tcl_debug.
   142 This allows switching to the debug libraries at runtime by setting
   143 	export DYLD_IMAGE_SUFFIX=_debug
   144 (c.f. man dyld for more details)
   145 
   146 If you only want to build and install the debug or optimized build, use the
   147 'develop' or 'deploy' target variants of the Makefiles, respectively.
   148 For example, to build and install only the optimized versions:
   149 	make -C tcl${ver}/macosx deploy
   150 	sudo make -C tcl${ver}/macosx install-deploy