Index: ChangeLog ================================================================== --- ChangeLog +++ ChangeLog @@ -1,7 +1,10 @@ 2008-03-19 Jeff Hobbs + * win/makefile.vc: bump version to 1.6 + * configure.in: use -L and -R where necessary. [Bug 1742859] + * aclocal.m4: improve --with-ssl-dir check. * tests/tlsIO.test (tlsIO-14.*): Add tls::unimport for symmetry * tls.htm, tls.c (UnimportObjCmd): to tls::import. [Bug 1203273] Index: configure ================================================================== --- configure +++ configure @@ -1,8 +1,8 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for tls 1.5.1. +# Generated by GNU Autoconf 2.59 for tls 1.6. # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## @@ -265,12 +265,12 @@ : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME='tls' PACKAGE_TARNAME='tls' -PACKAGE_VERSION='1.5.1' -PACKAGE_STRING='tls 1.5.1' +PACKAGE_VERSION='1.6' +PACKAGE_STRING='tls 1.6' PACKAGE_BUGREPORT='' # Factoring default headers for most tests. ac_includes_default="\ #include @@ -775,11 +775,11 @@ # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures tls 1.5.1 to adapt to many kinds of systems. +\`configure' configures tls 1.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. @@ -832,11 +832,11 @@ _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of tls 1.5.1:";; + short | recursive ) echo "Configuration of tls 1.6:";; esac cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) @@ -858,11 +858,11 @@ --with-tcl directory containing tcl configuration (tclConfig.sh) --with-tclinclude directory containing the public Tcl header files --with-celib=DIR use Windows/CE support library from DIR --with-ssl-dir=DIR SSL root directory - --with-gcclib link with libgcc to resolve symbols in a gcc-built openssl library + --with-gcclib link with libgcc to resolve symbols in a gcc-built openssl library Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a @@ -967,11 +967,11 @@ fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -tls configure 1.5.1 +tls configure 1.6 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. @@ -981,11 +981,11 @@ exec 5>config.log cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by tls $as_me 1.5.1, which was +It was created by tls $as_me 1.6, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ _ACEOF @@ -9771,43 +9771,43 @@ OPENSSL="1" -#-------------------------------------------------------------------- -# If the variable OPENSSL is set, we will build with the OpenSSL -# libraries. If it is not set, then we will use RSA BSAFE SSL-C -# libraries instead of the default OpenSSL libaries. -#-------------------------------------------------------------------- + #-------------------------------------------------------------------- + # If the variable OPENSSL is set, we will build with the OpenSSL + # libraries. If it is not set, then we will use RSA BSAFE SSL-C + # libraries instead of the default OpenSSL libaries. + #-------------------------------------------------------------------- # Check whether --enable-bsafe or --disable-bsafe was given. if test "${enable_bsafe+set}" = set; then enableval="$enable_bsafe" OPENSSL="" else OPENSSL="1" fi; -#-------------------------------------------------------------------- -# Establish the location of the root directory for OpenSSL. -# If we're not using OpenSSL, set the root for BSAFE SSL-C. -# If we're using BSAFE, define the BSAFE compiler flag. -# The "FLAT_INC" flag is used in the BSAFE ssl.h header file and -# doesn't seem to be referenced anywhere else. -#-------------------------------------------------------------------- + #-------------------------------------------------------------------- + # Establish the location of the root directory for OpenSSL. + # If we're not using OpenSSL, set the root for BSAFE SSL-C. + # If we're using BSAFE, define the BSAFE compiler flag. + # The "FLAT_INC" flag is used in the BSAFE ssl.h header file and + # doesn't seem to be referenced anywhere else. + #-------------------------------------------------------------------- if test -n "${OPENSSL}"; then - SSL_DIR='/usr/local/ssl' + SSL_DIR='/usr /usr/local' cat >>confdefs.h <<\_ACEOF #define NO_IDEA 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define NO_RC5 1 _ACEOF else - SSL_DIR='/use/local/sslc' + SSL_DIR='/usr/sslc /usr/local/sslc' cat >>confdefs.h <<\_ACEOF #define BSAFE 1 _ACEOF cat >>confdefs.h <<\_ACEOF @@ -9864,36 +9864,10 @@ SSL_DIR=${ac_cv_c_ssldir} echo "$as_me:$LINENO: result: ${SSL_DIR}" >&5 echo "${ECHO_T}${SSL_DIR}" >&6 fi - #-------------------------------------------------------------------- - # If we're using RSA BSAFE SSL-C, we need to establish what platform - # we're running on before we can figure out some paths. - # This step isn't necessary if we're using OpenSSL. - #-------------------------------------------------------------------- - - if test -z "${OPENSSL}"; then - echo "$as_me:$LINENO: checking host type" >&5 -echo $ECHO_N "checking host type... $ECHO_C" >&6 - case "`uname -s`" in - *win32* | *WIN32* | *CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*) - PLATFORM=WIN32 - ;; - *SunOS*) - PLATFORM=SOLARIS - ;; - HP-UX) - PLATFORM=HPUX - ;; - *) - PLATFORM=LINUX - ;; - esac - echo "$as_me:$LINENO: result: ${PLATFORM}" >&5 -echo "${ECHO_T}${PLATFORM}" >&6 - fi #-------------------------------------------------------------------- # The OpenSSL and BSAFE SSL-C directory structures differ. #-------------------------------------------------------------------- @@ -9904,10 +9878,36 @@ { { echo "$as_me:$LINENO: error: bad ssl-dir: cannot find openssl/opensslv.h under ${SSL_INCLUDE_DIR}" >&5 echo "$as_me: error: bad ssl-dir: cannot find openssl/opensslv.h under ${SSL_INCLUDE_DIR}" >&2;} { (exit 1); exit 1; }; } fi else + #-------------------------------------------------------------------- + # If we're using RSA BSAFE SSL-C, we need to establish what platform + # we're running on before we can figure out some paths. + # This step isn't necessary if we're using OpenSSL. + #-------------------------------------------------------------------- + + if test -z "${OPENSSL}"; then + echo "$as_me:$LINENO: checking host type" >&5 +echo $ECHO_N "checking host type... $ECHO_C" >&6 + case "`uname -s`" in + *win32* | *WIN32* | *CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*) + PLATFORM=WIN32 + ;; + *SunOS*) + PLATFORM=SOLARIS + ;; + HP-UX) + PLATFORM=HPUX + ;; + *) + PLATFORM=LINUX + ;; + esac + echo "$as_me:$LINENO: result: ${PLATFORM}" >&5 +echo "${ECHO_T}${PLATFORM}" >&6 + fi SSL_LIB_DIR=${SSL_DIR}/${PLATFORM}/library/lib SSL_INCLUDE_DIR=${SSL_DIR}/${PLATFORM}/library/include if test ! -f "${SSL_INCLUDE_DIR}/crypto.h"; then { { echo "$as_me:$LINENO: error: bad ssl-dir: cannot find crypto.h under ${SSL_INCLUDE_DIR}" >&5 echo "$as_me: error: bad ssl-dir: cannot find crypto.h under ${SSL_INCLUDE_DIR}" >&2;} @@ -9917,17 +9917,12 @@ - if test "$PLATFORM" = "WIN32" -a "$GCC" != "yes"; then - SSL_INCLUDE_DIR_NATIVE=\"`echo ${SSL_INCLUDE_DIR}|sed 's%/%\\\\%g'`\" - SSL_LIB_DIR_NATIVE=\"`echo ${SSL_LIB_DIR}|sed 's%/%\\\\%g'`\" - else - SSL_INCLUDE_DIR_NATIVE=\"`${CYGPATH} ${SSL_INCLUDE_DIR}`\" - SSL_LIB_DIR_NATIVE=\"`${CYGPATH} ${SSL_LIB_DIR}`\" - fi + SSL_INCLUDE_DIR_NATIVE=\"`${CYGPATH} ${SSL_INCLUDE_DIR}`\" + SSL_LIB_DIR_NATIVE=\"`${CYGPATH} ${SSL_LIB_DIR}`\" #-------------------------------------------------------------------- # If OpenSSL was built with gcc then there may be some symbols that need @@ -9938,11 +9933,10 @@ # This doesn't seem to be necessary if the RSA BSAFE SSL-C libraries # are used instead of OpenSSL. #-------------------------------------------------------------------- if test -n "${OPENSSL}"; then - echo "$as_me:$LINENO: checking if libgcc is needed to resolve openssl symbols" >&5 echo $ECHO_N "checking if libgcc is needed to resolve openssl symbols... $ECHO_C" >&6 # Check whether --with-gcclib or --without-gcclib was given. @@ -10073,40 +10067,51 @@ # Also, windows libraries and unix libraries have different names. # For the OpenSSL version, I chose to use the same library names that # OpenSSL uses as its default names. #-------------------------------------------------------------------- -if test -n "${OPENSSL}"; then - if test "${TEA_PLATFORM}" = "windows" ; then - if test "$GCC" = "yes"; then +if test "${TEA_PLATFORM}" = "windows" ; then + if test "$GCC" = "yes"; then - vars="-L${SSL_LIB_DIR_NATIVE} -lssleay32 -llibeay32" + vars="-L${SSL_LIB_DIR_NATIVE}" + for i in $vars; do + if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then + # Convert foo.lib to -lfoo for GCC. No-op if not *.lib + i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'` + fi + PKG_LIBS="$PKG_LIBS $i" + done + + + else + + vars="-libpath:${SSL_LIB_DIR_NATIVE}" for i in $vars; do if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then # Convert foo.lib to -lfoo for GCC. No-op if not *.lib i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'` fi PKG_LIBS="$PKG_LIBS $i" done - else + fi + if test -n "${OPENSSL}"; then - vars="-libpath:${SSL_LIB_DIR_NATIVE} ssleay32.lib libeay32.lib" + vars="ssleay32.lib libeay32.lib" for i in $vars; do if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then # Convert foo.lib to -lfoo for GCC. No-op if not *.lib i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'` fi PKG_LIBS="$PKG_LIBS $i" done - fi else - vars="-L${SSL_LIB_DIR} -lssl -lcrypto ${GCCPATH} ${GCCLIB}" + vars="sslc32.lib" for i in $vars; do if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then # Convert foo.lib to -lfoo for GCC. No-op if not *.lib i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'` fi @@ -10114,39 +10119,28 @@ done fi else - if test "${TEA_PLATFORM}" = "windows" ; then - if test "$GCC" = "yes"; then + # Subst runtime dir here, use -R and -L where necessary. [Bug 1742859] + LIB_RUNTIME_DIR=${SSL_LIB_DIR} + eval "LD_SEARCH_FLAGS=\"${LD_SEARCH_FLAGS}\"" + if test -n "${OPENSSL}"; then - vars="-L${SSL_LIB_DIR_NATIVE} -lsslc32" + vars="${LD_SEARCH_FLAGS} -L${SSL_LIB_DIR} -lssl -lcrypto ${GCCPATH} ${GCCLIB}" for i in $vars; do if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then # Convert foo.lib to -lfoo for GCC. No-op if not *.lib i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'` fi PKG_LIBS="$PKG_LIBS $i" done - else - - vars="-libpath:${SSL_LIB_DIR_NATIVE} sslc32.lib" - for i in $vars; do - if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then - # Convert foo.lib to -lfoo for GCC. No-op if not *.lib - i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'` - fi - PKG_LIBS="$PKG_LIBS $i" - done - - - fi - else - - vars="-L${SSL_LIB_DIR} -lsslc" + else + + vars="${LD_SEARCH_FLAGS} -L${SSL_LIB_DIR} -lsslc" for i in $vars; do if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then # Convert foo.lib to -lfoo for GCC. No-op if not *.lib i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'` fi @@ -10596,11 +10590,11 @@ ## Running $as_me. ## _ASBOX } >&5 cat >&5 <<_CSEOF -This file was extended by tls $as_me 1.5.1, which was +This file was extended by tls $as_me 1.6, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS @@ -10651,11 +10645,11 @@ Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -tls config.status 1.5.1 +tls config.status 1.6 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation Index: configure.in ================================================================== --- configure.in +++ configure.in @@ -9,18 +9,18 @@ dnl to use the RSA BSAFE libraries for any product developed for dnl commercial use. Licensing information for BSAFE SSL-C may be dnl obtained from RSA Data Scurity Inc., San Mateo, California, USA. dnl Their home page on the web is "www.rsasecurity.com". # -# RCS: @(#) $Id: configure.in,v 1.23 2007/06/22 21:19:12 hobbs2 Exp $ +# RCS: @(#) $Id: configure.in,v 1.24 2008/03/19 22:38:26 hobbs2 Exp $ #-------------------------------------------------------------------- # macro used to verify that the configure script can find the sources #-------------------------------------------------------------------- -AC_INIT([tls], [1.5.1]) +AC_INIT([tls], [1.6]) TEA_INIT([3.6]) AC_CONFIG_AUX_DIR(tclconfig) @@ -169,29 +169,29 @@ # Also, windows libraries and unix libraries have different names. # For the OpenSSL version, I chose to use the same library names that # OpenSSL uses as its default names. #-------------------------------------------------------------------- -if test -n "${OPENSSL}"; then - if test "${TEA_PLATFORM}" = "windows" ; then - if test "$GCC" = "yes"; then - TEA_ADD_LIBS([-L${SSL_LIB_DIR_NATIVE} -lssleay32 -llibeay32]) - else - TEA_ADD_LIBS([-libpath:${SSL_LIB_DIR_NATIVE} ssleay32.lib libeay32.lib]) - fi - else - TEA_ADD_LIBS([-L${SSL_LIB_DIR} -lssl -lcrypto ${GCCPATH} ${GCCLIB}]) - fi -else - if test "${TEA_PLATFORM}" = "windows" ; then - if test "$GCC" = "yes"; then - TEA_ADD_LIBS([-L${SSL_LIB_DIR_NATIVE} -lsslc32]) - else - TEA_ADD_LIBS([-libpath:${SSL_LIB_DIR_NATIVE} sslc32.lib]) - fi - else - TEA_ADD_LIBS([-L${SSL_LIB_DIR} -lsslc]) +if test "${TEA_PLATFORM}" = "windows" ; then + if test "$GCC" = "yes"; then + TEA_ADD_LIBS([-L${SSL_LIB_DIR_NATIVE}]) + else + TEA_ADD_LIBS([-libpath:${SSL_LIB_DIR_NATIVE}]) + fi + if test -n "${OPENSSL}"; then + TEA_ADD_LIBS([ssleay32.lib libeay32.lib]) + else + TEA_ADD_LIBS([sslc32.lib]) + fi +else + # Subst runtime dir here, use -R and -L where necessary. [Bug 1742859] + LIB_RUNTIME_DIR=${SSL_LIB_DIR} + eval "LD_SEARCH_FLAGS=\"${LD_SEARCH_FLAGS}\"" + if test -n "${OPENSSL}"; then + TEA_ADD_LIBS([${LD_SEARCH_FLAGS} -L${SSL_LIB_DIR} -lssl -lcrypto ${GCCPATH} ${GCCLIB}]) + else + TEA_ADD_LIBS([${LD_SEARCH_FLAGS} -L${SSL_LIB_DIR} -lsslc]) fi fi #-------------------------------------------------------------------- # Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl Index: win/makefile.vc ================================================================== --- win/makefile.vc +++ win/makefile.vc @@ -16,11 +16,11 @@ # Copyright (c) 2001 ActiveState Corporation. # Copyright (c) 2001-2002 David Gravereaux. # Copyright (c) 2003-2006 Pat Thoyts # #------------------------------------------------------------------------- -# RCS: @(#)$Id: makefile.vc,v 1.5 2008/03/19 02:34:21 patthoyts Exp $ +# RCS: @(#)$Id: makefile.vc,v 1.6 2008/03/19 22:38:26 hobbs2 Exp $ #------------------------------------------------------------------------- # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) # or with the MS Platform SDK (MSSDK). Visual Studio .NET 2003 and 2005 define # VCINSTALLDIR instead. The MSVC Toolkit release defines yet another. @@ -162,11 +162,11 @@ # Uncomment the following line if this is a Tk extension. #PROJECT_REQUIRES_TK=1 !include "rules.vc" -DOTVERSION = 1.5.1 +DOTVERSION = 1.6 VERSION = $(DOTVERSION:.=) STUBPREFIX = $(PROJECT)stub DLLOBJS = \ $(TMP_DIR)\tls.obj \