Index: acinclude.m4 ================================================================== --- acinclude.m4 +++ acinclude.m4 @@ -114,11 +114,11 @@ TCLTLS_SSL_CFLAGS="-I$openssldir/include" TCLTLS_SSL_CPPFLAGS="-I$openssldir/include" fi pkgConfigExtraArgs='' - if test "$TCLEXT_BUILD" = "static" -o "$TCLEXT_TLS_STATIC_SSL" = 'yes'; then + if test "${SHARED_BUILD}" != "1" -o "$TCLEXT_TLS_STATIC_SSL" = 'yes'; then pkgConfigExtraArgs='--static' fi dnl Use pkg-config to find the libraries dnl Temporarily update PKG_CONFIG_PATH @@ -144,20 +144,20 @@ if test -z "$TCLTLS_SSL_CPPFLAGS"; then TCLTLS_SSL_CPPFLAGS="`"${PKGCONFIG}" openssl --cflags-only-I $pkgConfigExtraArgs`" || AC_MSG_ERROR([Unable to get OpenSSL Configuration]) fi PKG_CONFIG_PATH="${PKG_CONFIG_PATH_SAVE}" - if test "$TCLEXT_BUILD" = "static"; then + if test "${SHARED_BUILD}" != "1"; then dnl If we are doing a static build, save the linker flags for other programs to consume rm -f tcltls.${AREXT}.linkadd AS_ECHO(["$TCLTLS_SSL_LIBS"]) > tcltls.${AREXT}.linkadd fi dnl If we have been asked to statically link to the SSL library, specifically tell the linker to do so if test "$TCLEXT_TLS_STATIC_SSL" = 'yes'; then dnl Don't bother doing this if we aren't actually doing the runtime linking - if test "$TCLEXT_BUILD" != "static"; then + if test "${SHARED_BUILD}" = "1"; then dnl Split the libraries into SSL and non-SSL libraries new_TCLTLS_SSL_LIBS_normal='' new_TCLTLS_SSL_LIBS_static='' for arg in $TCLTLS_SSL_LIBS; do case "${arg}" in Index: configure ================================================================== --- configure +++ configure @@ -646,11 +646,10 @@ ac_header_c_list= ac_subst_vars='LTLIBOBJS GEN_DH_PARAMS_ARGS TCLSH_PROG -TCLEXT_BUILD SSL_LIB_DIR_NATIVE SSL_INCLUDE_DIR_NATIVE SSL_INCLUDE_DIR SSL_LIB_DIR SSL_DIR @@ -8981,11 +8980,11 @@ TCLTLS_SSL_CFLAGS="-I$openssldir/include" TCLTLS_SSL_CPPFLAGS="-I$openssldir/include" fi pkgConfigExtraArgs='' - if test "$TCLEXT_BUILD" = "static" -o "$TCLEXT_TLS_STATIC_SSL" = 'yes'; then + if test "${SHARED_BUILD}" != "1" -o "$TCLEXT_TLS_STATIC_SSL" = 'yes'; then pkgConfigExtraArgs='--static' fi PKG_CONFIG_PATH_SAVE="${PKG_CONFIG_PATH}" if test -n "${opensslpkgconfigdir}"; then @@ -9009,17 +9008,17 @@ if test -z "$TCLTLS_SSL_CPPFLAGS"; then TCLTLS_SSL_CPPFLAGS="`"${PKGCONFIG}" openssl --cflags-only-I $pkgConfigExtraArgs`" || as_fn_error $? "Unable to get OpenSSL Configuration" "$LINENO" 5 fi PKG_CONFIG_PATH="${PKG_CONFIG_PATH_SAVE}" - if test "$TCLEXT_BUILD" = "static"; then + if test "${SHARED_BUILD}" != "1"; then rm -f tcltls.${AREXT}.linkadd printf "%s\n" "$TCLTLS_SSL_LIBS" > tcltls.${AREXT}.linkadd fi if test "$TCLEXT_TLS_STATIC_SSL" = 'yes'; then - if test "$TCLEXT_BUILD" != "static"; then + if test "${SHARED_BUILD}" = "1"; then new_TCLTLS_SSL_LIBS_normal='' new_TCLTLS_SSL_LIBS_static='' for arg in $TCLTLS_SSL_LIBS; do case "${arg}" in -L*) @@ -9135,15 +9134,10 @@ TCLTLS_SSL_LIBS="${new_TCLTLS_SSL_LIBS_normal} ${new_TCLTLS_SSL_LIBS_static}" fi fi -#TLS_CHECK_SSL - -#AC_CHECK_LIB(crypto, main, [LIBS="$LIBS -lcrypto"]) -#AC_CHECK_LIB(ssl, main, [LIBS="$LIBS -lssl"]) - SSL_DIR="/usr" SSL_LIB_DIR=${SSL_DIR}/lib64 SSL_INCLUDE_DIR=${SSL_DIR}/include/openssl @@ -9242,18 +9236,10 @@ fi fi -if test "${SHARED_BUILD}" = "1" ; then - TCLEXT_BUILD="shared" - -else - TCLEXT_BUILD="static" - -fi - #-------------------------------------------------------------------- # Determine the name of the tclsh and/or wish executables in the # Tcl and Tk build directories or the location they were installed # into. These paths are used to support running test cases only, # the Makefile should not be making use of these paths to generate @@ -9316,11 +9302,11 @@ # Check whether --enable-tls1 was given. if test ${enable_tls1+y} then : enableval=$enable_tls1; - if (test "${enableval}" = "no"); then + if test "${enableval}" = "no"; then printf "%s\n" "#define NO_TLS1 1" >>confdefs.h fi @@ -9329,11 +9315,11 @@ # Check whether --enable-tls1_1 was given. if test ${enable_tls1_1+y} then : enableval=$enable_tls1_1; - if (test "${enableval}" = "no"); then + if test "${enableval}" = "no"; then printf "%s\n" "#define NO_TLS1_1 1" >>confdefs.h fi @@ -9342,11 +9328,11 @@ # Check whether --enable-tls1_2 was given. if test ${enable_tls1_2+y} then : enableval=$enable_tls1_2; - if (test "${enableval}" = "no"); then + if test "${enableval}" = "no"; then printf "%s\n" "#define NO_TLS1_2 1" >>confdefs.h fi @@ -9355,11 +9341,11 @@ # Check whether --enable-tls1_3 was given. if test ${enable_tls1_3+y} then : enableval=$enable_tls1_3; - if (test "${enableval}" = "no"); then + if test "${enableval}" = "no"; then printf "%s\n" "#define NO_TLS1_3 1" >>confdefs.h fi Index: configure.ac ================================================================== --- configure.ac +++ configure.ac @@ -217,16 +217,10 @@ TEA_ADD_INCLUDES([-I${SSL_INCLUDE_DIR}]) TEA_ADD_LIBS([${LD_SEARCH_FLAGS} -L${SSL_LIB_DIR} -lsslc]) fi fi -if test "${SHARED_BUILD}" = "1" ; then - AC_SUBST(TCLEXT_BUILD,"shared") -else - AC_SUBST(TCLEXT_BUILD,"static") -fi - #-------------------------------------------------------------------- # Determine the name of the tclsh and/or wish executables in the # Tcl and Tk build directories or the location they were installed # into. These paths are used to support running test cases only, # the Makefile should not be making use of these paths to generate Index: pkgIndex.tcl.in ================================================================== --- pkgIndex.tcl.in +++ pkgIndex.tcl.in @@ -4,19 +4,19 @@ if {[package vsatisfies [package provide Tcl] 9.0-]} { package ifneeded @PACKAGE_NAME@ @PACKAGE_VERSION@ \ [list load [file join $dir @PKG_LIB_FILE9@] [string totitle @PACKAGE_NAME@]] } elseif {[package vsatisfies [package present Tcl] 8.5-]} { package ifneeded @PACKAGE_NAME@ @PACKAGE_VERSION@ [list apply {{dir} { - if {{@TCLEXT_BUILD@} eq "static"} { - load {} [string totitle @PACKAGE_NAME@] - } else { - load [file join $dir @PKG_LIB_FILE8@] [string totitle @PACKAGE_NAME@] - } - - set initScript [file join $dir @PACKAGE_NAME@.tcl] - if {[file exists $initScript]} { - source $initScript - } + if {[string tolower [file extension @PKG_LIB_FILE8@]] in [list ".dll" ".so"]} { + load [file join $dir @PKG_LIB_FILE8@] [string totitle @PACKAGE_NAME@] + } else { + load {} [string totitle @PACKAGE_NAME@] + } + + set initScript [file join $dir @PACKAGE_NAME@.tcl] + if {[file exists $initScript]} { + source $initScript + } }} $dir] } elseif {[package vsatisfies [package present Tcl] 8.4]} { package ifneeded @PACKAGE_NAME@ @PACKAGE_VERSION@ [list load [file join $dir @PKG_LIB_FILE8@] [string totitle @PACKAGE_NAME@]] }