Check-in [bf83205ca8]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment: * tls.c (Tls_Init): replaced older TEA config with newer * config/* (removed): * pkgIndex.tcl.in, strncasecmp.c (removed): * Makefile.in, aclocal.m4, configure, configure.in: * tclconfig/README.txt, tclconfig/install-sh, tclconfig/tcl.m4:
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:bf83205ca80d39428a28a1bd50d9e1cb610e12e0
User & Date: hobbs 2004-03-19 21:05:16
Context
2004-03-20
01:16
recommit of changed TEA config files check-in: 6b603c9441 user: hobbs tags: trunk
2004-03-19
21:05
* tls.c (Tls_Init): replaced older TEA config with newer * config/* (removed): * pkgIndex.tcl.in, strncasecmp.c (removed): * Makefile.in, aclocal.m4, configure, configure.in: * tclconfig/README.txt, tclconfig/install-sh, tclconfig/tcl.m4: check-in: bf83205ca8 user: hobbs tags: trunk
2004-03-17
17:53
Improvements to certificate conversion. Distinguished Names subject and issuer now UTF-8 per RFC 3280, RFC 2253. Serial numbers now hexadecimal per RFC 3280. check-in: 46cae05dcb user: razzell tags: trunk
Changes

Changes to ChangeLog.

            1  +2004-03-19  Jeff Hobbs  <jeffh@ActiveState.com>
            2  +
            3  +	* tls.c (Tls_Init):   replaced older TEA config with newer
            4  +	* config/* (removed):
            5  +	* pkgIndex.tcl.in, strncasecmp.c (removed):
            6  +	* Makefile.in, aclocal.m4, configure, configure.in:
            7  +	* tclconfig/README.txt, tclconfig/install-sh, tclconfig/tcl.m4:
            8  +
     1      9   2004-03-17  Dan Razzell <research@starfishsystems.ca>
     2     10   
     3     11   	* tlsX509.c:	Add support for long serial numbers per RFC 3280.
     4     12   			Format is now hexadecimal. 
     5     13   			[Request #915313]
     6     14   			Correctly convert certificate Distinguished Names
     7     15   			to Tcl string representation.  Eliminates use of

Changes to Makefile.in.

     8      8   #
     9      9   # Copyright (c) 1999-2000 Ajuba Solutions.
    10     10   # All rights reserved.
    11     11   #
    12     12   # See the file "license.terms" for information on usage and redistribution
    13     13   # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
    14     14   #
    15         -# RCS: @(#) $Id: Makefile.in,v 1.19 2004/02/04 04:02:17 razzell Exp $
           15  +# RCS: @(#) $Id: Makefile.in,v 1.20 2004/03/19 21:05:16 hobbs Exp $
    16     16   
    17     17   
    18         -lib_BINARIES=$(tls_LIB_FILE)
    19         -BINARIES=$(lib_BINARIES)
    20         -
    21     18   #========================================================================
    22     19   # Enumerate the names of the source files included in this package.
    23     20   # This will be used when a dist target is added to the Makefile.
    24     21   #========================================================================
    25     22   
    26         -tls_SOURCES =	tls.c tlsIO.c tlsBIO.c \
    27         -		tlsX509.c fixstrtod.c
    28         -# strncasecmp.c
    29         -SOURCES	=	$(tls_SOURCES)
    30         -
    31         -tls_SCRIPT_FILES = tls.tcl
           23  +PKG_SOURCES	= tls.c tlsIO.c tlsBIO.c tlsX509.c fixstrtod.c
           24  +PKG_OBJECTS	= tls.$(OBJEXT) tlsIO.$(OBJEXT) tlsBIO.$(OBJEXT) \
           25  +		  tlsX509.$(OBJEXT) fixstrtod.$(OBJEXT)
    32     26   
    33     27   #========================================================================
    34         -# Enumerate the names of the object files included in this package.
    35         -# These objects are created and linked into the final library.
           28  +# RUNTIME_SOURCES identifies Tcl runtime files that are associated with
           29  +# this package that need to be installed, if any.
    36     30   #========================================================================
    37     31   
    38         -tls_OBJECTS =	tls.$(OBJEXT) tlsIO.$(OBJEXT) tlsBIO.$(OBJEXT) \
    39         -		tlsX509.$(OBJEXT) fixstrtod.$(OBJEXT)
    40         -# strncasecmp.$(OBJEXT)
    41         -OBJECTS =	$(tls_OBJECTS)
    42         -
    43         -#========================================================================
    44         -# The substitution of "tls_LIB_FILE" into the variable name below
    45         -# allows us to refer to the objects for the library without knowing the name
    46         -# of the library in advance.  It also lets us use the "$@" variable in
    47         -# the rule for building the library, so we can refer to both the list of 
    48         -# objects and the library itself in a platform-independent manner.
    49         -#========================================================================
    50         -
    51         -tls_LIB_FILE = @tls_LIB_FILE@
    52         -$(tls_LIB_FILE)_OBJECTS = $(tls_OBJECTS)
           32  +PKG_TCL_SOURCES	= tls.tcl
    53     33   
    54     34   #========================================================================
    55     35   # This is a list of header files to be installed
    56     36   #========================================================================
    57     37   
    58         -GENERIC_HDRS= \
    59         -	$(srcdir)/tls.h
           38  +PKG_HEADERS	= $(srcdir)/tls.h
    60     39   
    61     40   #========================================================================
    62     41   # Variables and AC_SUBST cases added for tls.
    63     42   #========================================================================
    64     43   
    65         -SSL_DIR =		@SSL_DIR@
    66         -SSL_LIB_DIR =		@SSL_LIB_DIR@
    67         -SSL_INCLUDE_DIR =	@SSL_INCLUDE_DIR@
    68         -SSL_INCLUDE_DIR_NATIVE = @SSL_INCLUDE_DIR_NATIVE@
    69         -SSL_INCLUDES =		-I$(SSL_INCLUDE_DIR_NATIVE)
    70         -
    71         -
    72         -#========================================================================
    73         -# This is boilerplate from the sample tcl extension Makefile.in:
    74         -# Nothing of the variables below this line need to be changed.  Please
    75         -# check the TARGETS section below to make sure the make targets are
    76         -# correct.
    77         -#========================================================================
    78         -
    79         -SHELL = @SHELL@
    80         -
    81         -srcdir = @srcdir@
    82         -top_srcdir = @top_srcdir@
    83         -prefix = @prefix@
    84         -exec_prefix = @exec_prefix@
    85         -
    86         -bindir = @bindir@
    87         -sbindir = @sbindir@
    88         -libexecdir = @libexecdir@
    89         -datadir = @datadir@
    90         -sysconfdir = @sysconfdir@
    91         -sharedstatedir = @sharedstatedir@
    92         -localstatedir = @localstatedir@
    93         -libdir = @libdir@
    94         -infodir = @infodir@
    95         -mandir = @mandir@
    96         -includedir = @includedir@
    97         -oldincludedir = /usr/include
    98         -
    99         -DESTDIR =
   100         -RELPATH = @RELPATH@
   101         -
   102         -pkgdatadir = $(datadir)/@PACKAGE@@VERSION@
   103         -pkglibdir = $(libdir)/@PACKAGE@@VERSION@
   104         -pkgincludedir = $(includedir)/@PACKAGE@@VERSION@
   105         -
   106         -top_builddir = .
   107         -
   108         -INSTALL = @INSTALL@
   109         -INSTALL_PROGRAM = @INSTALL_PROGRAM@
   110         -INSTALL_DATA = @INSTALL_DATA@
   111         -INSTALL_SCRIPT = @INSTALL_SCRIPT@
   112         -INSTALL_STRIP_FLAG =
   113         -transform = @program_transform_name@
   114         -
   115         -NORMAL_INSTALL = :
   116         -PRE_INSTALL = :
   117         -POST_INSTALL = :
   118         -NORMAL_UNINSTALL = :
   119         -PRE_UNINSTALL = :
   120         -POST_UNINSTALL = :
   121         -
   122         -PACKAGE = @PACKAGE@
   123         -VERSION = @VERSION@
   124         -CC = @CC@
   125         -CFLAGS_DEBUG = @CFLAGS_DEBUG@
   126         -CFLAGS_DEFAULT = @CFLAGS_DEFAULT@
   127         -CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@
   128         -CLEANFILES = @CLEANFILES@
   129         -EXEEXT = @EXEEXT@
   130         -LDFLAGS_DEBUG = @LDFLAGS_DEBUG@
   131         -LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@
   132         -LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@
   133         -MAKE_LIB = @MAKE_LIB@
   134         -MAKE_SHARED_LIB = @MAKE_SHARED_LIB@
   135         -MAKE_STATIC_LIB = @MAKE_STATIC_LIB@
   136         -OBJEXT = @OBJEXT@
   137         -RANLIB = @RANLIB@
   138         -SHLIB_CFLAGS = @SHLIB_CFLAGS@
   139         -SHLIB_LD = @SHLIB_LD@
   140         -SHLIB_LDFLAGS = @SHLIB_LDFLAGS@
   141         -SHLIB_LD_LIBS = @SHLIB_LD_LIBS@
   142         -STLIB_LD = @STLIB_LD@
   143         -TCL_BIN_DIR = @TCL_BIN_DIR@
   144         -TCL_DEFS = @TCL_DEFS@
   145         -TCL_EXTRA_CFLAGS = @TCL_EXTRA_CFLAGS@
   146         -TCL_LD_FLAGS = @TCL_LD_FLAGS@
   147         -TCL_LIBS = @TCL_LIBS@
   148         -TCL_SHLIB_LD_LIBS = @TCL_SHLIB_LD_LIBS@
   149         -TCL_SRC_DIR = @TCL_SRC_DIR@
   150         -TCL_DBGX = @TCL_DBGX@
   151         -TCL_STUB_LIB_FILE = @TCL_STUB_LIB_FILE@
   152         -TCL_STUB_LIB_SPEC = @TCL_STUB_LIB_SPEC@
   153         -TCLSH_PROG = @TCLSH_PROG@
   154         -
   155         -AUTOCONF = autoconf
   156         -
   157         -LDFLAGS = $(LDFLAGS_DEFAULT)
   158         -
   159         -INCLUDES = @TCL_INCLUDES@ $(SSL_INCLUDES)
   160         -
   161         -EXTRA_CFLAGS = $(TCL_DEFS) $(PROTO_FLAGS) $(SECURITY_FLAGS) $(MEM_DEBUG_FLAGS) $(KEYSYM_FLAGS) $(NO_DEPRECATED_FLAGS)
   162         -
   163         -DEFS = @DEFS@ $(EXTRA_CFLAGS)
   164         -
   165         -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
   166         -CONFIGDIR = @CONFIGDIR@
   167         -mkinstalldirs = $(SHELL) $(CONFIGDIR)/mkinstalldirs
   168         -CONFIG_CLEAN_FILES =
   169         -
   170         -CPPFLAGS = @CPPFLAGS@
   171         -LIBS = @LIBS@
   172         -AR = ar
   173         -CFLAGS = @CFLAGS@
   174         -COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
   175         -CCLD = $(CC)
   176         -LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
           44  +SSL_DIR			= @SSL_DIR@
           45  +SSL_LIB_DIR 		= @SSL_LIB_DIR@
           46  +SSL_INCLUDE_DIR 	= @SSL_INCLUDE_DIR@
           47  +SSL_INCLUDE_DIR_NATIVE	= @SSL_INCLUDE_DIR_NATIVE@
           48  +SSL_INCLUDES 		= -I$(SSL_INCLUDE_DIR_NATIVE)
           49  +
           50  +#========================================================================
           51  +# "PKG_LIB_FILE" refers to the library (dynamic or static as per
           52  +# configuration options) composed of the named objects.
           53  +#========================================================================
           54  +
           55  +PKG_LIB_FILE	= @PKG_LIB_FILE@
           56  +PKG_STUB_LIB_FILE = @PKG_STUB_LIB_FILE@
           57  +
           58  +lib_BINARIES	= $(PKG_LIB_FILE)
           59  +BINARIES	= $(lib_BINARIES)
           60  +
           61  +SHELL		= @SHELL@
           62  +
           63  +srcdir		= @srcdir@
           64  +prefix		= @prefix@
           65  +exec_prefix	= @exec_prefix@
           66  +
           67  +bindir		= @bindir@
           68  +libdir		= @libdir@
           69  +datadir		= @datadir@
           70  +mandir		= @mandir@
           71  +includedir	= @includedir@
           72  +
           73  +DESTDIR		=
           74  +
           75  +PKG_DIR		= $(PACKAGE_NAME)$(PACKAGE_VERSION)
           76  +pkgdatadir	= $(datadir)/$(PKG_DIR)
           77  +pkglibdir	= $(libdir)/$(PKG_DIR)
           78  +pkgincludedir	= $(includedir)/$(PKG_DIR)
           79  +
           80  +top_builddir	= .
           81  +
           82  +INSTALL		= @INSTALL@
           83  +INSTALL_PROGRAM	= @INSTALL_PROGRAM@
           84  +INSTALL_DATA	= @INSTALL_DATA@
           85  +INSTALL_SCRIPT	= @INSTALL_SCRIPT@
           86  +
           87  +PACKAGE_NAME	= @PACKAGE_NAME@
           88  +PACKAGE_VERSION	= @PACKAGE_VERSION@
           89  +CC		= @CC@
           90  +CFLAGS_DEFAULT	= @CFLAGS_DEFAULT@
           91  +CFLAGS_WARNING	= @CFLAGS_WARNING@
           92  +CLEANFILES	= @CLEANFILES@
           93  +EXEEXT		= @EXEEXT@
           94  +LDFLAGS_DEFAULT	= @LDFLAGS_DEFAULT@
           95  +MAKE_LIB	= @MAKE_LIB@
           96  +MAKE_SHARED_LIB	= @MAKE_SHARED_LIB@
           97  +MAKE_STATIC_LIB	= @MAKE_STATIC_LIB@
           98  +MAKE_STUB_LIB	= @MAKE_STUB_LIB@
           99  +OBJEXT		= @OBJEXT@
          100  +RANLIB		= @RANLIB@
          101  +RANLIB_STUB	= @RANLIB_STUB@
          102  +SHLIB_CFLAGS	= @SHLIB_CFLAGS@
          103  +SHLIB_LD	= @SHLIB_LD@
          104  +SHLIB_LD_FLAGS	= @SHLIB_LD_FLAGS@
          105  +SHLIB_LD_LIBS	= @SHLIB_LD_LIBS@
          106  +STLIB_LD	= @STLIB_LD@
          107  +TCL_DEFS	= @TCL_DEFS@
          108  +TCL_BIN_DIR	= @TCL_BIN_DIR@
          109  +TCL_SRC_DIR	= @TCL_SRC_DIR@
          110  +# This is necessary for packages that use private Tcl headers
          111  +#TCL_TOP_DIR_NATIVE	= @TCL_TOP_DIR_NATIVE@
          112  +# Not used, but retained for reference of what libs Tcl required
          113  +TCL_LIBS	= @TCL_LIBS@
          114  +
          115  +#========================================================================
          116  +# TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our
          117  +# package without installing.  The other environment variables allow us
          118  +# to test against an uninstalled Tcl.  Add special env vars that you
          119  +# require for testing here (like TCLX_LIBRARY).
          120  +#========================================================================
          121  +
          122  +EXTRA_PATH	= $(top_builddir):$(TCL_BIN_DIR)
          123  +TCLSH_ENV	= TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \
          124  +		  @LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \
          125  +		  PATH="$(EXTRA_PATH):$(PATH)" \
          126  +		  TCLLIBPATH="$(top_builddir)"
          127  +TCLSH_PROG	= @TCLSH_PROG@
          128  +TCLSH		= $(TCLSH_ENV) $(TCLSH_PROG)
          129  +SHARED_BUILD	= @SHARED_BUILD@
          130  +
          131  +INCLUDES	= @TCL_INCLUDES@ @PKG_INCLUDES@ $(SSL_INCLUDES)
          132  +
          133  +EXTRA_CFLAGS	= @EXTRA_CFLAGS@ @PKG_CFLAGS@
          134  +
          135  +#DEFS		= $(TCL_DEFS) @DEFS@ $(EXTRA_CFLAGS)
          136  +DEFS		= @DEFS@ $(EXTRA_CFLAGS)
          137  +
          138  +CONFIG_CLEAN_FILES = Makefile
          139  +
          140  +CPPFLAGS	= @CPPFLAGS@
          141  +LIBS		= @PKG_LIBS@ @LIBS@
          142  +AR		= ar
          143  +CFLAGS		= @CFLAGS@
          144  +COMPILE		= $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
   177    145   
   178    146   #========================================================================
   179    147   # Start of user-definable TARGETS section
   180    148   #========================================================================
   181    149   
   182    150   #========================================================================
   183    151   # TEA TARGETS.  Please note that the "libraries:" target refers to platform
................................................................................
   192    160   #========================================================================
   193    161   # The binaries target builds executable programs, Windows .dll's, unix
   194    162   # shared/static libraries, and any other platform-dependent files.
   195    163   # The list of targets to build for "binaries:" is specified at the top
   196    164   # of the Makefile, in the "BINARIES" variable.
   197    165   #========================================================================
   198    166   
   199         -binaries: $(BINARIES)
          167  +binaries: $(BINARIES) pkgIndex.tcl
   200    168   
   201         -libraries: $(tls_SCRIPT_FILES)
          169  +libraries: $(PKG_TCL_SOURCES)
   202    170   
   203    171   doc:
   204    172   
   205    173   install: all install-binaries install-libraries install-doc
   206    174   
   207    175   install-binaries: binaries install-lib-binaries install-bin-binaries
   208         -	sed -e "s#\@RELPATH\@#$(RELPATH)#" \
   209         -	-e "s#\@tls_LIB_FILE\@#$(tls_LIB_FILE)#" \
   210         -	< $(srcdir)/pkgIndex.tcl.in > pkgIndex.tcl
   211         -	$(INSTALL_DATA) pkgIndex.tcl $(pkglibdir)
          176  +	if test "x$(SHARED_BUILD)" = "x1"; then \
          177  +	    $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \
          178  +	fi
   212    179   
   213    180   #========================================================================
   214    181   # This rule installs platform-independent files, such as header files.
   215    182   #========================================================================
   216    183   
   217    184   install-libraries: libraries
   218         -	$(mkinstalldirs) $(includedir)
   219         -	@echo "Installing header files in $(includedir)"
   220         -	@for i in $(GENERIC_HDRS) ; do \
          185  +	@mkdir -p $(DESTDIR)$(includedir)
          186  +	@echo "Installing header files in $(DESTDIR)$(includedir)"
          187  +	@for i in $(PKG_HEADERS) ; do \
   221    188   	    echo "Installing $$i" ; \
   222         -	    $(INSTALL_DATA) $$i $(includedir) ; \
          189  +	    $(INSTALL_DATA) $$i $(DESTDIR)$(includedir) ; \
   223    190   	done;
   224         -	$(INSTALL_DATA) $(srcdir)/tls.tcl $(pkglibdir)
   225    191   
   226    192   #========================================================================
   227    193   # Install documentation.  Unix manpages should go in the $(mandir)
   228    194   # directory.
   229    195   #========================================================================
   230    196   
   231    197   install-doc: doc
   232         -#	$(mkinstalldirs) $(mandir)/man1
   233         -#	$(mkinstalldirs) $(mandir)/man3
   234         -#	$(mkinstalldirs) $(mandir)/mann
   235         -#	@echo "Installing documentation in $(mandir)"
   236         -#	@for i in $(srcdir)/*.n; \
   237         -#	    do \
   238         -# 		echo "Installing $$i"; \
   239         -# 		rm -f $(mandir)/mann/$$i; \
   240         -# 		$(INSTALL_DATA) $$i $(mandir)/mann ; \
   241         -#	    done
          198  +#	@mkdir -p $(DESTDIR)$(mandir)/mann
          199  +#	@echo "Installing documentation in $(DESTDIR)$(mandir)"
          200  +#	@for i in $(srcdir)/doc/*.n; do \
          201  +#	    echo "Installing $$i"; \
          202  +#	    rm -f $(DESTDIR)$(mandir)/mann/`basename $$i`; \
          203  +#	    $(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/mann ; \
          204  +#	done
   242    205   
   243    206   test: binaries libraries
   244         -	sed -e "s#\@RELPATH\@#.#" -e "s#\@tls_LIB_FILE\@#$(tls_LIB_FILE)#" \
   245         -	< $(srcdir)/pkgIndex.tcl.in > pkgIndex.tcl
   246         -	LD_LIBRARY_PATH=$(BUILD_DIR):$(TCL_BIN_DIR):$(LD_LIBRARY_PATH) \
   247         -	PATH="$(BUILD_DIR)":"$(TCL_BIN_DIR)":"$(PATH)" \
   248         -	$(TCLSH_PROG) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS)
          207  +	$(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS)
          208  +
          209  +shell: binaries libraries
          210  +	@$(TCLSH) $(SCRIPT)
          211  +
          212  +gdb:
          213  +	$(TCLSH_ENV) gdb $(TCLSH_PROG) $(SCRIPT)
   249    214   
   250    215   depend:
   251    216   
   252    217   #========================================================================
   253         -# Enumerate the names of the object files included in this package.
   254         -# These objects are created and linked into the final library.  In
   255         -# most cases these object files will correspond to the source files
   256         -# above.
          218  +# $(PKG_LIB_FILE) should be listed as part of the BINARIES variable
          219  +# mentioned above.  That will ensure that this target is built when you
          220  +# run "make binaries".
   257    221   #
   258         -# $(exampleA_LIB_FILE) should be listed as part of the BINARIES variable
   259         -# at the top of the Makefile.  That will ensure that this target is built
   260         -# when you run "make binaries".
   261         -#
   262         -# You shouldn't need to modify this target, except to change the package
   263         -# name from "exampleA" to your package's name.
          222  +# The $(PKG_OBJECTS) objects are created and linked into the final
          223  +# library.  In most cases these object files will correspond to the
          224  +# source files above.
   264    225   #========================================================================
   265    226   
   266         -$(tls_LIB_FILE): $(tls_OBJECTS)
   267         -	-rm -f $(tls_LIB_FILE)
   268         -	@MAKE_LIB@
   269         -	$(RANLIB) $(tls_LIB_FILE)
          227  +$(PKG_LIB_FILE): $(PKG_OBJECTS)
          228  +	-rm -f $(PKG_LIB_FILE)
          229  +	${MAKE_LIB}
          230  +	$(RANLIB) $(PKG_LIB_FILE)
   270    231   
   271    232   #========================================================================
   272    233   # We need to enumerate the list of .c to .o lines here.
   273         -# Unfortunately, there does not seem to be any other way to do this
   274         -# in a Makefile-independent way.  We can't use VPATH because it picks up
   275         -# object files that may be located in the source directory.
   276    234   #
   277    235   # In the following lines, $(srcdir) refers to the toplevel directory
   278    236   # containing your extension.  If your sources are in a subdirectory,
   279    237   # you will have to modify the paths to reflect this:
   280    238   #
   281         -# exampleA.$(OBJEXT): $(srcdir)/src/win/exampleA.c
   282         -# 	$(COMPILE) -c `@CYGPATH@ $(srcdir)/src/win/exampleA.c` -o $@
          239  +# sample.$(OBJEXT): $(srcdir)/generic/sample.c
          240  +# 	$(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/sample.c` -o $@
          241  +#
          242  +# Setting the VPATH variable to a list of paths will cause the makefile
          243  +# to look into these paths when resolving .c to .obj dependencies.
          244  +# As necessary, add $(srcdir):$(srcdir)/compat:....
          245  +#========================================================================
          246  +
          247  +VPATH = $(srcdir)
          248  +
          249  +.c.$(OBJEXT):
          250  +	$(COMPILE) -c `@CYGPATH@ $<` -o $@
          251  +
          252  +#========================================================================
          253  +# Create the pkgIndex.tcl file.
          254  +# It is usually easiest to let Tcl do this for you with pkg_mkIndex, but
          255  +# you may find that you need to customize the package.  If so, either
          256  +# modify the -hand version, or create a pkgIndex.tcl.in file and have
          257  +# the configure script output the pkgIndex.tcl by editing configure.in.
   283    258   #========================================================================
   284    259   
   285         -tls.$(OBJEXT): $(srcdir)/tls.c
   286         -	$(COMPILE) -c `@CYGPATH@ $(srcdir)/tls.c` -o $@
          260  +pkgIndex.tcl-auto:
          261  +	( echo pkg_mkIndex . $(PKG_LIB_FILE) \; exit; ) | $(TCLSH)
   287    262   
   288         -tlsIO.$(OBJEXT): $(srcdir)/tlsIO.c
   289         -	$(COMPILE) -c `@CYGPATH@ $(srcdir)/tlsIO.c` -o $@
   290         -
   291         -tlsBIO.$(OBJEXT): $(srcdir)/tlsBIO.c
   292         -	$(COMPILE) -c `@CYGPATH@ $(srcdir)/tlsBIO.c` -o $@
   293         -
   294         -tlsX509.$(OBJEXT): $(srcdir)/tlsX509.c
   295         -	$(COMPILE) -c `@CYGPATH@ $(srcdir)/tlsX509.c` -o $@
   296         -
   297         -fixstrtod.$(OBJEXT): $(srcdir)/fixstrtod.c
   298         -	$(COMPILE) -c `@CYGPATH@ $(srcdir)/fixstrtod.c` -o $@
   299         -
   300         -strncasecmp.$(OBJEXT): $(srcdir)/strncasecmp.c
   301         -	$(COMPILE) -c `@CYGPATH@ $(srcdir)/strncasecmp.c` -o $@
          263  +pkgIndex.tcl:
          264  +	(echo 'package ifneeded $(PACKAGE_NAME) $(PACKAGE_VERSION) \
          265  +	    "[list load [file join $$dir $(PKG_LIB_FILE)]] ; \
          266  +	     [list source [file join $$dir tls.tcl]]"'\
          267  +	) > pkgIndex.tcl
   302    268   
   303    269   #========================================================================
   304    270   # End of user-definable section
   305    271   #========================================================================
   306    272   
   307    273   #========================================================================
   308    274   # Don't modify the file to clean here.  Instead, set the "CLEANFILES"
   309    275   # variable in configure.in
   310    276   #========================================================================
   311    277   
   312    278   clean:  
   313    279   	-test -z "$(BINARIES)" || rm -f $(BINARIES)
   314         -	-rm -f *.o core *.core
   315         -	-rm -f *.$(OBJEXT)
          280  +	-rm -f *.$(OBJEXT) core *.core
   316    281   	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
   317    282   
   318    283   distclean: clean
   319    284   	-rm -f *.tab.c
   320         -	-rm -f Makefile $(CONFIG_CLEAN_FILES)
   321         -	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
   322         -	-rm -f config.status
          285  +	-rm -f $(CONFIG_CLEAN_FILES)
          286  +	-rm -f config.cache config.log config.status
   323    287   
   324         -PKG_DIR		= $(PACKAGE)$(VERSION)
   325    288   COMPEXE		= gzip
   326    289   COMPEXT		= gz
   327    290   COMPRESS	= tar cvf - $(PKG_DIR) | $(COMPEXE) > $(PKG_DIR).tar.$(COMPEXT)
   328    291   DIST_ROOT	= /tmp/dist
   329    292   DIST_DIR	= $(DIST_ROOT)/$(PKG_DIR)
   330    293   
   331    294   dist-clean:
   332    295   	rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.$(COMPEXT)
   333    296   
   334         -dist: dist-clean $(srcdir)/configure
          297  +dist: dist-clean
   335    298   	mkdir -p $(DIST_DIR)
   336    299   	cp -p $(srcdir)/README.txt $(srcdir)/ChangeLog $(srcdir)/tls.htm \
   337    300   		$(srcdir)/configure $(srcdir)/configure.in \
   338         -		$(srcdir)/Makefile.in $(srcdir)/*.c $(srcdir)/*.h \
   339         -		$(srcdir)/pkgIndex.tcl.in $(srcdir)/license.terms \
          301  +		$(srcdir)/Makefile.in $(srcdir)/*.[ch] \
          302  +		$(srcdir)/license.terms \
   340    303   		$(srcdir)/aclocal.m4 $(srcdir)/tls.tcl \
   341    304   		$(DIST_DIR)
          305  +	chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4
          306  +	chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in
   342    307   
   343         -	mkdir $(DIST_DIR)/config
   344         -	cp -p $(srcdir)/config/install-sh $(srcdir)/config/mkinstalldirs \
   345         -		$(srcdir)/config/tcl.m4 \
   346         -		$(DIST_DIR)/config
          308  +	mkdir $(DIST_DIR)/tclconfig
          309  +	cp -p $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \
          310  +		$(DIST_DIR)/tclconfig/
          311  +	chmod 664 $(DIST_DIR)/tclconfig/tcl.m4
          312  +	chmod +x $(DIST_DIR)/tclconfig/install-sh
   347    313   
   348    314   	mkdir $(DIST_DIR)/tests
   349    315   	cp -p $(srcdir)/tests/*.{tcl,test} $(DIST_DIR)/tests
   350    316   
   351    317   	mkdir $(DIST_DIR)/tests/certs
   352    318   	cp -p $(srcdir)/tests/certs/*.{pem,key,req,txt} $(DIST_DIR)/tests/certs
   353    319   
   354         -	chmod 664 $(DIST_DIR)/Makefile.in
   355         -	chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in
   356         -	chmod +x $(DIST_DIR)/config/install-sh
   357         -
   358    320   	(cd $(DIST_ROOT); $(COMPRESS);)
   359    321   
   360    322   #========================================================================
   361    323   # Install binary object libraries.  On Windows this includes both .dll and
   362    324   # .lib files.  Because the .lib files are not explicitly listed anywhere,
   363    325   # we need to deduce their existence from the .dll file of the same name.
   364    326   # Additionally, the .dll files go into the bin directory, but the .lib
................................................................................
   365    327   # files go into the lib directory.  On Unix platforms, all library files
   366    328   # go into the lib directory.  In addition, this will generate the pkgIndex.tcl
   367    329   # file in the install location (assuming it can find a usable tclsh8.2 shell)
   368    330   #
   369    331   # You should not have to modify this target.
   370    332   #========================================================================
   371    333   
   372         -install-lib-binaries: installdirs
          334  +install-lib-binaries:
          335  +	@mkdir -p $(DESTDIR)$(pkglibdir)
   373    336   	@list='$(lib_BINARIES)'; for p in $$list; do \
   374    337   	  if test -f $$p; then \
          338  +	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
          339  +	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \
          340  +	    stub=`echo $$p|sed -e "s/.*\(stub\).*/\1/"`; \
          341  +	    if test "x$$stub" = "xstub"; then \
          342  +		echo " $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p"; \
          343  +		$(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p; \
          344  +	    else \
          345  +		echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \
          346  +		$(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \
          347  +	    fi; \
   375    348   	    ext=`echo $$p|sed -e "s/.*\.//"`; \
   376    349   	    if test "x$$ext" = "xdll"; then \
   377         -	        echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
   378         -	        $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
   379    350   		lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
   380    351   		if test -f $$lib; then \
   381         -		    echo " $(INSTALL_PROGRAM) $$lib $(DESTDIR)$(libdir)/$$lib"; \
   382         -	            $(INSTALL_PROGRAM) $$lib $(DESTDIR)$(libdir)/$$lib; \
          352  +		    echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \
          353  +	            $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \
   383    354   		fi; \
   384         -	    else \
   385         -		echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libdir)/$$p"; \
   386         -	        $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libdir)/$$p; \
   387    355   	    fi; \
   388         -	  else :; fi; \
          356  +	  fi; \
   389    357   	done
   390         -	@list='$(lib_BINARIES)'; for p in $$list; do \
   391         -	  if test -f $$p; then \
   392         -	    echo " $(RANLIB) $(DESTDIR)$(bindir)/$$p"; \
   393         -	    $(RANLIB) $(DESTDIR)$(bindir)/$$p; \
   394         -	  else :; fi; \
          358  +	@list='$(PKG_TCL_SOURCES)'; for p in $$list; do \
          359  +	  if test -f $(srcdir)/$$p; then \
          360  +	    destp=`basename $$p`; \
          361  +	    echo " Install $$destp $(DESTDIR)$(pkglibdir)/$$destp"; \
          362  +	    $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkglibdir)/$$destp; \
          363  +	  fi; \
   395    364   	done
   396    365   
   397    366   #========================================================================
   398    367   # Install binary executables (e.g. .exe files)
   399    368   #
   400    369   # You should not have to modify this target.
   401    370   #========================================================================
   402    371   
   403         -install-bin-binaries: installdirs
          372  +install-bin-binaries:
          373  +	@mkdir -p $(DESTDIR)$(bindir)
   404    374   	@list='$(bin_BINARIES)'; for p in $$list; do \
   405    375   	  if test -f $$p; then \
   406         -	    echo " $(INSTALL_DATA) $$p $(DESTDIR)$(bindir)/$$p"; \
   407         -	    $(INSTALL_DATA) $$p $(DESTDIR)$(bindir)/$$p; \
   408         -	  else :; fi; \
          376  +	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
          377  +	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
          378  +	  fi; \
   409    379   	done
   410    380   
   411         -.SUFFIXES: .c .o .obj
          381  +.SUFFIXES: .c .$(OBJEXT)
   412    382   
   413    383   Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
   414    384   	cd $(top_builddir) \
   415    385   	  && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
   416    386   
   417    387   uninstall-binaries:
   418         -	@$(NORMAL_UNINSTALL)
   419         -	list='$(BINARIES)'; for p in $$list; do \
   420         -	  rm -f $(DESTDIR)$(libdir)/$$p; \
          388  +	list='$(lib_BINARIES)'; for p in $$list; do \
          389  +	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
          390  +	done
          391  +	list='$(PKG_TCL_SOURCES)'; for p in $$list; do \
          392  +	  p=`basename $$p`; \
          393  +	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
          394  +	done
          395  +	list='$(bin_BINARIES)'; for p in $$list; do \
          396  +	  rm -f $(DESTDIR)$(bindir)/$$p; \
   421    397   	done
   422    398   
   423         -installdirs:
   424         -	$(mkinstalldirs)  $(DESTDIR)$(libdir)
   425         -	$(mkinstalldirs)  $(DESTDIR)$(bindir)
   426         -	$(mkinstalldirs)  $(DESTDIR)$(pkglibdir)
   427         -
   428         -.PHONY: all binaries clean depend distclean doc install installdirs \
   429         -libraries test
          399  +.PHONY: all binaries clean depend distclean doc install libraries test
   430    400   
   431    401   # Tell versions [3.59,3.63) of GNU make to not export all variables.
   432    402   # Otherwise a system limit (for SysV at least) may be exceeded.
   433    403   .NOEXPORT:

