├── README.MacOSX ├── .gitignore ├── README.FreeBSD ├── README.Debian ├── pkgIndex.tcl.in ├── aclocal.m4 ├── generic ├── tclspline.h ├── tclsplinetcl.c └── tclspline.c ├── tclconfig ├── README.txt ├── install-sh └── ChangeLog ├── ChangeLog ├── doc └── spline.n ├── tests ├── all.tcl └── spline.test ├── license.terms ├── README ├── configure.in └── Makefile.in /README.MacOSX: -------------------------------------------------------------------------------- 1 | ./configure 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | config.log 3 | config.status 4 | configure 5 | autom4te.cache 6 | libtclspline* 7 | pkgIndex.tcl 8 | *.o 9 | -------------------------------------------------------------------------------- /README.FreeBSD: -------------------------------------------------------------------------------- 1 | # 2 | # tclspline configure for FreeBSD 3 | # 4 | autoreconf 5 | ./configure --with-tcl=/usr/local/lib/tcl8.6 --mandir=/usr/local/man 6 | 7 | -------------------------------------------------------------------------------- /README.Debian: -------------------------------------------------------------------------------- 1 | # 2 | # tclspline configure command for Debian 3 | # 4 | ./configure --with-tcl=/usr/lib/tcl8.4 --with-tclinclude=/usr/include/tcl8.4 --enable-symbols 5 | -------------------------------------------------------------------------------- /pkgIndex.tcl.in: -------------------------------------------------------------------------------- 1 | # 2 | # Tcl package index file for tclspline @PACKAGE_VERSION@ 3 | # 4 | package ifneeded tclspline @PACKAGE_VERSION@ \ 5 | [list load [file join $dir @PKG_LIB_FILE@]] 6 | -------------------------------------------------------------------------------- /aclocal.m4: -------------------------------------------------------------------------------- 1 | # 2 | # Include the TEA standard macro set 3 | # 4 | 5 | builtin(include,tclconfig/tcl.m4) 6 | 7 | # 8 | # Add here whatever m4 macros you want to define for your package 9 | # 10 | -------------------------------------------------------------------------------- /generic/tclspline.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Include file for tclspline package 4 | * 5 | * Copyright (C) 2005 by Karl Lehenbauer, All Rights Reserved 6 | * 7 | * Freely redistributable under the Berkeley copyright, see license.terms 8 | * for details. 9 | */ 10 | 11 | extern int 12 | tclspline_splineObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objvp[]); 13 | -------------------------------------------------------------------------------- /tclconfig/README.txt: -------------------------------------------------------------------------------- 1 | These files comprise the basic building blocks for a Tcl Extension 2 | Architecture (TEA) extension. For more information on TEA see: 3 | 4 | http://www.tcl.tk/doc/tea/ 5 | 6 | This package is part of the Tcl project at SourceForge, and latest 7 | sources should be available there: 8 | 9 | http://tcl.sourceforge.net/ 10 | 11 | This package is a freely available open source package. You can do 12 | virtually anything you like with it, such as modifying it, redistributing 13 | it, and selling it either in whole or in part. 14 | 15 | CONTENTS 16 | ======== 17 | The following is a short description of the files you will find in 18 | the sample extension. 19 | 20 | README.txt This file 21 | 22 | install-sh Program used for copying binaries and script files 23 | to their install locations. 24 | 25 | tcl.m4 Collection of Tcl autoconf macros. Included by a package's 26 | aclocal.m4 to define TEA_* macros. 27 | -------------------------------------------------------------------------------- /ChangeLog: -------------------------------------------------------------------------------- 1 | 2011-01-18 karl 2 | * Version bump to 1.1. Tagged 1.1 for release. 3 | 4 | 2010-08-12 karl 5 | * Upgrade to Tcl Extension Architecture (TEA) 3.8. 6 | 7 | 2010-03-22 karl 8 | * Upgrade to Tcl Extension Architecture (TEA) 3.7. 9 | 10 | 2009-03-31 karl 11 | * Compiles cleanly under Debian. Added README.Debian with configuration 12 | instructions. 13 | 14 | 2007-06-22 karl 15 | * A missing "return TCL_OK" in the code path that handles the case where 16 | the number of elements being passed are too few to spline was causing 17 | Tcl panics because it fell through into code where it didn't belong, 18 | causing it to try to set a value into a shared object, causing Tcl 19 | to panic. 20 | 21 | 2007-03-11 karl 22 | * Update to Tcl Extension Architecture (TEA) 3.6 -- the configure script 23 | started failing on newer versions of the OS. 24 | 25 | 2006-01-04 Karl Lehenbauer 26 | * Make it not dump core if the passed point list is empty. 27 | 28 | * Require an even number of elements in the point list. 29 | 30 | * Make it return the passed list unchanged if the point list contains 31 | only 2 or 4 points (one or two coordinate pairs.) 32 | 33 | * Bumped version to 1.0 34 | 35 | 2005-11-23 Karl Lehenbauer 36 | 37 | * generic/tclsplinetcl.c: Allow safe interpreters to use the spline 38 | function. 39 | 40 | * README: Cleanup 41 | 42 | * generic/tclspline.c: Fixed memory leak. More rigorous checking 43 | of list contents (at least 6 elements, even number of elements.) 44 | 45 | * tests/spline.test: Some actual, useful, functional tests. 46 | 47 | 2005-11-20 Karl Lehenbauer 48 | -------------------------------------------------------------------------------- /doc/spline.n: -------------------------------------------------------------------------------- 1 | '\" 2 | '\" Copyright (c) 1993 The Regents of the University of California. 3 | '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. 4 | '\" Copyright (c) 2005 Karl Lehenbauer 5 | '\" 6 | '\" See the file "license.terms" for information on usage and redistribution 7 | '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. 8 | '\" 9 | '\".so man.macros 10 | .TH read n 0.0 TclSpline "Spline Extension for Tcl" 11 | .BS 12 | '\" Note: do not modify the .SH NAME line immediately below! 13 | .SH NAME 14 | spline \- Generate a set of quadratic splines based on an input list 15 | .SH SYNOPSIS 16 | \fBspline \fR \fInSteps pointList\fR 17 | .sp 18 | \fBspline_raw \fInSteps pointList\fR 19 | .BE 20 | 21 | .SH DESCRIPTION 22 | .PP 23 | Input is an integer number of steps, \fInSteps\fR, and a list containing 24 | three or more pairs of x and y coordinates. \fBspline\fR reads that 25 | list and generates a new list of x and y coordinate pairs representing 26 | a curve based on the passed points, rendered as a set of quadratic 27 | splines: one spline is drawn for the first and second line segments, one 28 | for the second and third, and so on. 29 | .PP 30 | Straight-line segments can be generated within 31 | a curve by duplicating the end-points of the desired line segment. 32 | .PP 33 | \fBspline_raw\fR indicates that the list should also be returned as a 34 | curve, but the list of coordinates is such that the first coordinate pair 35 | (and every third coordinate pair thereafter) is a knot point on a cubic 36 | Bezier curve, and the other coordinates are control points on the cubic 37 | Bezier curve. 38 | .PP 39 | Straight line segments can be generated within a curve by making control 40 | points equal to their neighboring knot points. If the last point is a 41 | control point and not a knot point, the point is repeated (one or two 42 | times) so that it also becomes a knot point. 43 | .PP 44 | \fInSteps\fR specifies the degree of smoothness desired for curves: each 45 | spline will be approximated with \fInSteps\fR line segments. 46 | -------------------------------------------------------------------------------- /tests/all.tcl: -------------------------------------------------------------------------------- 1 | # all.tcl -- 2 | # 3 | # This file contains a top-level script to run all of the Tcl 4 | # tests. Execute it by invoking "source all.test" when running tcltest 5 | # in this directory. 6 | # 7 | # Copyright (c) 1998-2000 by Scriptics Corporation. 8 | # All rights reserved. 9 | # 10 | # RCS: @(#) $Id: all.tcl,v 1.1 2005-11-24 03:55:04 karl Exp $ 11 | 12 | if {[lsearch [namespace children] ::tcltest] == -1} { 13 | package require tcltest 14 | namespace import ::tcltest::* 15 | } 16 | 17 | set ::tcltest::testSingleFile false 18 | set ::tcltest::testsDirectory [file dir [info script]] 19 | 20 | # We need to ensure that the testsDirectory is absolute 21 | if {[catch {::tcltest::normalizePath ::tcltest::testsDirectory}]} { 22 | # The version of tcltest we have here does not support 23 | # 'normalizePath', so we have to do this on our own. 24 | 25 | set oldpwd [pwd] 26 | catch {cd $::tcltest::testsDirectory} 27 | set ::tcltest::testsDirectory [pwd] 28 | cd $oldpwd 29 | } 30 | 31 | set chan $::tcltest::outputChannel 32 | 33 | puts $chan "Tests running in interp: [info nameofexecutable]" 34 | puts $chan "Tests running with pwd: [pwd]" 35 | puts $chan "Tests running in working dir: $::tcltest::testsDirectory" 36 | if {[llength $::tcltest::skip] > 0} { 37 | puts $chan "Skipping tests that match: $::tcltest::skip" 38 | } 39 | if {[llength $::tcltest::match] > 0} { 40 | puts $chan "Only running tests that match: $::tcltest::match" 41 | } 42 | 43 | if {[llength $::tcltest::skipFiles] > 0} { 44 | puts $chan "Skipping test files that match: $::tcltest::skipFiles" 45 | } 46 | if {[llength $::tcltest::matchFiles] > 0} { 47 | puts $chan "Only sourcing test files that match: $::tcltest::matchFiles" 48 | } 49 | 50 | set timeCmd {clock format [clock seconds]} 51 | puts $chan "Tests began at [eval $timeCmd]" 52 | 53 | # source each of the specified tests 54 | foreach file [lsort [::tcltest::getMatchingFiles]] { 55 | set tail [file tail $file] 56 | puts $chan $tail 57 | if {[catch {source $file} msg]} { 58 | puts $chan $msg 59 | } 60 | } 61 | 62 | # cleanup 63 | puts $chan "\nTests ended at [eval $timeCmd]" 64 | ::tcltest::cleanupTests 1 65 | return 66 | 67 | -------------------------------------------------------------------------------- /license.terms: -------------------------------------------------------------------------------- 1 | This software is copyrighted by Karl Lehenbauer, and includes modified 2 | sample extension code copyright Scriptics corporation, and other 3 | parties. The following terms apply to all files associated with the 4 | software unless explicitly disclaimed in individual files. 5 | 6 | The author hereby grants permission to use, copy, modify, distribute, 7 | and license this software and its documentation for any purpose, provided 8 | that existing copyright notices are retained in all copies and that this 9 | notice is included verbatim in any distributions. No written agreement, 10 | license, or royalty fee is required for any of the authorized uses. 11 | Modifications to this software may be copyrighted by their authors 12 | and need not follow the licensing terms described here, provided that 13 | the new terms are clearly indicated on the first page of each file where 14 | they apply. 15 | 16 | IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY 17 | FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 18 | ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY 19 | DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE 20 | POSSIBILITY OF SUCH DAMAGE. 21 | 22 | THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, 23 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, 24 | FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE 25 | IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE 26 | NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR 27 | MODIFICATIONS. 28 | 29 | GOVERNMENT USE: If you are acquiring this software on behalf of the 30 | U.S. government, the Government shall have only "Restricted Rights" 31 | in the software and related documentation as defined in the Federal 32 | Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you 33 | are acquiring the software on behalf of the Department of Defense, the 34 | software shall be classified as "Commercial Computer Software" and the 35 | Government shall have only "Restricted Rights" as defined in Clause 36 | 252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the 37 | authors grant the U.S. Government and others acting in its behalf 38 | permission to use and distribute the software in accordance with the 39 | terms specified in this license. 40 | -------------------------------------------------------------------------------- /tests/spline.test: -------------------------------------------------------------------------------- 1 | # Commands covered: spline 2 | # 3 | # This file contains a collection of tests for one or more of the Tcl 4 | # built-in commands. Sourcing this file into Tcl runs the tests and 5 | # generates output for errors. No output means no errors were found. 6 | # 7 | # Copyright (c) 2000 by Scriptics Corporation. 8 | # Copyright (c) 2005 by Karl Lehenbauer 9 | # 10 | # See the file "license.terms" for information on usage and redistribution 11 | # of this file, and for a DISCLAIMER OF ALL WARRANTIES. 12 | # 13 | # RCS: @(#) $Id: spline.test,v 1.2 2006-01-04 07:28:01 karl Exp $ 14 | 15 | if {[lsearch [namespace children] ::tcltest] == -1} { 16 | package require tcltest 17 | namespace import ::tcltest::* 18 | } 19 | 20 | package require tclspline 21 | 22 | test spline-1.1 {spline too few arguments} { 23 | list [catch {spline} errMsg] $errMsg 24 | } {1 {wrong # args: should be "spline steps pointList"}} 25 | 26 | test spline-1.2 {spline too few arguments} { 27 | list [catch {spline 10} errMsg] $errMsg 28 | } {1 {wrong # args: should be "spline steps pointList"}} 29 | 30 | test spline-1.3 {spline too many arguments} { 31 | list [catch {spline 10 10 10} errMsg] $errMsg 32 | } {1 {wrong # args: should be "spline steps pointList"}} 33 | 34 | test spline-1.4 {spline not enough values in list} { 35 | list [catch {spline 10 10} errMsg] $errMsg 36 | } {1 {Number of elements in pointList must be even}} 37 | 38 | test spline-1.5 {spline not enough values in list} { 39 | list [catch {spline 10 {10 10}} errMsg] $errMsg 40 | } {0 {10 10}} 41 | 42 | test spline-1.6 {spline not enough values in list} { 43 | list [catch {spline 10 {10 10 10}} errMsg] $errMsg 44 | } {1 {Number of elements in pointList must be even}} 45 | 46 | test spline-1.7 {spline not enough values in list} { 47 | list [catch {spline 10 {10 10 10 10}} errMsg] $errMsg 48 | } {0 {10 10 10 10}} 49 | 50 | test spline-1.8 {spline not enough values in list} { 51 | list [catch {spline 10 {10 10 10 10 10}} errMsg] $errMsg 52 | } {1 {Number of elements in pointList must be even}} 53 | 54 | test spline-1.9 {spline not enough values in list} { 55 | list [catch {spline 10 {10 10 10 10 10 10 10}} errMsg] $errMsg 56 | } {1 {Number of elements in pointList must be even}} 57 | 58 | test spline-1.10 {spline not enough values in list} { 59 | list [catch {spline 1 {0 0 1 0 2 1 3 2 4 4 5 8 6 16}} errMsg] $errMsg 60 | } {0 {0.0 0.0 1.5 0.5 2.5 1.5 3.5 3.0 4.5 6.0 6.0 16.0}} 61 | 62 | test spline-1.10 {spline not enough values in list} { 63 | list [catch {spline 2 {0 0 1 0 2 1 3 2 4 4 5 8 6 16}} errMsg] $errMsg 64 | } {0 {0.0 0.0 0.87525 0.125125 1.5 0.5 2.0 1.0 2.5 1.5 3.0 2.125125 3.5 3.0 4.0 4.25025 4.5 6.0 5.12475 9.4985 6.0 16.0}} 65 | 66 | # cleanup 67 | ::tcltest::cleanupTests 68 | return 69 | -------------------------------------------------------------------------------- /generic/tclsplinetcl.c: -------------------------------------------------------------------------------- 1 | /* 2 | * tclspline_Init and tclspline_SafeInit 3 | * 4 | * Copyright (C) 2005 Karl Lehenbauer 5 | * 6 | * Freely redistributable under the Berkeley copyright. See license.terms 7 | * for details. 8 | */ 9 | 10 | #include 11 | #include "tclspline.h" 12 | 13 | #undef TCL_STORAGE_CLASS 14 | #define TCL_STORAGE_CLASS DLLEXPORT 15 | 16 | 17 | /* 18 | *---------------------------------------------------------------------- 19 | * 20 | * tclspline_Init -- 21 | * 22 | * Initialize the tclspline extension. The string "tclspline" 23 | * in the function name must match the PACKAGE declaration at the top of 24 | * configure.in. 25 | * 26 | * Results: 27 | * A standard Tcl result 28 | * 29 | * Side effects: 30 | * One new command "spline" is added to the Tcl interpreter. 31 | * 32 | *---------------------------------------------------------------------- 33 | */ 34 | 35 | EXTERN int 36 | Tclspline_Init(Tcl_Interp *interp) 37 | { 38 | /* 39 | * This may work with 8.0, but we are using strictly stubs here, 40 | * which requires 8.1. 41 | */ 42 | if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { 43 | return TCL_ERROR; 44 | } 45 | 46 | if (Tcl_PkgRequire(interp, "Tcl", "8.1", 0) == NULL) { 47 | return TCL_ERROR; 48 | } 49 | 50 | if (Tcl_PkgProvide(interp, "tclspline", PACKAGE_VERSION) != TCL_OK) { 51 | return TCL_ERROR; 52 | } 53 | 54 | /* Create the spline command */ 55 | Tcl_CreateObjCommand(interp, "spline", (Tcl_ObjCmdProc *) tclspline_splineObjCmd, (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL); 56 | 57 | return TCL_OK; 58 | } 59 | 60 | 61 | /* 62 | *---------------------------------------------------------------------- 63 | * 64 | * tclspline_SafeInit -- 65 | * 66 | * Initialize the tclspline in a safe interpreter. 67 | * 68 | * This should be totally safe. 69 | * 70 | * Results: 71 | * A standard Tcl result 72 | * 73 | * Side effects: 74 | * One new command "spline" is added to the Tcl interpreter. 75 | * 76 | *---------------------------------------------------------------------- 77 | */ 78 | 79 | EXTERN int 80 | Tclspline_SafeInit(Tcl_Interp *interp) 81 | { 82 | /* 83 | * This may work with 8.0, but we are using strictly stubs here, 84 | * which requires 8.1. 85 | */ 86 | if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { 87 | return TCL_ERROR; 88 | } 89 | 90 | if (Tcl_PkgRequire(interp, "Tcl", "8.1", 0) == NULL) { 91 | return TCL_ERROR; 92 | } 93 | 94 | if (Tcl_PkgProvide(interp, "tclspline", PACKAGE_VERSION) != TCL_OK) { 95 | return TCL_ERROR; 96 | } 97 | 98 | /* Create the spline command */ 99 | Tcl_CreateObjCommand(interp, "spline", (Tcl_ObjCmdProc *) tclspline_splineObjCmd, (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL); 100 | 101 | return TCL_OK; 102 | } 103 | 104 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | This is tclspline, a direct Tcl interface to spline routines from extracted Tk 2 | 3 | Version 1.0 4 | 5 | This package is a freely available open source package under the "Berkeley" 6 | license, same as Tcl. You can do virtually anything you like with it, such as 7 | modifying it, redistributing it, and selling it either in whole or in part. 8 | See the file "license.terms" for complete information. 9 | 10 | tclspline was written by Karl Lehenbauer. 11 | 12 | USING TCLSPLINE 13 | ================ 14 | 15 | package require tclspline 16 | 17 | TCLSPLINE QUICK REF 18 | =================== 19 | 20 | 21 | set outputPairs [spline [list $x1 $y1 $x2 $y2 $x3 $y3 $x4 $y4 ...]] 22 | 23 | Given a set of coordinate pairs, interpolate steps between the points to 24 | make it a sort of splined curve. 25 | 26 | ORIGIN 27 | ====== 28 | 29 | Actual spline routine is from Tk. This code just splits it out and makes 30 | it callable on lists of coordinates instead of having it be part of the 31 | canvas widget. 32 | 33 | 34 | BUGS 35 | ==== 36 | 37 | None known at this time. 38 | 39 | CONTENTS 40 | ======== 41 | 42 | Makefile.in Makefile template. The configure script uses this file to 43 | produce the final Makefile. 44 | 45 | README This file 46 | 47 | aclocal.m4 Generated file. Do not edit. Autoconf uses this as input 48 | when generating the final configure script. See "tcl.m4" 49 | below. 50 | 51 | configure Generated file. Do not edit. This must be regenerated 52 | anytime configure.in or tclconfig/tcl.m4 changes. 53 | 54 | configure.in Configure script template. Autoconf uses this file as input 55 | to produce the final configure script. 56 | 57 | generic/tclspline.c Spline routines. 58 | generic/tclspline.h include file 59 | generic/tclsplinetcl.c Init routines. 60 | 61 | 62 | tclconfig/ This directory contains various template files that build 63 | the configure script. They should not need modification. 64 | 65 | install-sh Program used for copying binaries and script files 66 | to their install locations. 67 | 68 | tcl.m4 Collection of Tcl autoconf macros. Included by 69 | aclocal.m4 to define SC_* macros. 70 | 71 | UNIX BUILD 72 | ========== 73 | 74 | Building under most UNIX systems is easy, just run the configure script 75 | and then run make. 76 | 77 | $ cd tclspline 78 | $ ./configure 79 | $ make 80 | $ make install 81 | 82 | WINDOWS BUILD 83 | ============= 84 | 85 | tclspline has not been built under Windows at this time. 86 | 87 | The recommended method to build extensions under Windows is to use the 88 | Msys + Mingw build process. This provides a Unix-style build while 89 | generating native Windows binaries. Using the Msys + Mingw build tools 90 | means that you can use the same configure script as per the Unix build 91 | to create a Makefile. 92 | 93 | If you have VC++, then you may wish to use the files in the win 94 | subdirectory and build the extension using just VC++. 95 | 96 | Instructions for using the VC++ makefile are written in the first part of 97 | the Makefile.vc file. 98 | 99 | INSTALLATION 100 | ============ 101 | 102 | The tweezers install like so: 103 | 104 | $exec_prefix 105 | / \ 106 | lib bin 107 | | | 108 | PACKAGEx.y (dependent .dll files on Windows) 109 | | 110 | pkgIndex.tcl (.so|.dll files) 111 | 112 | The main .so|.dll library file gets installed in the versioned PACKAGE 113 | directory, which is OK on all platforms because it will be directly 114 | referenced with by 'load' in the pkgIndex.tcl file. Dependent DLL files on 115 | Windows must go in the bin directory (or other directory on the user's 116 | PATH) in order for them to be found. 117 | 118 | -------------------------------------------------------------------------------- /configure.in: -------------------------------------------------------------------------------- 1 | #!/bin/bash -norc 2 | dnl This file is an input file used by the GNU "autoconf" program to 3 | dnl generate the file "configure", which is run during Tcl installation 4 | dnl to configure the system for the local environment. 5 | # 6 | # RCS: @(#) $Id: configure.in,v 1.3 2007-03-11 22:43:12 karl Exp $ 7 | 8 | #----------------------------------------------------------------------- 9 | # configure.in for Karl's tcl.gd. 10 | #----------------------------------------------------------------------- 11 | 12 | #----------------------------------------------------------------------- 13 | # __CHANGE__ 14 | # Set your package name and version numbers here. 15 | # 16 | # This initializes the environment with PACKAGE_NAME and PACKAGE_VERSION 17 | # set as provided. These will also be added as -D defs in your Makefile 18 | # so you can encode the package version directly into the source files. 19 | #----------------------------------------------------------------------- 20 | 21 | AC_INIT([tclspline], [1.1]) 22 | 23 | #-------------------------------------------------------------------- 24 | # Call TEA_INIT as the first TEA_ macro to set up initial vars. 25 | # This will define a ${TEA_PLATFORM} variable == "unix" or "windows" 26 | # as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE. 27 | #-------------------------------------------------------------------- 28 | 29 | TEA_INIT([3.9]) 30 | 31 | AC_CONFIG_AUX_DIR(tclconfig) 32 | 33 | #-------------------------------------------------------------------- 34 | # Load the tclConfig.sh file 35 | #-------------------------------------------------------------------- 36 | 37 | TEA_PATH_TCLCONFIG 38 | TEA_LOAD_TCLCONFIG 39 | 40 | #-------------------------------------------------------------------- 41 | # Load the tkConfig.sh file if necessary (Tk extension) 42 | #-------------------------------------------------------------------- 43 | 44 | #TEA_PATH_TKCONFIG 45 | #TEA_LOAD_TKCONFIG 46 | 47 | #----------------------------------------------------------------------- 48 | # Handle the --prefix=... option by defaulting to what Tcl gave. 49 | # Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER. 50 | #----------------------------------------------------------------------- 51 | 52 | TEA_PREFIX 53 | 54 | #----------------------------------------------------------------------- 55 | # Standard compiler checks. 56 | # This sets up CC by using the CC env var, or looks for gcc otherwise. 57 | # This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create 58 | # the basic setup necessary to compile executables. 59 | #----------------------------------------------------------------------- 60 | 61 | TEA_SETUP_COMPILER 62 | 63 | #----------------------------------------------------------------------- 64 | # __CHANGE__ 65 | # Specify the C source files to compile in TEA_ADD_SOURCES, 66 | # public headers that need to be installed in TEA_ADD_HEADERS, 67 | # stub library C source files to compile in TEA_ADD_STUB_SOURCES, 68 | # and runtime Tcl library files in TEA_ADD_TCL_SOURCES. 69 | # This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS 70 | # and PKG_TCL_SOURCES. 71 | #----------------------------------------------------------------------- 72 | 73 | TEA_ADD_SOURCES([tclspline.c tclsplinetcl.c]) 74 | TEA_ADD_HEADERS([]) 75 | TEA_ADD_INCLUDES([]) 76 | TEA_ADD_LIBS([]) 77 | TEA_ADD_CFLAGS([]) 78 | TEA_ADD_STUB_SOURCES([]) 79 | TEA_ADD_TCL_SOURCES([]) 80 | 81 | #-------------------------------------------------------------------- 82 | # __CHANGE__ 83 | # A few miscellaneous platform-specific items: 84 | # 85 | # Define a special symbol for Windows (BUILD_sample in this case) so 86 | # that we create the export library with the dll. 87 | # 88 | # Windows creates a few extra files that need to be cleaned up. 89 | # You can add more files to clean if your extension creates any extra 90 | # files. 91 | # 92 | # TEA_ADD_* any platform specific compiler/build info here. 93 | #-------------------------------------------------------------------- 94 | #CLEANFILES="" 95 | if test "${TEA_PLATFORM}" = "windows" ; then 96 | AC_DEFINE(BUILD_tclspline, 1, [Build windows export dll]) 97 | CLEANFILES="$CLEANFILES *.lib *.dll *.exp *.ilk *.pdb vc*.pch" 98 | #TEA_ADD_SOURCES([win/winFile.c]) 99 | #TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/win)\"]) 100 | else 101 | # Ensure no empty else clauses 102 | : 103 | #CLEANFILES="" 104 | #TEA_ADD_SOURCES([unix/unixFile.c]) 105 | #TEA_ADD_LIBS([-lsuperfly]) 106 | fi 107 | AC_SUBST(CLEANFILES) 108 | 109 | #-------------------------------------------------------------------- 110 | # __CHANGE__ 111 | # Choose which headers you need. Extension authors should try very 112 | # hard to only rely on the Tcl public header files. Internal headers 113 | # contain private data structures and are subject to change without 114 | # notice. 115 | # This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG 116 | #-------------------------------------------------------------------- 117 | 118 | TEA_PUBLIC_TCL_HEADERS 119 | #TEA_PRIVATE_TCL_HEADERS 120 | 121 | #TEA_PUBLIC_TK_HEADERS 122 | #TEA_PRIVATE_TK_HEADERS 123 | #TEA_PATH_X 124 | 125 | #-------------------------------------------------------------------- 126 | # Check whether --enable-threads or --disable-threads was given. 127 | # This auto-enables if Tcl was compiled threaded. 128 | #-------------------------------------------------------------------- 129 | 130 | TEA_ENABLE_THREADS 131 | 132 | #-------------------------------------------------------------------- 133 | # The statement below defines a collection of symbols related to 134 | # building as a shared library instead of a static library. 135 | #-------------------------------------------------------------------- 136 | 137 | TEA_ENABLE_SHARED 138 | 139 | #-------------------------------------------------------------------- 140 | # This macro figures out what flags to use with the compiler/linker 141 | # when building shared/static debug/optimized objects. This information 142 | # can be taken from the tclConfig.sh file, but this figures it all out. 143 | #-------------------------------------------------------------------- 144 | 145 | TEA_CONFIG_CFLAGS 146 | 147 | #-------------------------------------------------------------------- 148 | # Set the default compiler switches based on the --enable-symbols option. 149 | #-------------------------------------------------------------------- 150 | 151 | TEA_ENABLE_SYMBOLS 152 | 153 | #-------------------------------------------------------------------- 154 | # Everyone should be linking against the Tcl stub library. If you 155 | # can't for some reason, remove this definition. If you aren't using 156 | # stubs, you also need to modify the SHLIB_LD_LIBS setting below to 157 | # link against the non-stubbed Tcl library. Add Tk too if necessary. 158 | #-------------------------------------------------------------------- 159 | 160 | AC_DEFINE(USE_TCL_STUBS, 1, [Use Tcl stubs]) 161 | #AC_DEFINE(USE_TK_STUBS, 1, [Use Tk stubs]) 162 | 163 | #-------------------------------------------------------------------- 164 | # This macro generates a line to use when building a library. It 165 | # depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS, 166 | # and TEA_LOAD_TCLCONFIG macros above. 167 | #-------------------------------------------------------------------- 168 | 169 | TEA_MAKE_LIB 170 | 171 | #-------------------------------------------------------------------- 172 | # Determine the name of the tclsh and/or wish executables in the 173 | # Tcl and Tk build directories or the location they were installed 174 | # into. These paths are used to support running test cases only, 175 | # the Makefile should not be making use of these paths to generate 176 | # a pkgIndex.tcl file or anything else at extension build time. 177 | #-------------------------------------------------------------------- 178 | 179 | TEA_PROG_TCLSH 180 | #TEA_PROG_WISH 181 | 182 | #-------------------------------------------------------------------- 183 | # Finally, substitute all of the various values into the Makefile. 184 | # You may alternatively have a special pkgIndex.tcl.in or other files 185 | # which require substituting th AC variables in. Include these here. 186 | #-------------------------------------------------------------------- 187 | 188 | AC_OUTPUT([Makefile pkgIndex.tcl]) 189 | -------------------------------------------------------------------------------- /generic/tclspline.c: -------------------------------------------------------------------------------- 1 | /* 2 | * tclspline.c, based on tkTrig.c -- 3 | * 4 | * This file contains a collection of trigonometry utility routines that 5 | * are used by Tk and in particular by the canvas code. It also has 6 | * miscellaneous geometry functions used by canvases. 7 | * 8 | * Copyright (c) 1992-1994 The Regents of the University of California. 9 | * Copyright (c) 1994-1997 Sun Microsystems, Inc. 10 | * Copyright (c) 2005 Karl Lehenbauer 11 | * 12 | * See the file "license.terms" for information on usage and redistribution of 13 | * this file, and for a DISCLAIMER OF ALL WARRANTIES. 14 | * 15 | */ 16 | 17 | #include 18 | 19 | /* 20 | #include "tkInt.h" 21 | #include "tkPort.h" 22 | #include "tkCanvas.h" 23 | */ 24 | 25 | #undef MIN 26 | #define MIN(a,b) (((a) < (b)) ? (a) : (b)) 27 | #undef MAX 28 | #define MAX(a,b) (((a) > (b)) ? (a) : (b)) 29 | #ifndef PI 30 | # define PI 3.14159265358979323846 31 | #endif /* PI */ 32 | 33 | 34 | /* 35 | *-------------------------------------------------------------- 36 | * 37 | * BezierPoints -- 38 | * 39 | * Given four control points, create a larger set of points for a Bezier 40 | * curve based on the points. 41 | * 42 | * Results: 43 | * The array at *coordPtr gets filled in with 2*numSteps coordinates, 44 | * which correspond to the Bezier spline defined by the four control 45 | * points. Note: no output point is generated for the first input point, 46 | * but an output point *is* generated for the last input point. 47 | * 48 | * Side effects: 49 | * None. 50 | * 51 | *-------------------------------------------------------------- 52 | */ 53 | 54 | static void 55 | BezierPoints( 56 | double control[], /* Array of coordinates for four control 57 | * points: x0, y0, x1, y1, ... x3 y3. */ 58 | int numSteps, /* Number of curve points to generate. */ 59 | register double *coordPtr) /* Where to put new points. */ 60 | { 61 | int i; 62 | double u, u2, u3, t, t2, t3; 63 | 64 | for (i = 1; i <= numSteps; i++, coordPtr += 2) { 65 | t = ((double) i)/((double) numSteps); 66 | t2 = t*t; 67 | t3 = t2*t; 68 | u = 1.0 - t; 69 | u2 = u*u; 70 | u3 = u2*u; 71 | coordPtr[0] = control[0]*u3 72 | + 3.0 * (control[2]*t*u2 + control[4]*t2*u) + control[6]*t3; 73 | coordPtr[1] = control[1]*u3 74 | + 3.0 * (control[3]*t*u2 + control[5]*t2*u) + control[7]*t3; 75 | } 76 | } 77 | 78 | /* 79 | *-------------------------------------------------------------- 80 | * 81 | * MakeBezierCurve -- 82 | * 83 | * Given a set of points, create a new set of points that fit parabolic 84 | * splines to the line segments connecting the original points. Produces 85 | * output points in either of two forms. 86 | * 87 | * Note: the name of this function should *not* be taken to mean that it 88 | * interprets the input points as directly defining Bezier curves. 89 | * Rather, it internally computes a Bezier curve representation of each 90 | * parabolic spline segment. (These Bezier curves are then flattened to 91 | * produce the points filled into the output arrays.) 92 | * 93 | * Results: 94 | * The dblPoints array is filled in. The 95 | * return value is the number of points placed in the arrays. Note: if 96 | * the first and last points are the same, then a closed curve is 97 | * generated. 98 | * 99 | * Side effects: 100 | * None. 101 | * 102 | *-------------------------------------------------------------- 103 | */ 104 | 105 | static int 106 | MakeBezierCurve( 107 | double *pointPtr, /* Array of input coordinates: x0, y0, x1, y1, 108 | * etc.. */ 109 | int numPoints, /* Number of points at pointPtr. */ 110 | int numSteps, /* Number of steps to use for each spline 111 | * segments (determines smoothness of 112 | * curve). */ 113 | double dblPoints[]) /* Array of points to fill in as doubles, in 114 | * the form x0, y0, x1, y1, .... Caller 115 | * must make sure that this array has enough 116 | * space. */ 117 | { 118 | int closed, outputPoints, i; 119 | int numCoords = numPoints*2; 120 | double control[8]; 121 | 122 | /* 123 | * If the curve is a closed one then generate a special spline that spans 124 | * the last points and the first ones. Otherwise just put the first point 125 | * into the output. 126 | */ 127 | 128 | if (!pointPtr) { 129 | /* 130 | * If pointPtr == NULL, this function returns an upper limit of the 131 | * array size to store the coordinates. This can be used to allocate 132 | * storage, before the actual coordinates are calculated. 133 | */ 134 | 135 | return 1 + numPoints * numSteps; 136 | } 137 | 138 | outputPoints = 0; 139 | if ((pointPtr[0] == pointPtr[numCoords-2]) 140 | && (pointPtr[1] == pointPtr[numCoords-1])) { 141 | closed = 1; 142 | control[0] = 0.5*pointPtr[numCoords-4] + 0.5*pointPtr[0]; 143 | control[1] = 0.5*pointPtr[numCoords-3] + 0.5*pointPtr[1]; 144 | control[2] = 0.167*pointPtr[numCoords-4] + 0.833*pointPtr[0]; 145 | control[3] = 0.167*pointPtr[numCoords-3] + 0.833*pointPtr[1]; 146 | control[4] = 0.833*pointPtr[0] + 0.167*pointPtr[2]; 147 | control[5] = 0.833*pointPtr[1] + 0.167*pointPtr[3]; 148 | control[6] = 0.5*pointPtr[0] + 0.5*pointPtr[2]; 149 | control[7] = 0.5*pointPtr[1] + 0.5*pointPtr[3]; 150 | dblPoints[0] = control[0]; 151 | dblPoints[1] = control[1]; 152 | BezierPoints(control, numSteps, dblPoints+2); 153 | dblPoints += 2*(numSteps+1); 154 | outputPoints += numSteps+1; 155 | } else { 156 | closed = 0; 157 | dblPoints[0] = pointPtr[0]; 158 | dblPoints[1] = pointPtr[1]; 159 | dblPoints += 2; 160 | outputPoints += 1; 161 | } 162 | 163 | for (i = 2; i < numPoints; i++, pointPtr += 2) { 164 | /* 165 | * Set up the first two control points. This is done differently for 166 | * the first spline of an open curve than for other cases. 167 | */ 168 | 169 | if ((i == 2) && !closed) { 170 | control[0] = pointPtr[0]; 171 | control[1] = pointPtr[1]; 172 | control[2] = 0.333*pointPtr[0] + 0.667*pointPtr[2]; 173 | control[3] = 0.333*pointPtr[1] + 0.667*pointPtr[3]; 174 | } else { 175 | control[0] = 0.5*pointPtr[0] + 0.5*pointPtr[2]; 176 | control[1] = 0.5*pointPtr[1] + 0.5*pointPtr[3]; 177 | control[2] = 0.167*pointPtr[0] + 0.833*pointPtr[2]; 178 | control[3] = 0.167*pointPtr[1] + 0.833*pointPtr[3]; 179 | } 180 | 181 | /* 182 | * Set up the last two control points. This is done differently for 183 | * the last spline of an open curve than for other cases. 184 | */ 185 | 186 | if ((i == (numPoints-1)) && !closed) { 187 | control[4] = .667*pointPtr[2] + .333*pointPtr[4]; 188 | control[5] = .667*pointPtr[3] + .333*pointPtr[5]; 189 | control[6] = pointPtr[4]; 190 | control[7] = pointPtr[5]; 191 | } else { 192 | control[4] = .833*pointPtr[2] + .167*pointPtr[4]; 193 | control[5] = .833*pointPtr[3] + .167*pointPtr[5]; 194 | control[6] = 0.5*pointPtr[2] + 0.5*pointPtr[4]; 195 | control[7] = 0.5*pointPtr[3] + 0.5*pointPtr[5]; 196 | } 197 | 198 | /* 199 | * If the first two points coincide, or if the last two points 200 | * coincide, then generate a single straight-line segment by 201 | * outputting the last control point. 202 | */ 203 | 204 | if (((pointPtr[0] == pointPtr[2]) && (pointPtr[1] == pointPtr[3])) 205 | || ((pointPtr[2] == pointPtr[4]) 206 | && (pointPtr[3] == pointPtr[5]))) { 207 | dblPoints[0] = control[6]; 208 | dblPoints[1] = control[7]; 209 | dblPoints += 2; 210 | outputPoints += 1; 211 | continue; 212 | } 213 | 214 | /* 215 | * Generate a Bezier spline using the control points. 216 | */ 217 | 218 | 219 | BezierPoints(control, numSteps, dblPoints); 220 | dblPoints += 2*numSteps; 221 | outputPoints += numSteps; 222 | } 223 | return outputPoints; 224 | } 225 | 226 | /* 227 | *-------------------------------------------------------------- 228 | * 229 | * MakeRawCurve -- 230 | * 231 | * Interpret the given set of points as the raw knots and control points 232 | * defining a sequence of cubic Bezier curves. Create a new set of points 233 | * that fit these Bezier curves. 234 | * 235 | * Results: 236 | * The dblPoints array is filled in. The 237 | * return value is the number of points placed in the arrays. 238 | * 239 | * Side effects: 240 | * None. 241 | * 242 | *-------------------------------------------------------------- 243 | */ 244 | 245 | static int 246 | MakeRawCurve( 247 | double *pointPtr, /* Array of input coordinates: x0, y0, x1, y1, 248 | * etc.. */ 249 | int numPoints, /* Number of points at pointPtr. */ 250 | int numSteps, /* Number of steps to use for each curve 251 | * segment (determines smoothness of 252 | * curve). */ 253 | double dblPoints[]) /* Array of points to fill in as doubles, in 254 | * the form x0, y0, x1, y1, .... 255 | * Caller must make sure that this array has 256 | * enough space. */ 257 | { 258 | int outputPoints, i; 259 | int numSegments = (numPoints+1)/3; 260 | double *segPtr; 261 | 262 | /* 263 | * The input describes a curve with s Bezier curve segments if there are 264 | * 3s+1, 3s, or 3s-1 input points. In the last two cases, 1 or 2 initial 265 | * points from the first curve segment are reused as defining points also 266 | * for the last curve segment. In the case of 3s input points, this will 267 | * automatically close the curve. 268 | */ 269 | 270 | if (!pointPtr) { 271 | /* 272 | * If pointPtr == NULL, this function returns an upper limit of the 273 | * array size to store the coordinates. This can be used to allocate 274 | * storage, before the actual coordinates are calculated. 275 | */ 276 | 277 | return 1 + numSegments * numSteps; 278 | } 279 | 280 | outputPoints = 0; 281 | dblPoints[0] = pointPtr[0]; 282 | dblPoints[1] = pointPtr[1]; 283 | dblPoints += 2; 284 | outputPoints += 1; 285 | 286 | /* 287 | * The next loop handles all curve segments except one that overlaps the 288 | * end of the list of coordinates. 289 | */ 290 | 291 | for (i=numPoints,segPtr=pointPtr ; i>=4 ; i-=3,segPtr+=6) { 292 | if (segPtr[0]==segPtr[2] && segPtr[1]==segPtr[3] && 293 | segPtr[4]==segPtr[6] && segPtr[5]==segPtr[7]) { 294 | /* 295 | * The control points on this segment are equal to their 296 | * neighbouring knots, so this segment is just a straight line. A 297 | * single point is sufficient. 298 | */ 299 | 300 | dblPoints[0] = segPtr[6]; 301 | dblPoints[1] = segPtr[7]; 302 | dblPoints += 2; 303 | outputPoints += 1; 304 | } else { 305 | /* 306 | * This is a generic Bezier curve segment. 307 | */ 308 | 309 | BezierPoints(segPtr, numSteps, dblPoints); 310 | dblPoints += 2*numSteps; 311 | outputPoints += numSteps; 312 | } 313 | } 314 | 315 | /* 316 | * If at this point i>1, then there is some point which has not yet been 317 | * used. Make another curve segment. 318 | */ 319 | 320 | if (i > 1) { 321 | int j; 322 | double control[8]; 323 | 324 | /* 325 | * Copy the relevant coordinates to control[], so that it can be 326 | * passed as a unit to e.g. BezierPoints. 327 | */ 328 | 329 | for (j=0; j<2*i; j++) { 330 | control[j] = segPtr[j]; 331 | } 332 | for (; j<8; j++) { 333 | control[j] = pointPtr[j-2*i]; 334 | } 335 | 336 | /* 337 | * Then we just do the same things as above. 338 | */ 339 | 340 | if (control[0]==control[2] && control[1]==control[3] && 341 | control[4]==control[6] && control[5]==control[7]) { 342 | /* 343 | * The control points on this segment are equal to their 344 | * neighbouring knots, so this segment is just a straight line. A 345 | * single point is sufficient. 346 | */ 347 | 348 | dblPoints[0] = control[6]; 349 | dblPoints[1] = control[7]; 350 | dblPoints += 2; 351 | outputPoints += 1; 352 | } else { 353 | /* 354 | * This is a generic Bezier curve segment. 355 | */ 356 | 357 | BezierPoints(control, numSteps, dblPoints); 358 | dblPoints += 2*numSteps; 359 | outputPoints += numSteps; 360 | } 361 | } 362 | 363 | return outputPoints; 364 | } 365 | 366 | 367 | /* 368 | *---------------------------------------------------------------------- 369 | * 370 | * tclspline_splineObjCmd -- 371 | * 372 | * This procedure is invoked to process the "spline" command. 373 | * See the user documentation for details on what it does. 374 | * 375 | * Results: 376 | * A standard Tcl result. 377 | * 378 | * Side effects: 379 | * See the user documentation. 380 | * 381 | *---------------------------------------------------------------------- 382 | */ 383 | 384 | /* ARGSUSED */ 385 | int 386 | tclspline_splineObjCmd(clientData, interp, objc, objv) 387 | ClientData clientData; /* registered proc hashtable ptr. */ 388 | Tcl_Interp *interp; /* Current interpreter. */ 389 | int objc; /* Number of arguments. */ 390 | Tcl_Obj *CONST objv[]; 391 | { 392 | int nElements; 393 | int i; 394 | int nSteps; 395 | Tcl_Obj *resultObj = Tcl_GetObjResult(interp); 396 | Tcl_Obj **pointObjList; 397 | double *points; 398 | double *outputPoints; 399 | int nTargetPairs; 400 | int resultPoints; 401 | 402 | if (objc != 3) { 403 | Tcl_WrongNumArgs (interp, 1, objv,"steps pointList"); 404 | return TCL_ERROR; 405 | } 406 | 407 | if (Tcl_GetIntFromObj (interp, objv[1], &nSteps) == TCL_ERROR) { 408 | return TCL_ERROR; 409 | } 410 | 411 | if (Tcl_ListObjGetElements (interp, objv[2], &nElements, &pointObjList) == TCL_ERROR) { 412 | return TCL_ERROR; 413 | } 414 | 415 | /* Should trying to spline an empty list be an error? I decided to just 416 | * return an empty list. */ 417 | if (nElements == 0) { 418 | return TCL_OK; 419 | } 420 | 421 | /* If they passed us an odd number of elements, that's incorrect. 422 | * 423 | * (Yes I could have written it (nElements % 2) but it compiles to the 424 | * same result and this way is much more clear.) 425 | */ 426 | 427 | if (nElements % 2 != 0) { 428 | Tcl_SetObjResult (interp, Tcl_NewStringObj ("Number of elements in pointList must be even", -1)); 429 | return TCL_ERROR; 430 | } 431 | 432 | /* If they only sent us one or two pairs, it's not enough to spline, 433 | * just return the same list that we received. 434 | * 435 | * Note - Tcl_SetObjResult increments the reference count so you don't 436 | * need to worry about it. 437 | */ 438 | 439 | if (nElements < 6) { 440 | Tcl_SetObjResult (interp, objv[2]); 441 | return TCL_OK; 442 | } 443 | 444 | points = (double *)ckalloc (sizeof (double) * nElements); 445 | 446 | for (i = 0; i < nElements; i++) { 447 | if (Tcl_GetDoubleFromObj (interp, pointObjList[i], &points[i]) == TCL_ERROR) { 448 | return TCL_ERROR; 449 | } 450 | } 451 | 452 | nTargetPairs = 1 + (nElements / 2) * nSteps; 453 | outputPoints = (double *)ckalloc (sizeof (double) * nTargetPairs * 2); 454 | 455 | resultPoints = MakeBezierCurve (points, nElements / 2, nSteps, outputPoints); 456 | 457 | for (i = 0; i < resultPoints * 2; i++) { 458 | Tcl_ListObjAppendElement (interp, resultObj, Tcl_NewDoubleObj(outputPoints[i])); 459 | } 460 | 461 | ckfree ((char *) points); 462 | ckfree ((char *) outputPoints); 463 | return TCL_OK; 464 | } 465 | 466 | -------------------------------------------------------------------------------- /tclconfig/install-sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # install - install a program, script, or datafile 3 | 4 | scriptversion=2011-04-20.01; # UTC 5 | 6 | # This originates from X11R5 (mit/util/scripts/install.sh), which was 7 | # later released in X11R6 (xc/config/util/install.sh) with the 8 | # following copyright and license. 9 | # 10 | # Copyright (C) 1994 X Consortium 11 | # 12 | # Permission is hereby granted, free of charge, to any person obtaining a copy 13 | # of this software and associated documentation files (the "Software"), to 14 | # deal in the Software without restriction, including without limitation the 15 | # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 16 | # sell copies of the Software, and to permit persons to whom the Software is 17 | # furnished to do so, subject to the following conditions: 18 | # 19 | # The above copyright notice and this permission notice shall be included in 20 | # all copies or substantial portions of the Software. 21 | # 22 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 23 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 24 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 25 | # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 26 | # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- 27 | # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | # 29 | # Except as contained in this notice, the name of the X Consortium shall not 30 | # be used in advertising or otherwise to promote the sale, use or other deal- 31 | # ings in this Software without prior written authorization from the X Consor- 32 | # tium. 33 | # 34 | # 35 | # FSF changes to this file are in the public domain. 36 | # 37 | # Calling this script install-sh is preferred over install.sh, to prevent 38 | # `make' implicit rules from creating a file called install from it 39 | # when there is no Makefile. 40 | # 41 | # This script is compatible with the BSD install script, but was written 42 | # from scratch. 43 | 44 | nl=' 45 | ' 46 | IFS=" "" $nl" 47 | 48 | # set DOITPROG to echo to test this script 49 | 50 | # Don't use :- since 4.3BSD and earlier shells don't like it. 51 | doit=${DOITPROG-} 52 | if test -z "$doit"; then 53 | doit_exec=exec 54 | else 55 | doit_exec=$doit 56 | fi 57 | 58 | # Put in absolute file names if you don't have them in your path; 59 | # or use environment vars. 60 | 61 | chgrpprog=${CHGRPPROG-chgrp} 62 | chmodprog=${CHMODPROG-chmod} 63 | chownprog=${CHOWNPROG-chown} 64 | cmpprog=${CMPPROG-cmp} 65 | cpprog=${CPPROG-cp} 66 | mkdirprog=${MKDIRPROG-mkdir} 67 | mvprog=${MVPROG-mv} 68 | rmprog=${RMPROG-rm} 69 | stripprog=${STRIPPROG-strip} 70 | 71 | posix_glob='?' 72 | initialize_posix_glob=' 73 | test "$posix_glob" != "?" || { 74 | if (set -f) 2>/dev/null; then 75 | posix_glob= 76 | else 77 | posix_glob=: 78 | fi 79 | } 80 | ' 81 | 82 | posix_mkdir= 83 | 84 | # Desired mode of installed file. 85 | mode=0755 86 | 87 | chgrpcmd= 88 | chmodcmd=$chmodprog 89 | chowncmd= 90 | mvcmd=$mvprog 91 | rmcmd="$rmprog -f" 92 | stripcmd= 93 | 94 | src= 95 | dst= 96 | dir_arg= 97 | dst_arg= 98 | 99 | copy_on_change=false 100 | no_target_directory= 101 | 102 | usage="\ 103 | Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE 104 | or: $0 [OPTION]... SRCFILES... DIRECTORY 105 | or: $0 [OPTION]... -t DIRECTORY SRCFILES... 106 | or: $0 [OPTION]... -d DIRECTORIES... 107 | 108 | In the 1st form, copy SRCFILE to DSTFILE. 109 | In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. 110 | In the 4th, create DIRECTORIES. 111 | 112 | Options: 113 | --help display this help and exit. 114 | --version display version info and exit. 115 | 116 | -c (ignored) 117 | -C install only if different (preserve the last data modification time) 118 | -d create directories instead of installing files. 119 | -g GROUP $chgrpprog installed files to GROUP. 120 | -m MODE $chmodprog installed files to MODE. 121 | -o USER $chownprog installed files to USER. 122 | -s $stripprog installed files. 123 | -S $stripprog installed files. 124 | -t DIRECTORY install into DIRECTORY. 125 | -T report an error if DSTFILE is a directory. 126 | 127 | Environment variables override the default commands: 128 | CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG 129 | RMPROG STRIPPROG 130 | " 131 | 132 | while test $# -ne 0; do 133 | case $1 in 134 | -c) ;; 135 | 136 | -C) copy_on_change=true;; 137 | 138 | -d) dir_arg=true;; 139 | 140 | -g) chgrpcmd="$chgrpprog $2" 141 | shift;; 142 | 143 | --help) echo "$usage"; exit $?;; 144 | 145 | -m) mode=$2 146 | case $mode in 147 | *' '* | *' '* | *' 148 | '* | *'*'* | *'?'* | *'['*) 149 | echo "$0: invalid mode: $mode" >&2 150 | exit 1;; 151 | esac 152 | shift;; 153 | 154 | -o) chowncmd="$chownprog $2" 155 | shift;; 156 | 157 | -s) stripcmd=$stripprog;; 158 | 159 | -S) stripcmd="$stripprog $2" 160 | shift;; 161 | 162 | -t) dst_arg=$2 163 | shift;; 164 | 165 | -T) no_target_directory=true;; 166 | 167 | --version) echo "$0 $scriptversion"; exit $?;; 168 | 169 | --) shift 170 | break;; 171 | 172 | -*) echo "$0: invalid option: $1" >&2 173 | exit 1;; 174 | 175 | *) break;; 176 | esac 177 | shift 178 | done 179 | 180 | if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then 181 | # When -d is used, all remaining arguments are directories to create. 182 | # When -t is used, the destination is already specified. 183 | # Otherwise, the last argument is the destination. Remove it from $@. 184 | for arg 185 | do 186 | if test -n "$dst_arg"; then 187 | # $@ is not empty: it contains at least $arg. 188 | set fnord "$@" "$dst_arg" 189 | shift # fnord 190 | fi 191 | shift # arg 192 | dst_arg=$arg 193 | done 194 | fi 195 | 196 | if test $# -eq 0; then 197 | if test -z "$dir_arg"; then 198 | echo "$0: no input file specified." >&2 199 | exit 1 200 | fi 201 | # It's OK to call `install-sh -d' without argument. 202 | # This can happen when creating conditional directories. 203 | exit 0 204 | fi 205 | 206 | if test -z "$dir_arg"; then 207 | do_exit='(exit $ret); exit $ret' 208 | trap "ret=129; $do_exit" 1 209 | trap "ret=130; $do_exit" 2 210 | trap "ret=141; $do_exit" 13 211 | trap "ret=143; $do_exit" 15 212 | 213 | # Set umask so as not to create temps with too-generous modes. 214 | # However, 'strip' requires both read and write access to temps. 215 | case $mode in 216 | # Optimize common cases. 217 | *644) cp_umask=133;; 218 | *755) cp_umask=22;; 219 | 220 | *[0-7]) 221 | if test -z "$stripcmd"; then 222 | u_plus_rw= 223 | else 224 | u_plus_rw='% 200' 225 | fi 226 | cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; 227 | *) 228 | if test -z "$stripcmd"; then 229 | u_plus_rw= 230 | else 231 | u_plus_rw=,u+rw 232 | fi 233 | cp_umask=$mode$u_plus_rw;; 234 | esac 235 | fi 236 | 237 | for src 238 | do 239 | # Protect names starting with `-'. 240 | case $src in 241 | -*) src=./$src;; 242 | esac 243 | 244 | if test -n "$dir_arg"; then 245 | dst=$src 246 | dstdir=$dst 247 | test -d "$dstdir" 248 | dstdir_status=$? 249 | else 250 | 251 | # Waiting for this to be detected by the "$cpprog $src $dsttmp" command 252 | # might cause directories to be created, which would be especially bad 253 | # if $src (and thus $dsttmp) contains '*'. 254 | if test ! -f "$src" && test ! -d "$src"; then 255 | echo "$0: $src does not exist." >&2 256 | exit 1 257 | fi 258 | 259 | if test -z "$dst_arg"; then 260 | echo "$0: no destination specified." >&2 261 | exit 1 262 | fi 263 | 264 | dst=$dst_arg 265 | # Protect names starting with `-'. 266 | case $dst in 267 | -*) dst=./$dst;; 268 | esac 269 | 270 | # If destination is a directory, append the input filename; won't work 271 | # if double slashes aren't ignored. 272 | if test -d "$dst"; then 273 | if test -n "$no_target_directory"; then 274 | echo "$0: $dst_arg: Is a directory" >&2 275 | exit 1 276 | fi 277 | dstdir=$dst 278 | dst=$dstdir/`basename "$src"` 279 | dstdir_status=0 280 | else 281 | # Prefer dirname, but fall back on a substitute if dirname fails. 282 | dstdir=` 283 | (dirname "$dst") 2>/dev/null || 284 | expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 285 | X"$dst" : 'X\(//\)[^/]' \| \ 286 | X"$dst" : 'X\(//\)$' \| \ 287 | X"$dst" : 'X\(/\)' \| . 2>/dev/null || 288 | echo X"$dst" | 289 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 290 | s//\1/ 291 | q 292 | } 293 | /^X\(\/\/\)[^/].*/{ 294 | s//\1/ 295 | q 296 | } 297 | /^X\(\/\/\)$/{ 298 | s//\1/ 299 | q 300 | } 301 | /^X\(\/\).*/{ 302 | s//\1/ 303 | q 304 | } 305 | s/.*/./; q' 306 | ` 307 | 308 | test -d "$dstdir" 309 | dstdir_status=$? 310 | fi 311 | fi 312 | 313 | obsolete_mkdir_used=false 314 | 315 | if test $dstdir_status != 0; then 316 | case $posix_mkdir in 317 | '') 318 | # Create intermediate dirs using mode 755 as modified by the umask. 319 | # This is like FreeBSD 'install' as of 1997-10-28. 320 | umask=`umask` 321 | case $stripcmd.$umask in 322 | # Optimize common cases. 323 | *[2367][2367]) mkdir_umask=$umask;; 324 | .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; 325 | 326 | *[0-7]) 327 | mkdir_umask=`expr $umask + 22 \ 328 | - $umask % 100 % 40 + $umask % 20 \ 329 | - $umask % 10 % 4 + $umask % 2 330 | `;; 331 | *) mkdir_umask=$umask,go-w;; 332 | esac 333 | 334 | # With -d, create the new directory with the user-specified mode. 335 | # Otherwise, rely on $mkdir_umask. 336 | if test -n "$dir_arg"; then 337 | mkdir_mode=-m$mode 338 | else 339 | mkdir_mode= 340 | fi 341 | 342 | posix_mkdir=false 343 | case $umask in 344 | *[123567][0-7][0-7]) 345 | # POSIX mkdir -p sets u+wx bits regardless of umask, which 346 | # is incompatible with FreeBSD 'install' when (umask & 300) != 0. 347 | ;; 348 | *) 349 | tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ 350 | trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 351 | 352 | if (umask $mkdir_umask && 353 | exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 354 | then 355 | if test -z "$dir_arg" || { 356 | # Check for POSIX incompatibilities with -m. 357 | # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or 358 | # other-writeable bit of parent directory when it shouldn't. 359 | # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. 360 | ls_ld_tmpdir=`ls -ld "$tmpdir"` 361 | case $ls_ld_tmpdir in 362 | d????-?r-*) different_mode=700;; 363 | d????-?--*) different_mode=755;; 364 | *) false;; 365 | esac && 366 | $mkdirprog -m$different_mode -p -- "$tmpdir" && { 367 | ls_ld_tmpdir_1=`ls -ld "$tmpdir"` 368 | test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" 369 | } 370 | } 371 | then posix_mkdir=: 372 | fi 373 | rmdir "$tmpdir/d" "$tmpdir" 374 | else 375 | # Remove any dirs left behind by ancient mkdir implementations. 376 | rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null 377 | fi 378 | trap '' 0;; 379 | esac;; 380 | esac 381 | 382 | if 383 | $posix_mkdir && ( 384 | umask $mkdir_umask && 385 | $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" 386 | ) 387 | then : 388 | else 389 | 390 | # The umask is ridiculous, or mkdir does not conform to POSIX, 391 | # or it failed possibly due to a race condition. Create the 392 | # directory the slow way, step by step, checking for races as we go. 393 | 394 | case $dstdir in 395 | /*) prefix='/';; 396 | -*) prefix='./';; 397 | *) prefix='';; 398 | esac 399 | 400 | eval "$initialize_posix_glob" 401 | 402 | oIFS=$IFS 403 | IFS=/ 404 | $posix_glob set -f 405 | set fnord $dstdir 406 | shift 407 | $posix_glob set +f 408 | IFS=$oIFS 409 | 410 | prefixes= 411 | 412 | for d 413 | do 414 | test -z "$d" && continue 415 | 416 | prefix=$prefix$d 417 | if test -d "$prefix"; then 418 | prefixes= 419 | else 420 | if $posix_mkdir; then 421 | (umask=$mkdir_umask && 422 | $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break 423 | # Don't fail if two instances are running concurrently. 424 | test -d "$prefix" || exit 1 425 | else 426 | case $prefix in 427 | *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; 428 | *) qprefix=$prefix;; 429 | esac 430 | prefixes="$prefixes '$qprefix'" 431 | fi 432 | fi 433 | prefix=$prefix/ 434 | done 435 | 436 | if test -n "$prefixes"; then 437 | # Don't fail if two instances are running concurrently. 438 | (umask $mkdir_umask && 439 | eval "\$doit_exec \$mkdirprog $prefixes") || 440 | test -d "$dstdir" || exit 1 441 | obsolete_mkdir_used=true 442 | fi 443 | fi 444 | fi 445 | 446 | if test -n "$dir_arg"; then 447 | { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && 448 | { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && 449 | { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || 450 | test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 451 | else 452 | 453 | # Make a couple of temp file names in the proper directory. 454 | dsttmp=$dstdir/_inst.$$_ 455 | rmtmp=$dstdir/_rm.$$_ 456 | 457 | # Trap to clean up those temp files at exit. 458 | trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 459 | 460 | # Copy the file name to the temp name. 461 | (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && 462 | 463 | # and set any options; do chmod last to preserve setuid bits. 464 | # 465 | # If any of these fail, we abort the whole thing. If we want to 466 | # ignore errors from any of these, just make sure not to ignore 467 | # errors from the above "$doit $cpprog $src $dsttmp" command. 468 | # 469 | { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && 470 | { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && 471 | { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && 472 | { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && 473 | 474 | # If -C, don't bother to copy if it wouldn't change the file. 475 | if $copy_on_change && 476 | old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && 477 | new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && 478 | 479 | eval "$initialize_posix_glob" && 480 | $posix_glob set -f && 481 | set X $old && old=:$2:$4:$5:$6 && 482 | set X $new && new=:$2:$4:$5:$6 && 483 | $posix_glob set +f && 484 | 485 | test "$old" = "$new" && 486 | $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 487 | then 488 | rm -f "$dsttmp" 489 | else 490 | # Rename the file to the real destination. 491 | $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || 492 | 493 | # The rename failed, perhaps because mv can't rename something else 494 | # to itself, or perhaps because mv is so ancient that it does not 495 | # support -f. 496 | { 497 | # Now remove or move aside any old file at destination location. 498 | # We try this two ways since rm can't unlink itself on some 499 | # systems and the destination file might be busy for other 500 | # reasons. In this case, the final cleanup might fail but the new 501 | # file should still install successfully. 502 | { 503 | test ! -f "$dst" || 504 | $doit $rmcmd -f "$dst" 2>/dev/null || 505 | { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && 506 | { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } 507 | } || 508 | { echo "$0: cannot unlink or rename $dst" >&2 509 | (exit 1); exit 1 510 | } 511 | } && 512 | 513 | # Now rename the file to the real destination. 514 | $doit $mvcmd "$dsttmp" "$dst" 515 | } 516 | fi || exit 1 517 | 518 | trap '' 0 519 | fi 520 | done 521 | 522 | # Local variables: 523 | # eval: (add-hook 'write-file-hooks 'time-stamp) 524 | # time-stamp-start: "scriptversion=" 525 | # time-stamp-format: "%:y-%02m-%02d.%02H" 526 | # time-stamp-time-zone: "UTC" 527 | # time-stamp-end: "; # UTC" 528 | # End: 529 | -------------------------------------------------------------------------------- /Makefile.in: -------------------------------------------------------------------------------- 1 | # Makefile.in -- 2 | # 3 | # This file is a Makefile for Sample TEA Extension. If it has the name 4 | # "Makefile.in" then it is a template for a Makefile; to generate the 5 | # actual Makefile, run "./configure", which is a configuration script 6 | # generated by the "autoconf" program (constructs like "@foo@" will get 7 | # replaced in the actual Makefile. 8 | # 9 | # Copyright (c) 1999 Scriptics Corporation. 10 | # Copyright (c) 2002-2005 ActiveState Corporation. 11 | # 12 | # See the file "license.terms" for information on usage and redistribution 13 | # of this file, and for a DISCLAIMER OF ALL WARRANTIES. 14 | # 15 | # RCS: @(#) $Id: Makefile.in,v 1.2 2007-03-11 22:43:12 karl Exp $ 16 | 17 | #======================================================================== 18 | # Add additional lines to handle any additional AC_SUBST cases that 19 | # have been added in a customized configure script. 20 | #======================================================================== 21 | 22 | #SAMPLE_NEW_VAR = @SAMPLE_NEW_VAR@ 23 | 24 | #======================================================================== 25 | # Nothing of the variables below this line should need to be changed. 26 | # Please check the TARGETS section below to make sure the make targets 27 | # are correct. 28 | #======================================================================== 29 | 30 | #======================================================================== 31 | # The names of the source files is defined in the configure script. 32 | # The object files are used for linking into the final library. 33 | # This will be used when a dist target is added to the Makefile. 34 | # It is not important to specify the directory, as long as it is the 35 | # $(srcdir) or in the generic, win or unix subdirectory. 36 | #======================================================================== 37 | 38 | PKG_SOURCES = @PKG_SOURCES@ 39 | PKG_OBJECTS = @PKG_OBJECTS@ 40 | 41 | PKG_STUB_SOURCES = @PKG_STUB_SOURCES@ 42 | PKG_STUB_OBJECTS = @PKG_STUB_OBJECTS@ 43 | 44 | #======================================================================== 45 | # PKG_TCL_SOURCES identifies Tcl runtime files that are associated with 46 | # this package that need to be installed, if any. 47 | #======================================================================== 48 | 49 | PKG_TCL_SOURCES = @PKG_TCL_SOURCES@ 50 | 51 | #======================================================================== 52 | # This is a list of public header files to be installed, if any. 53 | #======================================================================== 54 | 55 | PKG_HEADERS = @PKG_HEADERS@ 56 | 57 | #======================================================================== 58 | # "PKG_LIB_FILE" refers to the library (dynamic or static as per 59 | # configuration options) composed of the named objects. 60 | #======================================================================== 61 | 62 | PKG_LIB_FILE = @PKG_LIB_FILE@ 63 | PKG_STUB_LIB_FILE = @PKG_STUB_LIB_FILE@ 64 | 65 | lib_BINARIES = $(PKG_LIB_FILE) 66 | BINARIES = $(lib_BINARIES) 67 | 68 | SHELL = @SHELL@ 69 | 70 | srcdir = @srcdir@ 71 | prefix = @prefix@ 72 | exec_prefix = @exec_prefix@ 73 | 74 | bindir = @bindir@ 75 | libdir = @libdir@ 76 | includedir = @includedir@ 77 | datarootdir = @datarootdir@ 78 | datadir = @datadir@ 79 | mandir = @mandir@ 80 | 81 | DESTDIR = 82 | 83 | PKG_DIR = $(PACKAGE_NAME)$(PACKAGE_VERSION) 84 | pkgdatadir = $(datadir)/$(PKG_DIR) 85 | pkglibdir = $(libdir)/$(PKG_DIR) 86 | pkgincludedir = $(includedir)/$(PKG_DIR) 87 | 88 | top_builddir = . 89 | 90 | INSTALL = @INSTALL@ 91 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ 92 | INSTALL_DATA = @INSTALL_DATA@ 93 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ 94 | 95 | PACKAGE_NAME = @PACKAGE_NAME@ 96 | PACKAGE_VERSION = @PACKAGE_VERSION@ 97 | CC = @CC@ 98 | CFLAGS_DEFAULT = @CFLAGS_DEFAULT@ 99 | CFLAGS_WARNING = @CFLAGS_WARNING@ 100 | EXEEXT = @EXEEXT@ 101 | LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@ 102 | MAKE_LIB = @MAKE_LIB@ 103 | MAKE_SHARED_LIB = @MAKE_SHARED_LIB@ 104 | MAKE_STATIC_LIB = @MAKE_STATIC_LIB@ 105 | MAKE_STUB_LIB = @MAKE_STUB_LIB@ 106 | OBJEXT = @OBJEXT@ 107 | RANLIB = @RANLIB@ 108 | RANLIB_STUB = @RANLIB_STUB@ 109 | SHLIB_CFLAGS = @SHLIB_CFLAGS@ 110 | SHLIB_LD = @SHLIB_LD@ 111 | SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ 112 | STLIB_LD = @STLIB_LD@ 113 | #TCL_DEFS = @TCL_DEFS@ 114 | TCL_BIN_DIR = @TCL_BIN_DIR@ 115 | TCL_SRC_DIR = @TCL_SRC_DIR@ 116 | #TK_BIN_DIR = @TK_BIN_DIR@ 117 | #TK_SRC_DIR = @TK_SRC_DIR@ 118 | 119 | # Not used, but retained for reference of what libs Tcl required 120 | #TCL_LIBS = @TCL_LIBS@ 121 | 122 | #======================================================================== 123 | # TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our 124 | # package without installing. The other environment variables allow us 125 | # to test against an uninstalled Tcl. Add special env vars that you 126 | # require for testing here (like TCLX_LIBRARY). 127 | #======================================================================== 128 | 129 | EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR) 130 | #EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR) 131 | TCLLIBPATH = $(top_builddir) 132 | TCLSH_ENV = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \ 133 | @LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \ 134 | PATH="$(EXTRA_PATH):$(PATH)" \ 135 | TCLLIBPATH="$(TCLLIBPATH)" 136 | # TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library` 137 | 138 | TCLSH_PROG = @TCLSH_PROG@ 139 | TCLSH = $(TCLSH_ENV) $(TCLSH_PROG) 140 | 141 | #WISH_PROG = @WISH_PROG@ 142 | #WISH = $(TCLSH_ENV) $(WISH_PROG) 143 | 144 | 145 | SHARED_BUILD = @SHARED_BUILD@ 146 | 147 | INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@ 148 | #INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@ @TK_INCLUDES@ @TK_XINCLUDES@ 149 | 150 | PKG_CFLAGS = @PKG_CFLAGS@ 151 | 152 | # TCL_DEFS is not strictly need here, but if you remove it, then you 153 | # must make sure that configure.in checks for the necessary components 154 | # that your library may use. TCL_DEFS can actually be a problem if 155 | # you do not compile with a similar machine setup as the Tcl core was 156 | # compiled with. 157 | #DEFS = $(TCL_DEFS) @DEFS@ $(PKG_CFLAGS) 158 | DEFS = @DEFS@ $(PKG_CFLAGS) 159 | 160 | # Move pkgIndex.tcl to 'BINARIES' var if it is generated in the Makefile 161 | CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl 162 | CLEANFILES = @CLEANFILES@ 163 | 164 | CPPFLAGS = @CPPFLAGS@ 165 | LIBS = @PKG_LIBS@ @LIBS@ 166 | AR = @AR@ 167 | CFLAGS = @CFLAGS@ 168 | COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) 169 | 170 | #======================================================================== 171 | # Start of user-definable TARGETS section 172 | #======================================================================== 173 | 174 | #======================================================================== 175 | # TEA TARGETS. Please note that the "libraries:" target refers to platform 176 | # independent files, and the "binaries:" target inclues executable programs and 177 | # platform-dependent libraries. Modify these targets so that they install 178 | # the various pieces of your package. The make and install rules 179 | # for the BINARIES that you specified above have already been done. 180 | #======================================================================== 181 | 182 | all: binaries libraries doc 183 | 184 | #======================================================================== 185 | # The binaries target builds executable programs, Windows .dll's, unix 186 | # shared/static libraries, and any other platform-dependent files. 187 | # The list of targets to build for "binaries:" is specified at the top 188 | # of the Makefile, in the "BINARIES" variable. 189 | #======================================================================== 190 | 191 | binaries: $(BINARIES) 192 | 193 | libraries: 194 | 195 | #======================================================================== 196 | # Your doc target should differentiate from doc builds (by the developer) 197 | # and doc installs (see install-doc), which just install the docs on the 198 | # end user machine when building from source. 199 | #======================================================================== 200 | 201 | doc: 202 | 203 | install: all install-binaries install-libraries install-doc 204 | 205 | install-binaries: binaries install-lib-binaries install-bin-binaries 206 | 207 | #======================================================================== 208 | # This rule installs platform-independent files, such as header files. 209 | # The list=...; for p in $$list handles the empty list case x-platform. 210 | #======================================================================== 211 | 212 | install-libraries: libraries 213 | @mkdir -p $(DESTDIR)$(includedir) 214 | @echo "Installing header files in $(DESTDIR)$(includedir)" 215 | @list='$(PKG_HEADERS)'; for i in $$list; do \ 216 | echo "Installing $(srcdir)/$$i" ; \ 217 | $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir) ; \ 218 | done; 219 | 220 | #======================================================================== 221 | # Install documentation. Unix manpages should go in the $(mandir) 222 | # directory. 223 | #======================================================================== 224 | 225 | install-doc: doc 226 | @mkdir -p $(DESTDIR)$(mandir)/mann 227 | @echo "Installing documentation in $(DESTDIR)$(mandir)" 228 | @list='$(srcdir)/doc/*.n'; for i in $$list; do \ 229 | echo "Installing $$i"; \ 230 | rm -f $(DESTDIR)$(mandir)/mann/`basename $$i`; \ 231 | $(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/mann ; \ 232 | done 233 | 234 | test: binaries libraries 235 | $(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS) 236 | 237 | shell: binaries libraries 238 | @$(TCLSH) $(SCRIPT) 239 | 240 | gdb: 241 | $(TCLSH_ENV) gdb $(TCLSH_PROG) $(SCRIPT) 242 | 243 | depend: 244 | 245 | #======================================================================== 246 | # $(PKG_LIB_FILE) should be listed as part of the BINARIES variable 247 | # mentioned above. That will ensure that this target is built when you 248 | # run "make binaries". 249 | # 250 | # The $(PKG_OBJECTS) objects are created and linked into the final 251 | # library. In most cases these object files will correspond to the 252 | # source files above. 253 | #======================================================================== 254 | 255 | $(PKG_LIB_FILE): $(PKG_OBJECTS) 256 | -rm -f $(PKG_LIB_FILE) 257 | ${MAKE_LIB} 258 | $(RANLIB) $(PKG_LIB_FILE) 259 | 260 | $(PKG_STUB_LIB_FILE): $(PKG_STUB_OBJECTS) 261 | -rm -f $(PKG_STUB_LIB_FILE) 262 | ${MAKE_STUB_LIB} 263 | $(RANLIB_STUB) $(PKG_STUB_LIB_FILE) 264 | 265 | #======================================================================== 266 | # We need to enumerate the list of .c to .o lines here. 267 | # 268 | # In the following lines, $(srcdir) refers to the toplevel directory 269 | # containing your extension. If your sources are in a subdirectory, 270 | # you will have to modify the paths to reflect this: 271 | # 272 | # sample.$(OBJEXT): $(srcdir)/generic/sample.c 273 | # $(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/sample.c` -o $@ 274 | # 275 | # Setting the VPATH variable to a list of paths will cause the makefile 276 | # to look into these paths when resolving .c to .obj dependencies. 277 | # As necessary, add $(srcdir):$(srcdir)/compat:.... 278 | #======================================================================== 279 | 280 | VPATH = $(srcdir):$(srcdir)/generic:$(srcdir)/unix:$(srcdir)/win 281 | 282 | .c.@OBJEXT@: 283 | $(COMPILE) -c `@CYGPATH@ $<` -o $@ 284 | 285 | #======================================================================== 286 | # Distribution creation 287 | # You may need to tweak this target to make it work correctly. 288 | #======================================================================== 289 | 290 | #COMPRESS = tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar 291 | COMPRESS = gtar zcvf $(PKG_DIR).tar.gz $(PKG_DIR) 292 | DIST_ROOT = /tmp/dist 293 | DIST_DIR = $(DIST_ROOT)/$(PKG_DIR) 294 | 295 | dist-clean: 296 | rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.* 297 | 298 | dist: dist-clean 299 | mkdir -p $(DIST_DIR) 300 | cp -p $(srcdir)/ChangeLog $(srcdir)/README* $(srcdir)/license* \ 301 | $(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \ 302 | $(DIST_DIR)/ 303 | chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4 304 | chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in 305 | 306 | for i in $(srcdir)/*.[ch]; do \ 307 | if [ -f $$i ]; then \ 308 | cp -p $$i $(DIST_DIR)/ ; \ 309 | fi; \ 310 | done; 311 | 312 | mkdir $(DIST_DIR)/tclconfig 313 | cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \ 314 | $(DIST_DIR)/tclconfig/ 315 | chmod 664 $(DIST_DIR)/tclconfig/tcl.m4 316 | chmod +x $(DIST_DIR)/tclconfig/install-sh 317 | 318 | list='demos doc generic library mac tests unix win'; \ 319 | for p in $$list; do \ 320 | if test -d $(srcdir)/$$p ; then \ 321 | mkdir $(DIST_DIR)/$$p; \ 322 | cp -p $(srcdir)/$$p/*.* $(DIST_DIR)/$$p/; \ 323 | fi; \ 324 | done 325 | 326 | (cd $(DIST_ROOT); $(COMPRESS);) 327 | 328 | #======================================================================== 329 | # End of user-definable section 330 | #======================================================================== 331 | 332 | #======================================================================== 333 | # Don't modify the file to clean here. Instead, set the "CLEANFILES" 334 | # variable in configure.in 335 | #======================================================================== 336 | 337 | clean: 338 | -test -z "$(BINARIES)" || rm -f $(BINARIES) 339 | -rm -f *.$(OBJEXT) core *.core 340 | -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) 341 | 342 | distclean: clean 343 | -rm -f *.tab.c 344 | -rm -f $(CONFIG_CLEAN_FILES) 345 | -rm -f config.cache config.log config.status 346 | 347 | #======================================================================== 348 | # Install binary object libraries. On Windows this includes both .dll and 349 | # .lib files. Because the .lib files are not explicitly listed anywhere, 350 | # we need to deduce their existence from the .dll file of the same name. 351 | # Library files go into the lib directory. 352 | # In addition, this will generate the pkgIndex.tcl 353 | # file in the install location (assuming it can find a usable tclsh shell) 354 | # 355 | # You should not have to modify this target. 356 | #======================================================================== 357 | 358 | install-lib-binaries: binaries 359 | @mkdir -p $(DESTDIR)$(pkglibdir) 360 | @list='$(lib_BINARIES)'; for p in $$list; do \ 361 | if test -f $$p; then \ 362 | echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \ 363 | $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \ 364 | stub=`echo $$p|sed -e "s/.*\(stub\).*/\1/"`; \ 365 | if test "x$$stub" = "xstub"; then \ 366 | echo " $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p"; \ 367 | $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p; \ 368 | else \ 369 | echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \ 370 | $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \ 371 | fi; \ 372 | ext=`echo $$p|sed -e "s/.*\.//"`; \ 373 | if test "x$$ext" = "xdll"; then \ 374 | lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \ 375 | if test -f $$lib; then \ 376 | echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \ 377 | $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \ 378 | fi; \ 379 | fi; \ 380 | fi; \ 381 | done 382 | @list='$(PKG_TCL_SOURCES)'; for p in $$list; do \ 383 | if test -f $(srcdir)/$$p; then \ 384 | destp=`basename $$p`; \ 385 | echo " Install $$destp $(DESTDIR)$(pkglibdir)/$$destp"; \ 386 | $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkglibdir)/$$destp; \ 387 | fi; \ 388 | done 389 | @if test "x$(SHARED_BUILD)" = "x1"; then \ 390 | echo " Install pkgIndex.tcl $(DESTDIR)$(pkglibdir)"; \ 391 | $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \ 392 | fi 393 | 394 | #======================================================================== 395 | # Install binary executables (e.g. .exe files and dependent .dll files) 396 | # This is for files that must go in the bin directory (located next to 397 | # wish and tclsh), like dependent .dll files on Windows. 398 | # 399 | # You should not have to modify this target, except to define bin_BINARIES 400 | # above if necessary. 401 | #======================================================================== 402 | 403 | install-bin-binaries: binaries 404 | @mkdir -p $(DESTDIR)$(bindir) 405 | @list='$(bin_BINARIES)'; for p in $$list; do \ 406 | if test -f $$p; then \ 407 | echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \ 408 | $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \ 409 | fi; \ 410 | done 411 | 412 | .SUFFIXES: .c .$(OBJEXT) 413 | 414 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 415 | cd $(top_builddir) \ 416 | && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status 417 | 418 | uninstall-binaries: 419 | list='$(lib_BINARIES)'; for p in $$list; do \ 420 | rm -f $(DESTDIR)$(pkglibdir)/$$p; \ 421 | done 422 | list='$(PKG_TCL_SOURCES)'; for p in $$list; do \ 423 | p=`basename $$p`; \ 424 | rm -f $(DESTDIR)$(pkglibdir)/$$p; \ 425 | done 426 | list='$(bin_BINARIES)'; for p in $$list; do \ 427 | rm -f $(DESTDIR)$(bindir)/$$p; \ 428 | done 429 | 430 | .PHONY: all binaries clean depend distclean doc install libraries test 431 | 432 | # Tell versions [3.59,3.63) of GNU make to not export all variables. 433 | # Otherwise a system limit (for SysV at least) may be exceeded. 434 | .NOEXPORT: 435 | -------------------------------------------------------------------------------- /tclconfig/ChangeLog: -------------------------------------------------------------------------------- 1 | 2013-10-08 Jan Nijtmans 2 | 3 | * unix/tcl.m4: Bug [172223e008]: Wrong filename in 4 | --disable-shared compile on MinGW 5 | 6 | 2013-10-04 Jan Nijtmans 7 | 8 | * unix/tcl.m4: stub library is no longer linked with msvcrt??.dll. 9 | 10 | 2013-10-01 Jan Nijtmans 11 | 12 | * unix/tcl.m4: Workaround for MinGW bug #2065: "gcc --shared" links 13 | with libgcc_s_dw2-1.dll when using 64-bit division in C 14 | 15 | 2013-07-04 Jan Nijtmans 16 | 17 | * unix/tcl.m4: Bug [3324676]: AC_PROG_INSTALL incompat, 18 | Bug [3606445]: Unneeded -DHAVE_NO_SEH=1 when not building on Windows 19 | 20 | 2013-07-02 Jan Nijtmans 21 | 22 | * unix/tcl.m4: Bug [32afa6e256]: dirent64 check is incorrect in tcl.m4 23 | (thanks to Brian Griffin) 24 | 25 | 2013-06-20 Jan Nijtmans 26 | 27 | * unix/tcl.m4: Use X11/Xlib.h for checking where X11 can be found 28 | in stead of X11/XIntrinsic.h. Suggested by Pietro Cerutti. 29 | 30 | 2013-06-04 Jan Nijtmans 31 | 32 | * unix/tcl.m4: Eliminate NO_VIZ macro as current 33 | zlib uses HAVE_HIDDEN in stead. One more last-moment 34 | fix for FreeBSD by Pietro Cerutti 35 | 36 | 2013-05-19 Jan Nijtmans 37 | 38 | * unix/tcl.m4: Fix for FreeBSD, and remove support for old 39 | FreeBSD versions. Patch by Pietro Cerutti 40 | 41 | 2013-03-12 Jan Nijtmans 42 | 43 | * unix/tcl.m4: Patch by Andrew Shadura, providing better support for 44 | * three architectures they have in Debian. 45 | 46 | 2012-08-07 Stuart Cassoff 47 | 48 | * tcl.m4: Added "-DNDEBUG" to CFLAGS_DEFAULT 49 | when building with --disable-symbols. 50 | 51 | 2012-08-07 Stuart Cassoff 52 | 53 | * tcl.m4: [Bug 3555058]: Checkin [30736d63f0] broke 54 | CFLAGS_DEFAULT, LDFLAGS_DEFAULT 55 | 56 | 2012-08-07 Stuart Cassoff 57 | 58 | * tcl.m4: [Bug 3511806]: Checkin [30736d63f0] broke CFLAGS 59 | 60 | 2012-08-07 Jan Nijtmans 61 | 62 | * tcl.m4: [Bug 3511806]: Checkin [30736d63f0] broke CFLAGS 63 | 64 | 2012-07-25 Jan Nijtmans 65 | 66 | * tcl.m4: My previous commit (2012-04-03) broke the ActiveTcl 67 | build for AMD64, because of the quotes in "C://AMD64/cl.exe". 68 | It turns out that the AC_TRY_COMPILE macro cannot handle that. 69 | 70 | 2012-07-22 Stuart Cassoff 71 | 72 | * tcl.m4: Tidy: consistency, spelling, phrasing, whitespace. 73 | No functional change. 74 | 75 | 2012-04-03 Jan Nijtmans 76 | 77 | * tcl.m4: [Bug 3511806] Compiler checks too early 78 | This change allows to build the cygwin and mingw32 ports of 79 | Tcl/Tk extensions to build out-of-the-box using a native or 80 | cross-compiler, e.g. on Cygwin, Linux or Darwin. 81 | 82 | 2011-04-02 Jan Nijtmans 83 | 84 | * install-sh: Fix issue with library stripping in install-sh 85 | (backported from kevin_walzer's patch from Tcl 8.6 trunk) 86 | 87 | 2011-04-05 Andreas Kupries 88 | 89 | * tcl.m4: Applied patch by Jeff Lawson. Nicer error message when 90 | tclConfig.sh was not found. 91 | 92 | 2010-12-15 Stuart Cassoff 93 | 94 | * install-sh: Upgrade to newer install-sh and use it. 95 | * tcl.m4: 96 | 97 | 2010-12-14 Stuart Cassoff 98 | 99 | * tcl.m4: Better building on OpenBSD. 100 | 101 | 2010-12-14 Jan Nijtmans 102 | 103 | * tcl.m4: when using gcc, don't try to determine Win64 SDK 104 | 105 | 2010-12-12 Jan Nijtmans 106 | 107 | * tcl.m4: Determine correctly a cross-compiler-windres 108 | 109 | 2010-11-23 Jan Nijtmans 110 | 111 | * tcl.m4: add some cross-compile support, borrowed from Tcl 8.6 112 | 113 | 2010-09-16 Jeff Hobbs 114 | 115 | * tcl.m4: correct HP-UX LDFLAGS (only used when building big shell) 116 | 117 | 2010-09-14 Jeff Hobbs 118 | 119 | * tcl.m4: add extra if check for .manifest file generation 120 | Add notice about package name and version being built. 121 | 122 | 2010-09-09 Jan Nijtmans 123 | 124 | * tcl.m4: [FREQ #3058486] TEA_LOAD_CONFIG doesn't set all BUILD_ vars 125 | Slightly related: defining BUILD_$1 on all platforms - not only win - 126 | allows the -fvisibility feature to be used in extensions as well, at 127 | least if you compile against tcl >= 8.5. 128 | 129 | 2010-08-26 Jeff Hobbs 130 | 131 | * tcl.m4: ensure safe quoting for autoheader usage 132 | 133 | 2010-08-19 Jeff Hobbs 134 | 135 | * tcl.m4: add TEA_ADD_CLEANFILES macro to make adding cleanfiles 136 | easier, and add *.exp to CLEANFILES Windows default. 137 | (TEA_MAKE_LIB): Enhanced to check for MSVC that requires manifests 138 | and auto-embed it into proj DLL via MAKE_SHARED_LIB. Also define 139 | VC_MANIFEST_EMBED_DLL and VC_MANIFEST_EMBED_EXE that do the same 140 | magic in case it is needed for extended TEA projects. 141 | 142 | 2010-08-16 Jeff Hobbs 143 | 144 | *** Bump to TEA_VERSION 3.9 *** 145 | If upgrading from TEA_VERSION 3.8, copy over tcl.m4, change 146 | TEA_INIT to use 3.9 and reconfigure (ac-2.59+). 147 | BUILD_${PACKAGE_NAME} will be auto-defined on Windows for 148 | correct setting of TCL_STORAGE_CLASS. 149 | TEA_LOAD_CONFIG users should remove the SHLIB_LD_LIBS setting done 150 | in configure.in (LIBS will be automagically populated by 151 | TEA_LOAD_CONFIG). 152 | TEA_EXPORT_CONFIG has been added for ${pkg}Config.sh creators 153 | SHLIB_LD_FLAGS was deprecated a while ago, remove it if it is 154 | still in your Makefile.in. 155 | 156 | * tcl.m4: add /usr/lib64 to set of auto-search dirs. [Bug 1230554] 157 | Auto-define BUILD_$PACKAGE_NAME so users don't need to. This 158 | needs to correspond with $pkg.h define magic for TCL_STORAGE_CLASS. 159 | Auto-define CLEANFILES. Users can expand it. 160 | (SHLIB_LD_LIBS): define to '${LIBS}' default and change it only if 161 | necessary. Platforms not using this may simply not work or have 162 | very funky linkers. 163 | (TEA_LOAD_CONFIG): When loading config for another extension, 164 | auto-add stub libraries found with TEA_ADD_LIBS. Eases 165 | configure.in for modules like itk and img::*. 166 | (TEA_EXPORT_CONFIG): Add standardized function for exporting a 167 | ${pkg}Config.sh. See use by img::* and itcl. 168 | 169 | 2010-08-12 Jeff Hobbs 170 | 171 | *** Bump to TEA_VERSION 3.8 *** 172 | If upgrading from TEA_VERSION 3.7, copy over tcl.m4, change 173 | TEA_INIT to use 3.8 and reconfigure (ac-2.59+). 174 | No other changes should be necessary. 175 | 176 | * tcl.m4: remove more vestigial bits from removed platforms. 177 | Add back SCO_SV-3.2*. 178 | Remove use of DL_LIBS and DL_OBJS and related baggage - these are 179 | only needed by the core to support 'load'. 180 | Allow for macosx in TEA_ADD_SOURCES. 181 | Correct check for found_xincludes=no in TEA_PATH_UNIX_X. 182 | 183 | 2010-08-11 Jeff Hobbs 184 | 185 | * tcl.m4: remove the following old platform configurations: 186 | UNIX_SV*|UnixWare-5*, SunOS-4.*, SINIX*5.4*, SCO_SV-3.2*, 187 | OSF1-1.*, NEXTSTEP-*, NetBSD-1.*|FreeBSD-[[1-2]].*, MP-RAS-*, 188 | IRIX-5.*, HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*, dgux*, 189 | BSD/OS-2.1*|BSD/OS-3* 190 | (AIX): drop AIX-pre4 support and use of ldAix, use -bexpall/-brtl 191 | 192 | 2010-07-05 Jan Nijtmans 193 | 194 | * tcl.m4: [Patch #1055668] removal of exported internals from 195 | tclInt.h (EXTERN macro) 196 | 197 | 2010-04-14 Jan Nijtmans 198 | 199 | * tcl.m4 - Backport a lot of quoting fixes from tcl8.6/unix/tcl.m4 200 | - Fix determination of CYGPATH for CYGWIN 201 | With those fixes, itcl and tdbc compile fine with CYGWIN 202 | 203 | 2010-04-06 Jan Nijtmans 204 | 205 | * install-sh [Bug 2982540] configure and install* script files 206 | should always have LF 207 | 208 | 2010-02-19 Stuart Cassoff 209 | 210 | * tcl.m4: Correct compiler/linker flags for threaded builds on 211 | OpenBSD. 212 | 213 | 2010-01-19 Jan Nijtmans 214 | 215 | * tcl.m4: Detect CYGWIN variant: win32 or unix 216 | 217 | 2010-01-03 Donal K. Fellows 218 | 219 | * unix/tcl.m4 (TEA_CONFIG_CFLAGS): [Tcl Bug 1636685]: Use the 220 | configuration for modern FreeBSD suggested by the FreeBSD porter. 221 | 222 | 2009-10-22 Jan Nijtmans 223 | 224 | * tcl.m4: [Tcl Patch #2883533] tcl.m4 support for Haiku OS 225 | 226 | 2009-04-27 Jeff Hobbs 227 | 228 | * tcl.m4 (TEA_CONFIG_CFLAGS): harden the check to add _r to CC on 229 | AIX with threads. 230 | 231 | 2009-04-10 Daniel Steffen 232 | 233 | * tcl.m4 (Darwin): check for 64-bit TkAqua. 234 | 235 | 2009-03-26 Jan Nijtmans 236 | 237 | * tclconfig/tcl.m4: Adapt LDFLAGS and LD_SEARCH_FLAGS 238 | together with SHLIB_LD definition to unbreak building on HPUX. 239 | 240 | 2009-03-20 Andreas Kupries 241 | 242 | * tclconfig/tcl.m4: Changed SHLIB_LD definition to unbreak 243 | building on HPUX. 244 | 245 | 2009-03-16 Joe English 246 | 247 | * tcl.m4(TEA_PUBLIC_TK_HEADERS): Look at ${TK_INCLUDE_SPEC} 248 | (found in tkConfig.sh) when trying to guess where tk.h might be 249 | [Patch 1960628]. 250 | 251 | 2009-03-11 Joe English 252 | 253 | * tcl.m4: Allow ${SHLIB_SUFFIX} to be overridden at 254 | configure-time [Patch 1960628]. Also fix some comment typos, 255 | and an uninitialized variable bug-waiting-to-happen. 256 | 257 | 2008-12-21 Jan Nijtmans 258 | 259 | * tcl.m4: [Bug 2073255] Tcl_GetString(NULL) doesn't crash on HP-UX 260 | (this bug report was for Tcl, but holds for TEA as well.) 261 | 262 | 2008-12-20 Daniel Steffen 263 | 264 | * tcl.m4: sync with tdbc tcl.m4 changes 265 | (SunOS-5.11): Sun cc SHLIB_LD: use LDFLAGS_DEFAULT instead of LDFLAGS 266 | 267 | 2008-12-02 Jeff Hobbs 268 | 269 | *** Bump to TEA_VERSION 3.7 *** 270 | 271 | * tcl.m4: in private header check, check for Port.h instead 272 | of Int.h to ensure all private headers are available. 273 | 274 | 2008-11-04 Daniel Steffen 275 | 276 | * tcl.m4 (Darwin): sync TEA_PRIVATE_TK_HEADERS handling of 277 | Tk.framework PrivateHeaders with TEA_PRIVATE_TCL_HEADERS. 278 | 279 | 2008-11-04 Jeff Hobbs 280 | 281 | * tcl.m4 (TEA_PATH_TCLCONFIG, TEA_PATH_TKCONFIG): exit with error 282 | when tclConfig.sh cannot be found. [Bug #1997760] 283 | (TEA_PRIVATE_TCL_HEADERS, TEA_PRIVATE_TK_HEADERS): allow for 284 | finding the headers installed in the public areas, e.g. a result of 285 | make install-private-headers. [Bug #1631922] 286 | 287 | 2008-08-12 Daniel Steffen 288 | 289 | * tcl.m4 (Darwin): link shlib with current and compatiblity version 290 | flags; look for libX11.dylib when searching for X11 libraries. 291 | 292 | 2008-06-12 Daniel Steffen 293 | 294 | * tcl.m4 (SunOS-5.11): fix 64bit amd64 support with gcc & Sun cc. 295 | 296 | 2008-03-27 Daniel Steffen 297 | 298 | * tcl.m4 (SunOS-5.1x): fix 64bit support for Sun cc. [Bug 1921166] 299 | 300 | 2008-02-01 Donal K. Fellows 301 | 302 | * tcl.m4 (TEA_CONFIG_CFLAGS): Updated to work at least in part with 303 | more modern VC versions. Currently just made the linker flags more 304 | flexible; more work may be needed. 305 | 306 | 2007-10-26 Daniel Steffen 307 | 308 | * tcl.m4 (Darwin): add support for 64-bit X11. 309 | 310 | 2007-10-23 Jeff Hobbs 311 | 312 | *** Tagged tea-3-branch to start TEA 4 development on HEAD *** 313 | 314 | 2007-09-17 Joe English 315 | 316 | * tcl.m4: use '${CC} -shared' instead of 'ld -Bshareable' 317 | to build shared libraries on current NetBSDs [Bug 1749251]. 318 | 319 | 2007-09-15 Daniel Steffen 320 | 321 | * tcl.m4: replace all direct references to compiler by ${CC} to 322 | enable CC overriding at configure & make time. 323 | (SunOS-5.1x): replace direct use of '/usr/ccs/bin/ld' in SHLIB_LD by 324 | 'cc' compiler driver. 325 | 326 | 2007-08-08 Jeff Hobbs 327 | 328 | * tcl.m4: check Ttk dir for Tk private headers (8.5). 329 | Add some comments to other bits. 330 | 331 | 2007-06-25 Jeff Hobbs 332 | 333 | * tcl.m4 (TEA_PROG_TCLSH, TEA_PROG_WISH): move where / is added. 334 | 335 | 2007-06-13 Jeff Hobbs 336 | 337 | * tcl.m4: fix --with-tkinclude alignment. [Bug 1506111] 338 | 339 | 2007-06-06 Daniel Steffen 340 | 341 | * tcl.m4 (Darwin): fix 64bit arch removal in fat 32&64bit builds. 342 | 343 | 2007-05-18 Donal K. Fellows 344 | 345 | * tcl.m4: Added quoting so that paths with spaces cause fewer 346 | problems. 347 | 348 | 2007-03-07 Daniel Steffen 349 | 350 | * tcl.m4 (Darwin): s/CFLAGS/CPPFLAGS/ in -mmacosx-version-min check. 351 | 352 | 2007-02-15 Jeff Hobbs 353 | 354 | * tcl.m4: correct private header check to search in generic subdir 355 | 356 | 2007-02-09 Jeff Hobbs 357 | 358 | *** Bump to TEA_VERSION 3.6 *** 359 | 360 | * tcl.m4: correct -d to -f 361 | (TEA_CONFIG_CFLAGS): SHLIB_SUFFIX is .so on HP ia64 [Bug 1615058] 362 | 363 | 2007-02-08 Jeff Hobbs 364 | 365 | * tcl.m4 (TEA_PRIVATE_TCL_HEADERS, TEA_PRIVATE_TK_HEADERS): check 366 | that the dirs actually have private headers. [Bug 1631922] 367 | 368 | 2007-02-04 Daniel Steffen 369 | 370 | * tcl.m4: add caching to -pipe check. 371 | 372 | 2007-01-25 Daniel Steffen 373 | 374 | * tcl.m4: integrate CPPFLAGS into CFLAGS as late as possible and 375 | move (rather than duplicate) -isysroot flags from CFLAGS to CPPFLAGS to 376 | avoid errors about multiple -isysroot flags from some older gcc builds. 377 | 378 | 2006-01-19 Daniel Steffen 379 | 380 | * tcl.m4: ensure CPPFLAGS env var is used when set. [Bug 1586861] 381 | (Darwin): add -isysroot and -mmacosx-version-min flags to CPPFLAGS when 382 | present in CFLAGS to avoid discrepancies between what headers configure 383 | sees during preprocessing tests and compiling tests. 384 | 385 | 2006-12-19 Daniel Steffen 386 | 387 | * tcl.m4 (Darwin): --enable-64bit: verify linking with 64bit -arch flag 388 | succeeds before enabling 64bit build. 389 | 390 | 2006-12-16 Daniel Steffen 391 | 392 | * tcl.m4 (Linux): fix previous change to use makefile variable 393 | LDFLAGS_DEFAULT instead of LDFLAGS in SHLIB_LD, to ensure linker 394 | flags in sampleextension Makefile are picked up. 395 | 396 | 2006-11-26 Daniel Steffen 397 | 398 | * tcl.m4 (Linux): --enable-64bit support. [Patch 1597389], [Bug 1230558] 399 | 400 | 2006-08-18 Daniel Steffen 401 | 402 | * tcl.m4 (Darwin): add support for --enable-64bit on x86_64, for 403 | universal builds including x86_64 and for use of -mmacosx-version-min 404 | instead of MACOSX_DEPLOYMENT_TARGET. For Tk extensions, remove 64-bit 405 | arch flags from CFLAGS like in the Tk configure, as neither TkAqua nor 406 | TkX11 can be built for 64-bit at present. 407 | 408 | 2006-03-28 Jeff Hobbs 409 | 410 | * tcl.m4: []-quote AC_DEFUN functions. 411 | (TEA_PATH_TKCONFIG): Fixed Windows-specific check for tkConfig.sh. 412 | (TEA_MAKE_LIB): Prepend 'lib' for Windows-gcc configs. 413 | 414 | 2006-03-07 Joe English 415 | 416 | * tcl.m4: Set SHLIB_LD_FLAGS='${LIBS}' on NetBSD, 417 | as per the other *BSD variants [Bug 1334613]. 418 | 419 | 2006-01-25 Jeff Hobbs 420 | 421 | *** Bump to TEA version 3.5 *** 422 | 423 | * tcl.m4: keep LD_SEARCH_FLAGS and CC_SEARCH_FLAGS synchronous 424 | with core tcl.m4 meaning. 425 | 426 | 2006-01-24 Daniel Steffen 427 | 428 | * tcl.m4 (Darwin): use makefile variable LDFLAGS_DEFAULT instead of 429 | LDFLAGS in SHLIB_LD, to ensure linker flags in sampleextension Makefile 430 | are picked up. [Bug 1403343] 431 | 432 | 2006-01-23 Jeff Hobbs 433 | 434 | * tcl.m4: add C:/Tcl/lib and C:/Progra~1/Tcl/lib dirs to check for 435 | *Config.sh on Windows. [Bug 1407544] 436 | 437 | 2006-01-23 Daniel Steffen 438 | 439 | * tcl.m4 (Darwin): for Tk extensions, remove -arch ppc64 from CFLAGS 440 | like in the Tk configure, as neither TkAqua nor TkX11 can be built for 441 | 64bit at present (no 64bit GUI libraries). 442 | 443 | 2006-01-22 Jeff Hobbs 444 | 445 | * tcl.m4: restore system=windows on Windows. 446 | Remove error if 'ar' isn't found (it may not be on Windows). 447 | Do not add -lxnet or define _XOPEN_SOURCE on HP-UX by default. 448 | Ensure the C|LDFLAGS_DEFAULT gets the fully sub'd value at 449 | configure time. 450 | 451 | 2006-01-10 Daniel Steffen 452 | 453 | * tcl.m4: add caching, use AC_CACHE_CHECK instead of AC_CACHE_VAL 454 | where possible, consistent message quoting, sync relevant 455 | tcl/unix/tcl.m4 HEAD changes and gratuitous formatting differences 456 | (notably sunc removal of support for for ancient BSD's, IRIX 4, 457 | RISCos and Ultrix by kennykb), Darwin improvements to 458 | TEA_LOAD_*CONFIG to make linking work against Tcl/Tk frameworks 459 | installed in arbitrary location, change TEA_PROG_* search order 460 | (look in *_BIN_DIR parents before *_PREFIX). 461 | 462 | 2006-01-05 Jeff Hobbs 463 | 464 | * tcl.m4: add dkf's system config refactor 465 | 466 | 2006-01-04 Jeff Hobbs 467 | 468 | * tcl.m4: remove extraneous ' that causes bash 3.1 to choke 469 | 470 | 2005-12-19 Joe English 471 | 472 | * tcl.m4 (TEA_PATH_TCLCONFIG &c): Look for tclConfig.sh &c 473 | in ${libdir}, where they are installed by default [Patch #1377407]. 474 | 475 | 2005-12-05 Don Porter 476 | 477 | * tcl.m4 (TEA_PUBLIC_*_HEADERS): Better support for finding 478 | header files for uninstalled Tcl and Tk. 479 | 480 | 2005-12-02 Jeff Hobbs 481 | 482 | * tcl.m4: correctly bump TEA_VERSION var to 3.4 483 | 484 | 2005-12-01 Daniel Steffen 485 | 486 | * unix/tcl.m4 (Darwin): fixed error when MACOSX_DEPLOYMENT_TARGET unset 487 | 488 | 2005-11-29 Jeff Hobbs 489 | 490 | * tcl.m4: *** Bump to TEA version 3.4 *** 491 | Add Windows x64 build support. 492 | Remove TEA_PATH_NOSPACE and handle the problem with ""s where 493 | necessary - the macro relied on TCLSH_PROG which didn't work for 494 | cross-compiles. 495 | 496 | 2005-11-27 Daniel Steffen 497 | 498 | * tcl.m4 (Darwin): add 64bit support, add CFLAGS to SHLIB_LD to 499 | support passing -isysroot in env(CFLAGS) to configure (flag can't 500 | be present twice, so can't be in both CFLAGS and LDFLAGS during 501 | configure), don't use -prebind when deploying on 10.4. 502 | (TEA_ENABLE_LANGINFO, TEA_TIME_HANDLER): add/fix caching. 503 | 504 | 2005-10-30 Daniel Steffen 505 | 506 | * tcl.m4: fixed two tests for TEA_WINDOWINGSYSTEM = "aqua" that 507 | should have been for `uname -s` = "Darwin" instead; added some 508 | missing quoting. 509 | (TEA_PROG_TCLSH, TEA_PROG_WISH): fix incorrect assumption that 510 | install location of tclConfig.sh/tkConfig.sh allows to determine 511 | the tclsh/wish install dir via ../bin. Indeed tcl/tk can be 512 | configured with arbitrary --libdir and --bindir (independent of 513 | prefix) and such a configuration is in fact standard with Darwin 514 | framework builds. At least now also check ${TCL_PREFIX}/bin 515 | resp. ${TK_PREFIX}/bin for presence of tclsh resp. wish (if tcl/tk 516 | have been configured with arbitrary --bindir, this will still not 517 | find them, for a general solution *Config.sh would need to contain 518 | the values of bindir/libdir/includedir passed to configure). 519 | 520 | 2005-10-07 Jeff Hobbs 521 | 522 | * tcl.m4: Fix Solaris 5.10 check and Solaris AMD64 64-bit builds. 523 | 524 | 2005-10-04 Jeff Hobbs 525 | 526 | * tcl.m4 (TEA_PRIVATE_TCL_HEADERS): add / to finish sed macro 527 | (TEA_ENABLE_THREADS): don't check for pthread_attr_setstacksize func 528 | 529 | 2005-09-13 Jeff Hobbs 530 | 531 | * tcl.m4: *** Update to TEA version 3.3 *** 532 | define TEA_WINDOWINGSYSTEM in TEA_LOAD_TKCONFIG. 533 | Make --enable-threads the default (users can --disable-threads). 534 | Improve AIX ${CC}_r fix to better check existing ${CC} value. 535 | Do the appropriate evals to not require the *TOP_DIR_NATIVE vars 536 | be set for extensions that use private headers. 537 | Make aqua check for Xlib compat headers the same as win32. 538 | 539 | 2005-07-26 Mo DeJong 540 | 541 | * tcl.m4 (TEA_PROG_TCLSH, TEA_BUILD_TCLSH, 542 | TEA_PROG_WISH, TEA_BUILD_WISH): Remove 543 | TEA_BUILD_TCLSH and TEA_BUILD_WISH because 544 | of complaints that it broke the build when 545 | only an installed version of Tcl was available 546 | at extension build time. The TEA_PROG_TCLSH and 547 | TEA_PROG_WISH macros will no longer search the 548 | path at all. The build tclsh or installed 549 | tclsh shell will now be found by TEA_PROG_TCLSH. 550 | 551 | 2005-07-24 Mo DeJong 552 | 553 | * tcl.m4 (TEA_PROG_TCLSH, TEA_BUILD_TCLSH, 554 | TEA_PROG_WISH, TEA_BUILD_WISH): 555 | Split confused search for tclsh on PATH and 556 | build and install locations into two macros. 557 | TEA_PROG_TCLSH and TEA_PROG_WISH search the 558 | system PATH for an installed tclsh or wish. 559 | The TEA_BUILD_TCLSH and TEA_BUILD_WISH 560 | macros determine the name of tclsh or 561 | wish in the Tcl or Tk build directory even 562 | if tclsh or wish has not yet been built. 563 | [Tcl bug 1160114] 564 | [Tcl patch 1244153] 565 | 566 | 2005-06-23 Daniel Steffen 567 | 568 | * tcl.m4 (TEA_PRIVATE_TK_HEADERS): add ${TK_SRC_DIR}/macosx to 569 | TK_INCLUDES when building against TkAqua. 570 | 571 | * tcl.m4 (TEA_PATH_X): fixed missing comma in AC_DEFINE 572 | 573 | * tcl.m4: changes to better support framework builds of Tcl and Tk out 574 | of the box: search framework install locations for *Config.sh, and if in 575 | presence of a framework build, use the framework's Headers and 576 | PrivateHeaders directories for public and private includes. [FR 947735] 577 | 578 | 2005-06-18 Daniel Steffen 579 | 580 | * tcl.m4 (Darwin): add -headerpad_max_install_names to LDFLAGS to 581 | ensure we can always relocate binaries with install_name_tool. 582 | 583 | 2005-06-04 Daniel Steffen 584 | 585 | * tcl.m4 (TEA_PATH_X): for TEA_WINDOWINGSYSTEM == aqua, check if xlib 586 | compat headers are available in tkheaders location, otherwise add xlib 587 | sourcedir to TK_XINCLUDES. 588 | 589 | 2005-04-25 Daniel Steffen 590 | 591 | * tcl.m4: added AC_DEFINE* descriptions (from core tcl.m4) to allow 592 | use with autoheader. 593 | (Darwin): added configure checks for recently added linker flags 594 | -single_module and -search_paths_first to allow building with older 595 | tools (and on Mac OS X 10.1), use -single_module in SHLIB_LD. 596 | (TEA_MISSING_POSIX_HEADERS): added caching of dirent.h check. 597 | (TEA_BUGGY_STRTOD): added caching (sync with core tcl.m4). 598 | 599 | 2005-03-24 Jeff Hobbs 600 | 601 | * tcl.m4 (TEA_TCL_64BIT_FLAGS): use Tcl header defaults for wide 602 | int type only on Windows when __int64 is detected as valid. 603 | 604 | 2005-03-24 Don Porter 605 | 606 | * README.txt: Update reference to "SC_* macros" to "TEA_* macros". 607 | * tcl.m4: Incorporated recent improvements in SC_PATH_TCLCONFIG 608 | and SC_PATH_TKCONFIG into TEA_PATH_TCLCONFIG and TEA_PATH_TKCONFIG. 609 | Corrected search path in TEA_PATH_CONFIG and added 610 | AC_SUBST($1_BIN_DIR) to TEA_LOAD_CONFIG so that packages that load 611 | the configuration of another package can know where they loaded 612 | it from. 613 | 614 | 2005-03-18 Jeff Hobbs 615 | 616 | * tcl.m4 (TEA_CONFIG_CFLAGS): correct 2005-03-17 change to have 617 | variant LD_SEARCH_FLAGS for gcc and cc builds. 618 | 619 | * tcl.m4 (TEA_PROG_TCLSH, TEA_PROG_WISH): correct x-compile check. 620 | 621 | 2005-03-17 Jeff Hobbs 622 | 623 | * tcl.m4: Correct gcc build and HP-UX-11. 624 | 625 | 2005-02-08 Jeff Hobbs 626 | 627 | * tcl.m4 (TEA_ADD_LIBS): don't touch lib args starting with -. 628 | (TEA_CONFIG_CFLAGS): only define _DLL for CE in shared build. 629 | (TEA_MAKE_LIB): set RANLIB* to : on Windows (it's not needed). 630 | 631 | 2005-02-01 Jeff Hobbs 632 | 633 | * tcl.m4: redo of 2005-01-27 changes to correctly handle paths 634 | with spaces. Win/CE and Win/64 builds now require a prebuilt 635 | tclsh to handle conversion to short pathnames. This is done in 636 | the new TEA_PATH_NOSPACE macro. For Win/CE|64, make CC just the 637 | compiler and move the necessary includes to CFLAGS. 638 | (TEA_CONFIG_CFLAGS): Add Solaris 64-bit gcc build support. 639 | (TEA_PROG_TCLSH, TEA_PROG_WISH): Allow TCLSH_PROG and WISH_PROG to 640 | be set in the env and prevent resetting. 641 | (TEA_ADD_LIBS): On Windows using GCC (mingw), convert foo.lib 642 | args to -lfoo, for use with mingw. 643 | *** POTENTIAL INCOMPATABILITY *** 644 | (TEA_CONFIG_CFLAGS): Fix AIX gcc builds to work out-of-box. 645 | Bumped TEA to 3.2. 646 | 647 | 2005-01-27 Jeff Hobbs 648 | 649 | * tcl.m4: remove cygpath calls to support msys. 650 | Update base CE build assumption to "420,ARMV4,ARM,Pocket PC 2003". 651 | Make STLIB_LD use $LINKBIN -lib. 652 | 653 | 2005-01-25 Daniel Steffen 654 | 655 | * tcl.m4 (Darwin): fixed bug with static build linking to dynamic 656 | library in /usr/lib etc instead of linking to static library earlier 657 | in search path. [Tcl Bug 956908] 658 | Removed obsolete references to Rhapsody. 659 | 660 | 2004-12-29 Jeff Hobbs 661 | 662 | * tcl.m4: Updates for VC7 compatibility, fixing CFLAGS and LDFLAGS 663 | options, using better default -O levels. [Bug 1092952, 1091967] 664 | 665 | 2004-12-29 Joe English 666 | 667 | * tcl.m4: Do not use ${DBGX} suffix when building 668 | shared libraries [patch #1081595, TIP #34] 669 | 670 | 2004-09-07 Jeff Hobbs 671 | 672 | * tcl.m4 (TEA_CONFIG_CFLAGS): support eVC4 Win/CE builds 673 | 674 | 2004-08-10 Jeff Hobbs 675 | 676 | * tcl.m4 (TEA_INIT, TEA_PREFIX): update handling of exec_prefix to 677 | work around subdir configures since autoconf only propagates the 678 | prefix (not exec_prefix). 679 | 680 | 2004-07-23 Daniel Steffen 681 | 682 | * tcl.m4 (TEA_CONFIG_CFLAGS): Darwin section: brought inline with 683 | Tcl 8.5 HEAD config, removed core specific & obsolete settings. 684 | 685 | 2004-07-22 Jeff Hobbs 686 | 687 | * tcl.m4 (TEA_PATH_X): check in TK_DEFS for MAC_OSX_TK to see if 688 | we are compiling on Aqua. Add TEA_WINDOWINGSYSTEM var that 689 | reflects 'tk windowingsystem' value. 690 | 691 | 2004-07-16 Jeff Hobbs 692 | 693 | * tcl.m4 (TEA_ENABLE_THREADS): force a threaded build when 694 | building against a threaded core. 695 | (CFLAGS_WARNING): Remove -Wconversion for gcc builds 696 | (TEA_CONFIG_CFLAGS): Reorder configure.in for better 64-bit build 697 | configuration, replacing EXTRA_CFLAGS with CFLAGS. [Bug #874058] 698 | Update to latest Tcl 8.5 head config settings. 699 | Call this TEA version 3.1. 700 | 701 | 2004-04-29 Jeff Hobbs 702 | 703 | * tcl.m4 (TEA_TCL_64BIT_FLAGS): replace AC_TRY_RUN test with 704 | AC_TRY_COMPILE for the long vs. long long check. (kenny) 705 | 706 | 2004-04-26 Jeff Hobbs 707 | 708 | * tcl.m4 (TEA_TCL_64BIT_FLAGS): update against core tcl.m4 to 709 | define TCL_WIDE_INT_IS_LONG if 'using long'. 710 | 711 | 2004-03-19 Jeff Hobbs 712 | 713 | * tcl.m4: correct Windows builds getting LDFLAGS info in MAKE_LIB 714 | 715 | 2004-02-11 Jeff Hobbs 716 | 717 | * tcl.m4: correct TCL_INCLUDES for private headers on Windows - it 718 | doesn't need the eval. 719 | 720 | 2004-02-10 Jeff Hobbs 721 | 722 | * tcl.m4: don't require TK_INCLUDES and TCL_INCLUDES to have the 723 | DIR_NATIVE vars defined when using private headers on unix. 724 | Allow $... to TEA_ADD_SOURCES for constructs like 725 | TEA_ADD_SOURCES([\$(WIN_OBJECTS)]), that allow the developer to 726 | place more in the Makefile.in. 727 | tkUnixPort.h checks for HAVE_LIMITS_H, so do both HAVE and 728 | CHECK on limits.h 729 | 730 | 2003-12-10 Jeff Hobbs 731 | 732 | * Makefile.in: added TEA_ADD_LIBS, TEA_ADD_INCLUDES and 733 | * configure: TEA_ADD_CFLAGS to configurable parameters with 734 | * configure.in: PKG_* equivs in the Makefile. This allows the 735 | * tclconfig/tcl.m4: user to worry less about actual magic VAR names. 736 | Corrected Makefile.in to note that TEA_ADD_TCL_SOURCES requires 737 | exact file names. 738 | 739 | 2003-12-09 Jeff Hobbs 740 | 741 | * tcl.m4: updated OpenBSD support based on [Patch #775246] (cassoff) 742 | 743 | 2003-12-05 Jeff Hobbs 744 | 745 | * configure: 746 | * configure.in: 747 | * Makefile.in (VPATH): readd $(srcdir) to front of VPATH as the 748 | first part of VPATH can get chopped off. 749 | Change .c.$(OBJEXT) rule to .c.@OBJEXT@ to support more makes. 750 | * tclconfig/tcl.m4: add TEA_ADD_STUB_SOURCES to support libstub 751 | generation and TEA_ADD_TCL_SOURCES to replace RUNTIME_SOURCES as 752 | the way the user specifies library files. 753 | 754 | 2003-12-03 Jeff Hobbs 755 | 756 | * configure: Update of TEA spec to (hopefully) simplify 757 | * configure.in: some aspects of TEA by making use of more 758 | * Makefile.in: AC 2.5x features. Use PACKAGE_NAME (instead 759 | * generic/tclsample.c: of PACKAGE) and PACKAGE_VERSION (instead of 760 | * tclconfig/tcl.m4: VERSION) arguments to AC_INIT as the TEA 761 | package name and version. 762 | Provide a version argument to TEA_INIT - starting with 3.0. 763 | Drop all use of interior shell substs that older makefiles didn't 764 | like. Use PKG_* naming convention instead. 765 | Move specification of source files and public headers into 766 | configure.in with TEA_ADD_SOURCES and TEA_ADD_HEADERS. These will 767 | be munged during ./configure into the right obj file names (no 768 | $(SOURCES:.c=.obj) needed). 769 | There is almost nothing that should be touched in Makefile.in now 770 | for the developer. May want to add a TEA_ADD_TCL_SOURCES for the 771 | RUNTIME_SOURCES that remains. 772 | Use SHLID_LD_FLAGS (instead of SHLID_LDFLAGS) as Tcl does. 773 | Only specify the user requested LDFLAGS/CFLAGS in the Makefile, 774 | don't mention the _OPTIMIZE/_DEBUG variants. 775 | 776 | 2003-10-15 Jeff Hobbs 777 | 778 | * tcl.m4: create a TEA_SETUP_COMPILER_CC the precedes the 779 | TEA_SETUP_COMPILER macro. They are split so the check for CC 780 | occurs before any use of CC. Also add AC_PROG_CPP to the compiler 781 | checks. 782 | 783 | 2003-10-06 Jeff Hobbs 784 | 785 | * tcl.m4: Updated for autoconf 2.5x prereq. 786 | Where TCL_WIDE_INT_TYPE would be __int64, defer to the code checks 787 | in tcl.h, which also handles TCL_LL_MODIFIER* properly. 788 | 789 | 2003-04-22 Jeff Hobbs 790 | 791 | * tcl.m4: correct default setting of ARCH for WinCE builds. 792 | Correct \ escaping for CE sed macros. 793 | 794 | 2003-04-10 Jeff Hobbs 795 | 796 | * tcl.m4: replace $(syscal) construct with older `syscall` for 797 | systems where sh != bash. 798 | 799 | 2003-04-09 Jeff Hobbs 800 | 801 | * tcl.m4 (TEA_WITH_CELIB): add --enable-wince and --with-celib 802 | options for Windows/CE compilation support. Requires the 803 | Microsoft eMbedded SDK and Keuchel's celib emulation layer. 804 | 805 | 2003-02-18 Jeff Hobbs 806 | 807 | * tcl.m4 (TEA_ENABLE_THREADS): Make sure -lpthread gets passed on 808 | the link line when checking for the pthread_attr_setstacksize 809 | symbol. (dejong) 810 | 811 | * tcl.m4 (TEA_SETUP_COMPILER): added default calls to 812 | TEA_TCL_EARLY_FLAGS, TEA_TCL_64BIT_FLAGS, 813 | TEA_MISSING_POSIX_HEADERS and TEA_BUGGY_STRTOD. 814 | 815 | 2003-02-14 Jeff Hobbs 816 | 817 | * tcl.m4: correct HP-UX ia64 --enable-64bit build flags 818 | 819 | 2003-01-29 Jeff Hobbs 820 | 821 | * tcl.m4: check $prefix/lib as well as $exec_prefix/lib when 822 | looking for tcl|tkConfig.sh, as this check is done before we would 823 | set exec_prefix when the user does not define it. 824 | 825 | 2003-01-21 Mo DeJong 826 | 827 | * tcl.m4 (TEA_CONFIG_CFLAGS): Fix build support 828 | for mingw, the previous implementation would 829 | use VC++ when compiling with mingw gcc. Don't 830 | pass -fPIC since gcc always compiles pic code 831 | under win32. Change some hard coded cases 832 | of gcc to ${CC}. 833 | 834 | 2002-10-15 Jeff Hobbs 835 | 836 | * tcl.m4: move the CFLAGS definition from TEA_ENABLE_SHARED to 837 | TEA_MAKE_LIB because setting too early confuses other AC_* macros. 838 | Correct the HP-11 SHLIB_LD_LIBS setting. 839 | 840 | * tcl.m4: add the CFLAGS definition into TEA_ENABLE_SHARED and 841 | make it pick up the env CFLAGS at configure time. 842 | 843 | 2002-10-09 Jeff Hobbs 844 | 845 | * tcl.m4: add --enable-symbols=mem option to enable TCL_MEM_DEBUG. 846 | Improved AIX 64-bit build support, allow it on AIX-4 as well. 847 | Enable 64-bit HP-11 compilation with gcc. 848 | Enable 64-bit IRIX64-6 cc build support. 849 | Correct FreeBSD thread library linkage. 850 | Add OSF1 static build support. 851 | Improve SunOS-5 shared build SHLIB_LD macro. 852 | 853 | 2002-07-20 Zoran Vasiljevic 854 | 855 | * tcl.m4: Added MINGW32 to list of systems checked for Windows build. 856 | Also, fixes some indentation issues with "--with-XXX" options. 857 | 858 | 2002-04-23 Jeff Hobbs 859 | 860 | * tcl.m4 (TEA_ENABLE_THREADS): added USE_THREAD_ALLOC define to 861 | use new threaded allocatory by default on Unix for Tcl 8.4. 862 | (TEA_CONFIG_CFLAGS): corrected LD_SEARCH_FLAGS for FreeBSD-3+. 863 | 864 | 2002-04-22 Jeff Hobbs 865 | 866 | * tcl.m4 (TEA_SETUP_COMPILER): removed call to AC_CYGWIN so that 867 | we can use autoconf 2.5x as well as 2.13. This prevents us from 868 | being able to warn against the use of cygwin gcc at configure 869 | time, but allows autoconf 2.5x, which is what is shipped with most 870 | newer systems. 871 | 872 | 2002-04-11 Jeff Hobbs 873 | 874 | * tcl.m4: Enabled COFF as well as CV style debug info with 875 | --enable-symbols to allow Dr. Watson users to see function info. 876 | More info on debugging levels can be obtained at: 877 | http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp 878 | 879 | 2002-04-03 Jeff Hobbs 880 | 881 | * tcl.m4: change all SC_* macros to TEA_*. The SC_ was for 882 | Scriptics, which is no more. TEA represents a better, independent 883 | prefix that won't need changing. 884 | Added preliminary mingw gcc support. [Patch #538772] 885 | Added TEA_PREFIX macro that handles defaulting the prefix and 886 | exec_prefix vars to those used by Tcl if none were specified. 887 | Added TEA_SETUP_COMPILER macro that encompasses the AC_PROG_CC 888 | check and several other basic AC_PROG checks needed for making 889 | executables. This greatly simplifies user's configure.in files. 890 | Collapsed AIX-5 defines into AIX-* with extra checks for doing the 891 | ELF stuff on AIX-5-ia64. 892 | Updated TEA_ENABLE_THREADS to take an optional arg to allow 893 | switching it on by default (for Thread) and add sanity checking to 894 | warn the user if configuring threads incompatibly. 895 | 896 | 2002-03-29 Jeff Hobbs 897 | 898 | * tcl.m4: made sure that SHLIB_LDFLAGS was set to LDFLAGS_DEFAULT. 899 | Removed --enable-64bit support for AIX-4 because it wasn't correct. 900 | Added -MT or -MD Windows linker switches to properly support 901 | symbols-enabled builds. 902 | 903 | 2002-03-28 Jeff Hobbs 904 | 905 | * tcl.m4: called AC_MSG_ERROR when SC_TEA_INIT wasn't called first 906 | instead of calling it as that inlines it each time in shell code. 907 | Changed Windows CFLAGS_OPTIMIZE to use -O2 instead of -Oti. 908 | Noted TCL_LIB_VERSIONS_OK=nodots for Windows builds. 909 | A few changes to support itcl (and perhaps others): 910 | Added support for making your own stub libraries to SC_MAKE_LIB. 911 | New SC_PATH_CONFIG and SC_LOAD_CONFIG that take a package name arg 912 | and find that ${pkg}Config.sh file. itk uses this for itcl. 913 | 914 | 2002-03-27 Jeff Hobbs 915 | 916 | * tcl.m4: made SC_LOAD_TKCONFIG recognize when working with a Tk 917 | build dir setup. 918 | Added EXTRA_CFLAGS and SHLIB_LD_LIBS substs to SC_CONFIG_CFLAGS. 919 | Added XLIBSW onto LIBS when it is defined. 920 | Remove TCL_LIBS from MAKE_LIB and correctly use SHLIB_LD_LIBS 921 | instead to not rely as much on tclConfig.sh cached info. 922 | Add TK_BIN_DIR to paths to find wish in SC_PROG_WISH. 923 | These move towards making TEA much more independent of *Config.sh. 924 | 925 | 2002-03-19 Jeff Hobbs 926 | 927 | * tcl.m4: corrected forgotten (UN)SHARED_LIB_SUFFIX and 928 | SHLIB_SUFFIX defines for Win. 929 | (SC_PATH_X): made this only do the check on unix platforms. 930 | 931 | 2002-03-12 Jeff Hobbs 932 | 933 | * README.txt: updated to reflect fewer files 934 | 935 | 2002-03-06 Jeff Hobbs 936 | 937 | * config.guess (removed): 938 | * config.sub (removed): removed unnecessary files 939 | 940 | * installFile.tcl (removed): 941 | * mkinstalldirs (removed): these aren't really necessary for 942 | making TEA work 943 | 944 | * tcl.m4 (SC_PUBLIC_TCL_HEADERS, SC_PUBLIC_TK_HEADERS): don't 945 | check /usr(/local)/include for includes on Windows when not using 946 | gcc 947 | 948 | 2002-03-05 Jeff Hobbs 949 | 950 | * tcl.m4: added warnings on Windows, removed RELPATH define and 951 | added TCL_LIBS to MAKE_LIB macro. 952 | 953 | This import represents 2.0.0, or a new start at attempting to 954 | make TEA much easier for C extension developers. 955 | 956 | **** moved from tclpro project to core tcl project, **** 957 | **** renamed to 'tclconfig' **** 958 | 959 | 2001-03-15 Karl Lehenbauer 960 | 961 | * installFile.tcl: Added updating of the modification time of 962 | the target file whether we overwrote it or decided that it 963 | hadn't changed. This was necessary for us to be able to 964 | determine whether or not a module install touched the file. 965 | 966 | 2001-03-08 Karl Lehenbauer 967 | 968 | * installFile.tcl: Added support for converting new-style (1.1+) 969 | Cygnus drive paths to Tcl-style. 970 | 971 | 2001-01-15 972 | 973 | * tcl.m4: Added FreeBSD clause. 974 | 975 | 2001-01-03 976 | 977 | * tcl.m4: Fixed typo in SC_LIB_SPEC where it is checking 978 | for exec-prefix. 979 | 980 | 2000-12-01 981 | 982 | * tcl.m4: Concatenated most of the Ajuba acsite.m4 file 983 | so we don't need to modify the autoconf installation. 984 | * config.guess: 985 | * config.sub: 986 | * installFile.tcl: 987 | Added files from the itcl config subdirectory, 988 | which should go away. 989 | 990 | 2000-7-29 991 | 992 | * Fixed the use of TCL_SRC_DIR and TK_SRC_DIR within 993 | TCL_PRIVATE_INCLUDES and TK_PRIVATE_INCLUDES to match their recent 994 | change from $(srcdir) to $(srcdir)/.. 995 | --------------------------------------------------------------------------------