Changes to aclocal.m4.

     1         -builtin(include,config/tcl.m4)
            1  +builtin(include,tclconfig/tcl.m4)
            2  +
            3  +#------------------------------------------------------------------------
            4  +# TLS_SSL_DIR --
            5  +#
            6  +#	Locate the installed ssl files
            7  +#
            8  +# Arguments:
            9  +#	None.
           10  +#
           11  +# Requires:
           12  +#	CYGPATH must be set
           13  +#
           14  +# Results:
           15  +#
           16  +#	Adds a --with-ss-dir switch to configure.
           17  +#	Result is cached.
           18  +#
           19  +#	Substs the following vars:
           20  +#		SSL_DIR
           21  +#------------------------------------------------------------------------
           22  +
           23  +AC_DEFUN(TLS_CHECK_SSL, [
           24  +
           25  +#--------------------------------------------------------------------
           26  +# If the variable OPENSSL is set, we will build with the OpenSSL
           27  +# libraries.  If it is not set, then we will use RSA BSAFE SSL-C
           28  +# libraries instead of the default OpenSSL libaries.
           29  +#--------------------------------------------------------------------
           30  +
           31  +    AC_ARG_ENABLE(bsafe, [  --enable-bsafe          Use RSA BSAFE SSL-C libs.  Default is to use OpenSSL libs], OPENSSL="", OPENSSL="1")
           32  +
           33  +#--------------------------------------------------------------------
           34  +# Establish the location of the root directory for OpenSSL.
           35  +# If we're not using OpenSSL, set the root for BSAFE SSL-C.
           36  +# If we're using BSAFE, define the BSAFE compiler flag.
           37  +# The "FLAT_INC" flag is used in the BSAFE ssl.h header file and
           38  +# doesn't seem to be referenced anywhere else.
           39  +#--------------------------------------------------------------------
           40  +    if test -n "${OPENSSL}"; then
           41  +	SSL_DIR='/usr/local/ssl'
           42  +	AC_DEFINE(NO_IDEA)
           43  +	AC_DEFINE(NO_RC5)
           44  +    else
           45  +	SSL_DIR='/use/local/sslc'
           46  +	AC_DEFINE(BSAFE)
           47  +	AC_DEFINE(FLAT_INC)
           48  +    fi
           49  +    
           50  +    AC_MSG_CHECKING([for SSL directory])
           51  +
           52  +    AC_ARG_WITH(ssl-dir, [  --with-ssl-dir=DIR      SSL root directory], with_ssldir=${withval})
           53  +
           54  +    AC_CACHE_VAL(ac_cv_c_ssldir, [
           55  +	# Use the value from --with-ssl-dir, if it was given
           56  +	if test x"${with_ssldir}" != x ; then
           57  +	    if test -d "${with_ssldir}" ; then
           58  +		ac_cv_c_ssldir=${with_ssldir}
           59  +	    else
           60  +		AC_MSG_ERROR([${with_ssldir} is not a valid directory])
           61  +	    fi
           62  +	else
           63  +	    list="`ls -d ${SSL_DIR} 2>/dev/null`"
           64  +	    for i in $list ; do
           65  +		if test -d "$i" ; then
           66  +		    ac_cv_c_ssldir=$i
           67  +		    break
           68  +		fi
           69  +	    done
           70  +	fi
           71  +    ])
           72  +
           73  +    # Print a message based on how we determined the include path
           74  +
           75  +    if test x"${ac_cv_c_ssldir}" = x ; then
           76  +	AC_MSG_ERROR([Could not find SSL directory.
           77  +Please specify its location with --with-ssl-dir])
           78  +    else
           79  +	SSL_DIR=${ac_cv_c_ssldir}
           80  +	AC_MSG_RESULT([${SSL_DIR}])
           81  +    fi
           82  +
           83  +    #--------------------------------------------------------------------
           84  +    # If we're using RSA BSAFE SSL-C, we need to establish what platform
           85  +    # we're running on before we can figure out some paths.
           86  +    # This step isn't necessary if we're using OpenSSL.
           87  +    #--------------------------------------------------------------------
           88  +
           89  +    if test -z "${OPENSSL}"; then
           90  +	AC_MSG_CHECKING(host type)
           91  +	case "`uname -s`" in
           92  +	    *win32* | *WIN32* | *CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*)
           93  +		PLATFORM=WIN32
           94  +		;;
           95  +	    *SunOS*)
           96  +		PLATFORM=SOLARIS
           97  +		;;
           98  +	    HP-UX)
           99  +		PLATFORM=HPUX
          100  +		;;
          101  +	    *)
          102  +		PLATFORM=LINUX
          103  +		;;
          104  +	esac
          105  +	AC_MSG_RESULT(${PLATFORM})
          106  +    fi
          107  +
          108  +    #--------------------------------------------------------------------
          109  +    # The OpenSSL and BSAFE SSL-C directory structures differ.
          110  +    #--------------------------------------------------------------------
          111  +
          112  +    if test -n "${OPENSSL}"; then
          113  +	SSL_LIB_DIR=${SSL_DIR}/lib
          114  +	SSL_INCLUDE_DIR=${SSL_DIR}/include
          115  +	if test ! -f "${SSL_INCLUDE_DIR}/openssl/opensslv.h"; then
          116  +	    AC_ERROR([bad ssl-dir: cannot find openssl/opensslv.h under ${SSL_INCLUDE_DIR}])
          117  +	fi
          118  +    else
          119  +	SSL_LIB_DIR=${SSL_DIR}/${PLATFORM}/library/lib
          120  +	SSL_INCLUDE_DIR=${SSL_DIR}/${PLATFORM}/library/include
          121  +	if test ! -f "${SSL_INCLUDE_DIR}/crypto.h"; then
          122  +	    AC_ERROR([bad ssl-dir: cannot find crypto.h under ${SSL_INCLUDE_DIR}])
          123  +	fi
          124  +    fi
          125  +
          126  +    AC_SUBST(SSL_DIR)
          127  +    AC_SUBST(SSL_LIB_DIR)
          128  +    AC_SUBST(SSL_INCLUDE_DIR)
          129  +
          130  +    SSL_INCLUDE_DIR_NATIVE=\"`${CYGPATH} ${SSL_INCLUDE_DIR}`\"
          131  +    AC_SUBST(SSL_INCLUDE_DIR_NATIVE)
          132  +
          133  +    #--------------------------------------------------------------------
          134  +    # If OpenSSL was built with gcc then there may be some symbols that need
          135  +    # resolving before we can load it into tclsh (__udivd3i on solaris.
          136  +    # Let the user specify if we need to add libgcc to the link line to
          137  +    # resolve these symbols.
          138  +    #
          139  +    # This doesn't seem to be necessary if the RSA BSAFE SSL-C libraries
          140  +    # are used instead of OpenSSL.
          141  +    #--------------------------------------------------------------------
          142  +    
          143  +    if test -n "${OPENSSL}"; then
          144  +
          145  +	AC_MSG_CHECKING(if libgcc is needed to resolve openssl symbols)
          146  +
          147  +	AC_ARG_WITH(gcclib, [  --with-gcclib	       link with libgcc to resolve symbols in a gcc-built openssl library], GCCLIB="-lgcc", GCCLIB="")
          148  +
          149  +	if test "x${GCCLIB}" = "x" ; then
          150  +	    AC_MSG_RESULT(no)
          151  +	else
          152  +	    AC_MSG_RESULT(yes)
          153  +	    AC_MSG_CHECKING(for gcc library location)
          154  +	    GCCPATH=`${CC} -print-libgcc-file-name | sed -e 's#[^/]*$##'`
          155  +	    GCCPATH="-L${GCCPATH}"
          156  +	    AC_MSG_RESULT(${GCCPATH})
          157  +	fi
          158  +    fi
          159  +
          160  +])

Changes to configure.

more than 10,000 changes

Changes to configure.in.

     1         -
     2         -dnl "configure.in" for the "tls" Tcl extension.
     3         -dnl 
     4         -dnl This file is an input file used by the GNU "autoconf" program to
     5         -dnl generate the file "configure", which is run during Tcl
     6         -dnl installation to configure the system for the local environment.
            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.
     7      5   dnl 
     8      6   dnl This file contains code to generate "tls" using either the
     9      7   dnl OpenSSL libraries or libraries from the commercial BSAFE SSL-C
    10      8   dnl product from RSA Security.  In the United States, it is necessary
    11      9   dnl to use the RSA BSAFE libraries for any product developed for
    12     10   dnl commercial use. Licensing information for BSAFE SSL-C may be
    13     11   dnl obtained from RSA Data Scurity Inc., San Mateo, California, USA.
    14     12   dnl Their home page on the web is "www.rsasecurity.com". 
           13  +#
           14  +# RCS: @(#) $Id: configure.in,v 1.18 2004/03/19 21:05:16 hobbs Exp $
    15     15   
    16     16   
    17     17   #--------------------------------------------------------------------
    18     18   # macro used to verify that the configure script can find the sources
    19     19   #--------------------------------------------------------------------
    20     20   
    21         -AC_INIT(tls.h)
    22         -
    23         -AC_CONFIG_AUX_DIR(config)
    24         -CONFIGDIR=${srcdir}/config
    25         -AC_SUBST(CONFIGDIR)
    26         -
    27         -#--------------------------------------------------------------------
    28         -# Set package name and version numbers here.  The NODOT_VERSION is
    29         -# required for constructing the library name on systems that don't
    30         -# like dots in # library names (Windows).  The VERSION variable is
    31         -# used on the other systems.
    32         -#--------------------------------------------------------------------
    33         -
    34         -PACKAGE=tls
    35         -
    36         -MAJOR_VERSION=1
    37         -MINOR_VERSION=5
    38         -PATCHLEVEL=0
    39         -
    40         -VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
    41         -NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
    42         -
    43         -AC_SUBST(PACKAGE)
    44         -AC_SUBST(VERSION)
    45         -
    46         -
    47         -#--------------------------------------------------------------------
    48         -# We put this here so that you can compile with -DVERSION="1.2" to
    49         -# encode the package version directly into the source files.
    50         -#--------------------------------------------------------------------
    51         -
    52         -eval AC_DEFINE_UNQUOTED(VERSION, "${VERSION}")
    53         -eval AC_DEFINE_UNQUOTED(PACKAGE, "${PACKAGE}")
           21  +AC_INIT([tls], [1.5.0])
           22  +
           23  +TEA_INIT([3.0])
           24  +
           25  +AC_CONFIG_AUX_DIR(tclconfig)
           26  +
           27  +#--------------------------------------------------------------------
           28  +# Load the tclConfig.sh file
           29  +#--------------------------------------------------------------------
           30  +
           31  +TEA_PATH_TCLCONFIG
           32  +TEA_LOAD_TCLCONFIG
           33  +
           34  +#-----------------------------------------------------------------------
           35  +# Handle the --prefix=... option by defaulting to what Tcl gave.
           36  +# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
           37  +#-----------------------------------------------------------------------
           38  +
           39  +TEA_PREFIX
           40  +
           41  +#-----------------------------------------------------------------------
           42  +# Standard compiler checks.
           43  +# This sets up CC by using the CC env var, or looks for gcc otherwise.
           44  +# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
           45  +# the basic setup necessary to compile executables.
           46  +#-----------------------------------------------------------------------
           47  +
           48  +TEA_SETUP_COMPILER
           49  +
           50  +#-----------------------------------------------------------------------
           51  +# __CHANGE__
           52  +# Specify the C source files to compile in TEA_ADD_SOURCES,
           53  +# public headers that need to be installed in TEA_ADD_HEADERS,
           54  +# stub library C source files to compile in TEA_ADD_STUB_SOURCES,
           55  +# and runtime Tcl library files in TEA_ADD_TCL_SOURCES.
           56  +# This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS
           57  +# and PKG_TCL_SOURCES.
           58  +#-----------------------------------------------------------------------
           59  +
           60  +TEA_ADD_SOURCES([])
           61  +TEA_ADD_HEADERS([])
           62  +TEA_ADD_INCLUDES([])
           63  +TEA_ADD_LIBS([])
           64  +TEA_ADD_CFLAGS([])
           65  +TEA_ADD_STUB_SOURCES([])
           66  +TEA_ADD_TCL_SOURCES([])
           67  +
           68  +#--------------------------------------------------------------------
           69  +# A few miscellaneous platform-specific items:
           70  +#
           71  +# Define a special symbol for Windows (BUILD_sample in this case) so
           72  +# that we create the export library with the dll.  See sha1.h on how
           73  +# to use this.
           74  +#
           75  +# Windows creates a few extra files that need to be cleaned up.
           76  +# You can add more files to clean if your extension creates any extra
           77  +# files.
           78  +#
           79  +# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
           80  +# These will be appended to the current set of compiler flags for
           81  +# your system.
           82  +#--------------------------------------------------------------------
           83  +
           84  +if test "${TEA_PLATFORM}" = "windows" ; then
           85  +    AC_DEFINE(BUILD_tls)
           86  +    AC_DEFINE(WINDOWS)
           87  +    CLEANFILES="pkgIndex.tcl *.lib *.dll *.exp *.ilk *.pdb vc*.pch"
           88  +else
           89  +    CLEANFILES="pkgIndex.tcl"
           90  +fi
           91  +AC_SUBST(CLEANFILES)
           92  +
           93  +#--------------------------------------------------------------------
           94  +# Choose which headers you need.  Extension authors should try very
           95  +# hard to only rely on the Tcl public header files.  Internal headers
           96  +# contain private data structures and are subject to change without
           97  +# notice.
           98  +# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
           99  +#--------------------------------------------------------------------
          100  +
          101  +TEA_PUBLIC_TCL_HEADERS
          102  +
          103  +#--------------------------------------------------------------------
          104  +# Check whether --enable-threads or --disable-threads was given.
          105  +#--------------------------------------------------------------------
          106  +
          107  +TEA_ENABLE_THREADS
          108  +
          109  +#--------------------------------------------------------------------
          110  +# The statement below defines a collection of symbols related to
          111  +# building as a shared library instead of a static library.
          112  +#--------------------------------------------------------------------
          113  +
          114  +TEA_ENABLE_SHARED
          115  +
          116  +#--------------------------------------------------------------------
          117  +# This macro figures out what flags to use with the compiler/linker
          118  +# when building shared/static debug/optimized objects.  This information
          119  +# can be taken from the tclConfig.sh file, but this figures it all out.
          120  +#--------------------------------------------------------------------
          121  +
          122  +TEA_CONFIG_CFLAGS
          123  +
          124  +#--------------------------------------------------------------------
          125  +# Set the default compiler switches based on the --enable-symbols option.
          126  +#--------------------------------------------------------------------
          127  +
          128  +TEA_ENABLE_SYMBOLS
          129  +
          130  +#--------------------------------------------------------------------
          131  +# Everyone should be linking against the Tcl stub library.  If you
          132  +# can't for some reason, remove this definition.  If you aren't using
          133  +# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
          134  +# link against the non-stubbed Tcl library.  Add Tk too if necessary.
          135  +#--------------------------------------------------------------------
          136  +
          137  +AC_DEFINE(USE_TCL_STUBS)
    54    138   
    55    139   #--------------------------------------------------------------------
    56    140   # If the variable OPENSSL is set, we will build with the OpenSSL
    57    141   # libraries.  If it is not set, then we will use RSA BSAFE SSL-C
    58    142   # libraries instead of the default OpenSSL libaries.
    59    143   #--------------------------------------------------------------------
    60    144   
    61    145   OPENSSL="1"
    62    146   
    63         -AC_ARG_ENABLE(bsafe, [  --enable-bsafe          Use RSA BSAFE SSL-C libs.  Default is to use OpenSSL libs], OPENSSL="", OPENSSL="1")
    64         -
    65         -#--------------------------------------------------------------------
    66         -# Establish the location of the root directory for OpenSSL.
    67         -# If we're not using OpenSSL, set the root for BSAFE SSL-C.
    68         -# If we're using BSAFE, define the BSAFE compiler flag.
    69         -# The "FLAT_INC" flag is used in the BSAFE ssl.h header file and
    70         -# doesn't seem to be referenced anywhere else.
    71         -#--------------------------------------------------------------------
    72         -
    73         -if test -n "${OPENSSL}"; then
    74         -    SSL_DIR='/usr/local/ssl'
    75         -    AC_DEFINE(NO_IDEA)
    76         -    AC_DEFINE(NO_RC5)
    77         -else
    78         -    SSL_DIR='/use/local/sslc'
    79         -    AC_DEFINE(BSAFE)
    80         -    AC_DEFINE(FLAT_INC)
    81         -fi
    82         -
    83         -#--------------------------------------------------------------------
    84         -# If we're using RSA BSAFE SSL-C, we need to establish what platform
    85         -# we're running on before we can figure out some paths.
    86         -# This step isn't necessary if we're using OpenSSL.
    87         -#--------------------------------------------------------------------
    88         -
    89         -
    90         -if test -z "${OPENSSL}"; then
    91         -    AC_MSG_CHECKING(host type)
    92         -    case "`uname -s`" in
    93         -	*win32* | *WIN32* | *CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*)
    94         -	    PLATFORM=WIN32
    95         -	    AC_DEFINE(WINDOWS)
    96         -	    ;;
    97         -	*SunOS*)
    98         -	    PLATFORM=SOLARIS
    99         -	    ;;
   100         -	HP-UX)
   101         -	    PLATFORM=HPUX
   102         -	    ;;
   103         -	*)
   104         -	    PLATFORM=LINUX
   105         -	    ;;
   106         -    esac
   107         -    AC_MSG_RESULT(${PLATFORM})
   108         -fi
   109         -
   110         -AC_ARG_WITH(ssl-dir, [  --with-ssl-dir=DIR      SSL root directory], SSL_DIR=$withval)
   111         -
   112         -if test ! -d "${SSL_DIR}"; then
   113         -    AC_ERROR(${SSL_DIR} is not a valid directory)
   114         -fi
   115         -
   116         -#--------------------------------------------------------------------
   117         -# The OpenSSL and BSAFE SSL-C directory structures differ.
   118         -#--------------------------------------------------------------------
   119         -
   120         -if test -n "${OPENSSL}"; then
   121         -    SSL_LIB_DIR=${SSL_DIR}/lib
   122         -    SSL_INCLUDE_DIR=${SSL_DIR}/include
   123         -    if test ! -f "${SSL_INCLUDE_DIR}/openssl/opensslv.h"; then
   124         -        AC_ERROR(bad ssl-dir: cannot find openssl/opensslv.h under ${SSL_INCLUDE_DIR})
   125         -    fi
   126         -else
   127         -    SSL_LIB_DIR=${SSL_DIR}/${PLATFORM}/library/lib
   128         -    SSL_INCLUDE_DIR=${SSL_DIR}/${PLATFORM}/library/include
   129         -    if test ! -f "${SSL_INCLUDE_DIR}/crypto.h"; then
   130         -        AC_ERROR(bad ssl-dir: cannot find crypto.h under ${SSL_INCLUDE_DIR})
   131         -    fi
   132         -fi
   133         -
   134         -AC_SUBST(SSL_DIR)
   135         -AC_SUBST(SSL_LIB_DIR)
   136         -AC_SUBST(SSL_INCLUDE_DIR)
          147  +TLS_CHECK_SSL
   137    148   
   138    149   #--------------------------------------------------------------------
   139    150   # Determine if we should use the patented encryption code
   140    151   #--------------------------------------------------------------------
   141    152   
   142    153   AC_ARG_ENABLE(patents, [  --enable-patents        Use patented code.  Default is enabled], PATENTS=${enableval}, PATENTS=yes)  
   143    154   
   144    155   if test ${PATENTS} = no; then
   145         -    AC_DEFINE("NO_PATENTS")
          156  +    AC_DEFINE([NO_PATENTS])
   146    157   fi
   147    158   
   148    159   #--------------------------------------------------------------------
   149         -# Check whether --enable-gcc or --disable-gcc was given.  Do this 
   150         -# before AC_CYGWIN is called so the compiler can be fully tested by
   151         -# built-in autoconf tools.  This macro also calls AC_PROG_CC to set
   152         -# the compiler if --enable-gcc was not used.
          160  +# This macro generates a line to use when building a library.  It
          161  +# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
          162  +# and TEA_LOAD_TCLCONFIG macros above.
   153    163   #--------------------------------------------------------------------
   154    164   
   155         -SC_ENABLE_GCC
   156         -AC_PROG_INSTALL
   157         -
   158         -#--------------------------------------------------------------------
   159         -# If OpenSSL was built with gcc then there may be some symbols that need
   160         -# resolving before we can load it into tclsh (__udivd3i on solaris.  Let the
   161         -# user specify if we need to add libgcc to the link line to resolve these
   162         -# symbols.
   163         -#
   164         -# This doesn't seem to be necessary if the RSA BSAFE SSL-C libraries
   165         -# are used instead of OpenSSL.
   166         -#--------------------------------------------------------------------
   167         -
   168         -if test -n "${OPENSSL}"; then
   169         -
   170         -    AC_MSG_CHECKING(if libgcc is needed to resolve openssl symbols)
   171         -
   172         -    AC_ARG_WITH(gcclib, [  --with-gcclib           link with libgcc to resolve symbols in a gcc-built openssl library], GCCLIB="-lgcc", GCCLIB="")
   173         -
   174         -    if test "x${GCCLIB}" = "x" ; then
   175         -        AC_MSG_RESULT(no)
   176         -    else
   177         -        AC_MSG_RESULT(yes)
   178         -        AC_MSG_CHECKING(for gcc library location)
   179         -        GCCPATH=`${CC} -print-libgcc-file-name | sed -e 's#[^/]*$##'`
   180         -        GCCPATH="-L${GCCPATH}"
   181         -        AC_MSG_RESULT(${GCCPATH})
   182         -    fi
   183         -fi
   184         -
   185         -#--------------------------------------------------------------------
   186         -# Checks to see if the make program sets the $MAKE variable.
   187         -#--------------------------------------------------------------------
   188         -
   189         -AC_PROG_MAKE_SET
   190         -
   191         -#--------------------------------------------------------------------
   192         -# Find ranlib
   193         -#--------------------------------------------------------------------
   194         -
   195         -AC_PROG_RANLIB
   196         -
   197         -#--------------------------------------------------------------------
   198         -# This macro performs additional compiler tests.
   199         -#--------------------------------------------------------------------
   200         -
   201         -AC_CYGWIN
   202         -
   203         -#--------------------------------------------------------------------
   204         -# Determines the correct binary file extension (.o, .obj, .exe etc.)
   205         -#--------------------------------------------------------------------
   206         -
   207         -AC_OBJEXT
   208         -AC_EXEEXT
   209         -
   210         -#--------------------------------------------------------------------
   211         -# "cygpath" is used on windows to generate native path names for
   212         -# include files.  These variables should only be used with the
   213         -# compiler and linker since # they generate native path names.
   214         -#
   215         -# Unix tclConfig.sh points SRC_DIR at the top-level directory of
   216         -# the Tcl sources, while the Windows tclConfig.sh points SRC_DIR at
   217         -# the win subdirectory.  Hence the different usages of SRC_DIR below.
   218         -#
   219         -# This must be done before calling SC_PUBLIC_TCL_HEADERS or
   220         -# SC_PRIVATE_TCL_HEADERS.
   221         -#--------------------------------------------------------------------
   222         -
   223         -case "`uname -s`" in
   224         -    *win32* | *WIN32* | *CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*)
   225         -	CYGPATH="cygpath -w"
   226         -	RELPATH=".. .. bin"
   227         -    ;;
   228         -    *)
   229         -	CYGPATH=echo
   230         -	RELPATH=".."
   231         -    ;;
   232         -esac
   233         -
   234         -AC_SUBST(CYGPATH)
   235         -AC_SUBST(RELPATH)
   236         -
   237         -SSL_INCLUDE_DIR_NATIVE=\"`${CYGPATH} ${SSL_INCLUDE_DIR}`\"
   238         -AC_SUBST(SSL_INCLUDE_DIR_NATIVE)
   239         -
   240         -
   241         -#--------------------------------------------------------------------
   242         -# Load the tclConfig.sh file
   243         -#--------------------------------------------------------------------
   244         -
   245         -SC_PATH_TCLCONFIG
   246         -SC_LOAD_TCLCONFIG
   247         -
   248         -SC_PUBLIC_TCL_HEADERS
   249         -
   250         -#--------------------------------------------------------------------
   251         -# A few miscellaneous platform-specific items:
   252         -#
   253         -# Define a special symbol for Windows (BUILD_tls in this case) so
   254         -# that we create the export library with the dll.
   255         -#
   256         -# Clean up any extra files that Windows creates.
   257         -#
   258         -# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
   259         -# These will be appended to the current set of compiler flags for
   260         -# your system.
   261         -#--------------------------------------------------------------------
   262         -
   263         -case "`uname -s`" in
   264         -    *win32* | *WIN32* | *CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*)
   265         -	AC_DEFINE_UNQUOTED(BUILD_${PACKAGE})
   266         -	CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc50.pch"
   267         -	AC_SUBST(CLEANFILES)
   268         -    ;;
   269         -    *)
   270         -	CLEANFILES=
   271         -    ;;
   272         -esac
   273         -
   274         -#--------------------------------------------------------------------
   275         -# Check whether --enable-threads or --disable-threads was given.
   276         -# So far only Tcl responds to this one.
   277         -#--------------------------------------------------------------------
   278         -
   279         -SC_ENABLE_THREADS
   280         -
   281         -#--------------------------------------------------------------------
   282         -# The statement below defines a collection of symbols related to
   283         -# building as a shared library instead of a static library.
   284         -#--------------------------------------------------------------------
   285         -
   286         -SC_ENABLE_SHARED
   287         -
   288         -#--------------------------------------------------------------------
   289         -# This macro figures out what flags to use with the compiler/linker
   290         -# when building shared/static debug/optimized objects.  This information
   291         -# is all taken from the tclConfig.sh file.
   292         -#--------------------------------------------------------------------
   293         -
   294         -CFLAGS_DEBUG=${TCL_CFLAGS_DEBUG}
   295         -CFLAGS_OPTIMIZE=${TCL_CFLAGS_OPTIMIZE}
   296         -LDFLAGS_DEBUG=${TCL_LDFLAGS_DEBUG}
   297         -LDFLAGS_OPTIMIZE=${TCL_LDFLAGS_OPTIMIZE}
   298         -SHLIB_LD=${TCL_SHLIB_LD}
   299         -STLIB_LD=${TCL_STLIB_LD}
   300         -SHLIB_CFLAGS=${TCL_SHLIB_CFLAGS}
   301         -
   302         -AC_SUBST(CFLAGS_DEBUG)
   303         -AC_SUBST(CFLAGS_OPTIMIZE)
   304         -AC_SUBST(STLIB_LD)
   305         -AC_SUBST(SHLIB_LD)
   306         -AC_SUBST(SHLIB_CFLAGS)
   307         -AC_SUBST(SHLIB_LDFLAGS)
   308         -
   309         -#--------------------------------------------------------------------
   310         -# Set the default compiler switches based on the --enable-symbols 
   311         -# option.
   312         -#--------------------------------------------------------------------
   313         -
   314         -SC_ENABLE_SYMBOLS
   315         -
   316         -if test "${SHARED_BUILD}" = "1" ; then
   317         -    CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING} ${SHLIB_CFLAGS}'
   318         -else
   319         -    CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING}'
   320         -fi
   321         -
   322         -#--------------------------------------------------------------------
   323         -# Everyone should be linking against the Tcl stub library.  If you
   324         -# can't for some reason, remove this definition.  If you aren't using
   325         -# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
   326         -# link against the non-stubbed Tcl library.
   327         -#--------------------------------------------------------------------
   328         -
   329         -AC_DEFINE(USE_TCL_STUBS)
   330         -
   331         -#--------------------------------------------------------------------
   332         -# This macro generates a line to use when building a library.  It
   333         -# depends on values set by the SC_ENABLE_SHARED, SC_ENABLE_SYMBOLS,
   334         -# and SC_LOAD_TCLCONFIG macros above.
   335         -#--------------------------------------------------------------------
   336         -
   337         -SC_MAKE_LIB
   338         -
   339         -#--------------------------------------------------------------------
   340         -# eval these two values to dereference the ${DBGX} variable.
   341         -#--------------------------------------------------------------------
   342         -
   343         -eval "SHARED_LIB_SUFFIX=${TCL_SHARED_LIB_SUFFIX}"
   344         -eval "UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}"
          165  +TEA_MAKE_LIB
   345    166   
   346    167   #--------------------------------------------------------------------
   347    168   # Shared libraries and static libraries have different names.
   348    169   # Also, windows libraries and unix libraries have different names.
   349    170   # For the OpenSSL version, I chose to use the same library names that
   350    171   # OpenSSL uses as its default names.
   351    172   #--------------------------------------------------------------------
   352    173   
   353    174   if test -n "${OPENSSL}"; then
   354         -
   355         -    case "`uname -s`" in
   356         -	*win32* | *WIN32* | *CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*)
   357         -	    if test "${SHARED_BUILD}" = "1" ; then
   358         -		SHLIB_LD_LIBS="\"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\" ${TCL_SHLIB_LD_LIBS} \"`${CYGPATH} ${SSL_LIB_DIR}/ssleay32.lib`\" \"`${CYGPATH} ${SSL_LIB_DIR}/libeay32.lib`\""
   359         -		eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}"
   360         -		RANLIB=:
   361         -	    else
   362         -		eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}"
   363         -	    fi
   364         -	;;
   365         -	*)
   366         -	    if test "${SHARED_BUILD}" = "1" ; then
   367         -		SHLIB_LD_LIBS="${TCL_STUB_LIB_SPEC} -L${SSL_LIB_DIR} -lssl -L${SSL_LIB_DIR} -lcrypto ${GCCPATH} ${GCCLIB}"
   368         -		eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${SHARED_LIB_SUFFIX}"
   369         -		RANLIB=:
   370         -	    else
   371         -		eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}"
   372         -	    fi
   373         -	;;
   374         -    esac
          175  +    if test "${TEA_PLATFORM}" = "windows" ; then
          176  +	TEA_ADD_LIBS([-L\"`${CYGPATH} ${SSL_LIB_DIR}`\" -lssleay32.lib -llibeay32.lib])
          177  +    else
          178  +	TEA_ADD_LIBS([-L${SSL_LIB_DIR} -lssl -lcrypto ${GCCPATH} ${GCCLIB}])
          179  +    fi
   375    180   else
   376         -    case "`uname -s`" in
   377         -        *win32* | *WIN32* | *CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*)
   378         -	    if test "${SHARED_BUILD}" = "1" ; then
   379         -	        SHLIB_LD_LIBS="\"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\" ${TCL_SHLIB_LD_LIBS} \"`${CYGPATH} ${SSL_LIB_DIR}/sslc32.lib`\""
   380         -	        eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}"
   381         -	        RANLIB=:
   382         -	    else
   383         -	        eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}"
   384         -	    fi
   385         -	;;
   386         -        *)
   387         -	    if test "${SHARED_BUILD}" = "1" ; then
   388         -	        SHLIB_LD_LIBS="${TCL_STUB_LIB_SPEC} -L${SSL_LIB_DIR} -lsslc"
   389         -	        eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${SHARED_LIB_SUFFIX}"
   390         -	        RANLIB=:
   391         -	    else
   392         -	        eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}"
   393         -	    fi
   394         -	;;
   395         -    esac
          181  +    if test "${TEA_PLATFORM}" = "windows" ; then
          182  +	TEA_ADD_LIBS([-L\"`${CYGPATH} ${SSL_LIB_DIR}`\" -lsslc32.lib])
          183  +    else
          184  +	TEA_ADD_LIBS([-L${SSL_LIB_DIR} -lsslc])
          185  +    fi
   396    186   fi
   397    187   
   398         -AC_SUBST(tls_LIB_FILE)
   399         -AC_SUBST(SHLIB_LD_LIBS)
   400         -
   401    188   #--------------------------------------------------------------------
   402    189   # Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
   403    190   # file during the install process.  Don't run the TCLSH_PROG through
   404    191   # ${CYGPATH} because it's being used directly by make.
   405    192   # Require that we use a tclsh shell version 8.2 or later since earlier
   406    193   # versions have bugs in the pkg_mkIndex routine.
          194  +# Add WISH as well if this is a Tk extension.
   407    195   #--------------------------------------------------------------------
   408    196   
   409         -SC_PROG_TCLSH
          197  +TEA_PROG_TCLSH
   410    198   
   411    199   #--------------------------------------------------------------------
   412    200   # Finally, substitute all of the various values into the Makefile.
   413    201   #--------------------------------------------------------------------
   414    202   
   415         -AC_OUTPUT([Makefile \
   416         -	pkgIndex.tcl])
          203  +AC_OUTPUT([Makefile])

Deleted pkgIndex.tcl.in.

     1         -
     2         -# pkgIndex.tcl - 
     3         -#
     4         -#    A new manually generated "pkgIndex.tcl" file for tls to
     5         -#    replace the original which didn't include the commands from "tls.tcl".
     6         -#
     7         -
     8         -package ifneeded tls 1.5 "[list load [file join $dir @RELPATH@ @tls_LIB_FILE@] ] ; [list source [file join $dir tls.tcl] ]"
     9         -

Deleted strncasecmp.c.

     1         -/* 
     2         - * strncasecmp.c --
     3         - *
     4         - *	Source code for the "strncasecmp" library routine.
     5         - *
     6         - * Copyright (c) 1988-1993 The Regents of the University of California.
     7         - * Copyright (c) 1995-1996 Sun Microsystems, Inc.
     8         - *
     9         - * See the file "license.terms" for information on usage and redistribution
    10         - * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
    11         - *
    12         - * SCCS: @(#) strncasecmp.c 1.7 96/10/24 15:23:36
    13         - */
    14         -
    15         -#include "tclPort.h"
    16         -
    17         -/*
    18         - * This array is designed for mapping upper and lower case letter
    19         - * together for a case independent comparison.  The mappings are
    20         - * based upon ASCII character sequences.
    21         - */
    22         -
    23         -static unsigned char charmap[] = {
    24         -    0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
    25         -    0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
    26         -    0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
    27         -    0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
    28         -    0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
    29         -    0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
    30         -    0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
    31         -    0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
    32         -    0x40, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
    33         -    0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
    34         -    0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
    35         -    0x78, 0x79, 0x7a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
    36         -    0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
    37         -    0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
    38         -    0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
    39         -    0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
    40         -    0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
    41         -    0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
    42         -    0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
    43         -    0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
    44         -    0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
    45         -    0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
    46         -    0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
    47         -    0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
    48         -    0xc0, 0xe1, 0xe2, 0xe3, 0xe4, 0xc5, 0xe6, 0xe7,
    49         -    0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
    50         -    0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
    51         -    0xf8, 0xf9, 0xfa, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
    52         -    0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
    53         -    0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
    54         -    0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
    55         -    0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
    56         -};
    57         -
    58         -/*
    59         - * Here are the prototypes just in case they are not included
    60         - * in tclPort.h.
    61         - */
    62         -int		strncasecmp _ANSI_ARGS_((CONST char *s1,
    63         -			    CONST char *s2, size_t n));
    64         -
    65         -int		strcasecmp _ANSI_ARGS_((CONST char *s1,
    66         -			    CONST char *s2));
    67         -
    68         -/*
    69         - *----------------------------------------------------------------------
    70         - *
    71         - * strcasecmp --
    72         - *
    73         - *	Compares two strings, ignoring case differences.
    74         - *
    75         - * Results:
    76         - *	Compares two null-terminated strings s1 and s2, returning -1, 0,
    77         - *	or 1 if s1 is lexicographically less than, equal to, or greater
    78         - *	than s2.
    79         - *
    80         - * Side effects:
    81         - *	None.
    82         - *
    83         - *----------------------------------------------------------------------
    84         - */
    85         -
    86         -int
    87         -strcasecmp(s1, s2)
    88         -    CONST char *s1;			/* First string. */
    89         -    CONST char *s2;			/* Second string. */
    90         -{
    91         -    unsigned char u1, u2;
    92         -
    93         -    for ( ; ; s1++, s2++) {
    94         -	u1 = (unsigned char) *s1;
    95         -	u2 = (unsigned char) *s2;
    96         -	if ((u1 == '\0') || (charmap[u1] != charmap[u2])) {
    97         -	    break;
    98         -	}
    99         -    }
   100         -    return charmap[u1] - charmap[u2];
   101         -}
   102         -
   103         -/*
   104         - *----------------------------------------------------------------------
   105         - *
   106         - * strncasecmp --
   107         - *
   108         - *	Compares two strings, ignoring case differences.
   109         - *
   110         - * Results:
   111         - *	Compares up to length chars of s1 and s2, returning -1, 0, or 1
   112         - *	if s1 is lexicographically less than, equal to, or greater
   113         - *	than s2 over those characters.
   114         - *
   115         - * Side effects:
   116         - *	None.
   117         - *
   118         - *----------------------------------------------------------------------
   119         - */
   120         -
   121         -int
   122         -strncasecmp(s1, s2, length)
   123         -    CONST char *s1;		/* First string. */
   124         -    CONST char *s2;		/* Second string. */
   125         -    size_t length;		/* Maximum number of characters to compare
   126         -				 * (stop earlier if the end of either string
   127         -				 * is reached). */
   128         -{
   129         -    unsigned char u1, u2;
   130         -
   131         -    for (; length != 0; length--, s1++, s2++) {
   132         -	u1 = (unsigned char) *s1;
   133         -	u2 = (unsigned char) *s2;
   134         -	if (charmap[u1] != charmap[u2]) {
   135         -	    return charmap[u1] - charmap[u2];
   136         -	}
   137         -	if (u1 == '\0') {
   138         -	    return 0;
   139         -	}
   140         -    }
   141         -    return 0;
   142         -}

Changes to tls.c.

     1      1   /*
     2      2    * Copyright (C) 1997-1999 Matt Newman <matt@novadigm.com>
     3      3    * some modifications:
     4      4    *	Copyright (C) 2000 Ajuba Solutions
     5      5    *	Copyright (C) 2002 ActiveState Corporation
     6      6    *	Copyright (C) 2004 Starfish Systems 
     7      7    *
     8         - * $Header: /home/rkeene/tmp/cvs2fossil/../tcltls/tls/tls/tls.c,v 1.20 2004/02/13 02:09:21 razzell Exp $
            8  + * $Header: /home/rkeene/tmp/cvs2fossil/../tcltls/tls/tls/tls.c,v 1.21 2004/03/19 21:05:16 hobbs Exp $
     9      9    *
    10     10    * TLS (aka SSL) Channel - can be layered on any bi-directional
    11     11    * Tcl_Channel (Note: Requires Trf Core Patch)
    12     12    *
    13     13    * This was built (almost) from scratch based upon observation of
    14     14    * OpenSSL 0.9.2B
    15     15    *
................................................................................
  1473   1473   
  1474   1474       Tcl_CreateObjCommand(interp, "tls::version", VersionObjCmd,
  1475   1475   	    (ClientData) 0, (Tcl_CmdDeleteProc *) NULL);
  1476   1476   
  1477   1477       Tcl_CreateObjCommand(interp, "tls::misc", MiscObjCmd,
  1478   1478   	    (ClientData) 0, (Tcl_CmdDeleteProc *) NULL);
  1479   1479   
  1480         -    return Tcl_PkgProvide(interp, PACKAGE, VERSION);
         1480  +    return Tcl_PkgProvide(interp, PACKAGE_NAME, PACKAGE_VERSION);
  1481   1481   }
  1482   1482   
  1483   1483   /*
  1484   1484    *------------------------------------------------------*
  1485   1485    *
  1486   1486    *	Tls_SafeInit --
  1487   1487    *