@@ -645,18 +645,18 @@ #endif" ac_header_c_list= ac_subst_vars='LTLIBOBJS TCLSH_PROG +TCLTLS_SSL_LIBS TCLTLS_SSL_INCLUDES TCLTLS_SSL_CFLAGS -TCLTLS_SSL_LIBS -GEN_DH_PARAMS_ARGS PKG_CONFIG VC_MANIFEST_EMBED_EXE VC_MANIFEST_EMBED_DLL RANLIB_STUB +PKG_STUB_LIB_FILE MAKE_STUB_LIB MAKE_STATIC_LIB MAKE_SHARED_LIB MAKE_LIB EGREP @@ -718,11 +718,10 @@ PKG_INCLUDES PKG_HEADERS PKG_TCL_SOURCES PKG_STUB_OBJECTS PKG_STUB_SOURCES -PKG_STUB_LIB_FILE PKG_LIB_FILE9 PKG_LIB_FILE8 PKG_LIB_FILE EXEEXT CYGPATH @@ -780,12 +779,10 @@ enable_symbols enable_tls1 enable_tls1_1 enable_tls1_2 enable_tls1_3 -enable_deterministic -with_builtin_dh_params_size enable_ssl_fastpath enable_hardening enable_static_ssl with_openssl_dir with_openssl_includedir @@ -799,13 +796,13 @@ CFLAGS LDFLAGS LIBS CPPFLAGS CPP -TCLTLS_SSL_LIBS TCLTLS_SSL_CFLAGS -TCLTLS_SSL_INCLUDES' +TCLTLS_SSL_INCLUDES +TCLTLS_SSL_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false @@ -1432,11 +1429,10 @@ --enable-symbols build with debugging symbols (default: off) --disable-tls1 disable TLS1 protocol --disable-tls1_1 disable TLS1.1 protocol --disable-tls1_2 disable TLS1.2 protocol --disable-tls1_3 disable TLS1.3 protocol - --enable-deterministic enable deterministic DH parameters --enable-ssl-fastpath enable using the underlying file descriptor for talking directly to the SSL library --enable-hardening enable hardening attempts --enable-static-ssl enable static linking to the SSL library @@ -1445,13 +1441,10 @@ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-tcl directory containing tcl configuration (tclConfig.sh) --with-tcl8 Compile for Tcl8 in Tcl9 environment --with-tclinclude directory containing the public Tcl header files - --with-builtin-dh-params-size= - specify the size in bits of the built-in, - precomputed, DH params --with-openssl-dir= path to root directory of OpenSSL or LibreSSL installation --with-openssl-includedir= path to include directory of OpenSSL or LibreSSL @@ -1470,16 +1463,16 @@ nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor - TCLTLS_SSL_LIBS - libraries to pass to the linker for OpenSSL or LibreSSL TCLTLS_SSL_CFLAGS C compiler flags for OpenSSL or LibreSSL TCLTLS_SSL_INCLUDES C compiler include paths for OpenSSL or LibreSSL + TCLTLS_SSL_LIBS + libraries to pass to the linker for OpenSSL or LibreSSL Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. @@ -2612,12 +2605,10 @@ # This package name must be replaced statically for AC_SUBST to work - # Substitute STUB_LIB_FILE in case package creates a stub library too. - # We AC_SUBST these here to ensure they are subst'ed, # in case the user doesn't call TEA_ADD_... @@ -5508,11 +5499,11 @@ # # A few miscellaneous platform-specific items: # TEA_ADD_* any platform specific compiler/build info here. #-------------------------------------------------------------------- -CONFIG_CLEAN_FILES="$CONFIG_CLEAN_FILES tls.tcl.h.* config.log config.status dh_params.h.new dh_params.h Makefile pkgIndex.tcl tcltls.a.linkadd tcltls.syms" +CONFIG_CLEAN_FILES="$CONFIG_CLEAN_FILES tls.tcl.h.* config.log config.status Makefile pkgIndex.tcl tcltls.a.linkadd tcltls.syms" if test "${TEA_PLATFORM}" = "windows" ; then printf "%s\n" "#define BUILD_tls 1" >>confdefs.h printf "%s\n" "#define WINDOWS 1" >>confdefs.h @@ -8871,11 +8862,15 @@ eval eval "PKG_LIB_FILE8=${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" eval eval "PKG_LIB_FILE9=${PACKAGE_LIB_PREFIX9}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" fi # Some packages build their own stubs libraries - eval eval "PKG_STUB_LIB_FILE=${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}" + if test "${TCL_MAJOR_VERSION}" -gt 8 -a x"${with_tcl8}" == x; then + eval eval "PKG_STUB_LIB_FILE=${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}stub.a" + else + eval eval "PKG_STUB_LIB_FILE=${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}" + fi if test "$GCC" = "yes"; then PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE} fi # These aren't needed on Windows (either MSVC or gcc) RANLIB=: @@ -8890,16 +8885,20 @@ eval eval "PKG_LIB_FILE8=lib${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" eval eval "PKG_LIB_FILE9=lib${PACKAGE_LIB_PREFIX9}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" RANLIB=: else - eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" - eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX9}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" + eval eval "PKG_LIB_FILE8=lib${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" + eval eval "PKG_LIB_FILE9=lib${PACKAGE_LIB_PREFIX9}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" fi # Some packages build their own stubs libraries - eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}" + if test "${TCL_MAJOR_VERSION}" -gt 8 -a x"${with_tcl8}" == x; then + eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}stub.a" + else + eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}" + fi fi # These are escaped so that only CFLAGS is picked up at configure time. # The other values will be substituted at make time. CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}" @@ -8908,10 +8907,12 @@ fi + + # Substitute STUB_LIB_FILE in case package creates a stub library too. @@ -9008,11 +9009,11 @@ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_PKG_CONFIG" = x; then - PKG_CONFIG="false" + PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} @@ -9091,50 +9092,10 @@ fi fi - - # Check whether --enable-deterministic was given. -if test ${enable_deterministic+y} -then : - enableval=$enable_deterministic; - tcltls_deterministic="$enableval" - -else $as_nop - - tcltls_deterministic='no' - -fi - - if test "$tcltls_deterministic" = 'yes'; then - GEN_DH_PARAMS_ARGS='fallback' - else - GEN_DH_PARAMS_ARGS='' - fi - - -# Check whether --with-builtin-dh-params-size was given. -if test ${with_builtin_dh_params_size+y} -then : - withval=$with_builtin_dh_params_size; - case $withval in #( - 2048|4096|8192) : - ;; #( - *) : - as_fn_error $? "Unsupported DH params size: $withval" "$LINENO" 5 ;; -esac - GEN_DH_PARAMS_ARGS="${GEN_DH_PARAMS_ARGS} bits=$withval" - -fi - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for DH params" >&5 -printf %s "checking for DH params... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GEN_DH_PARAMS_ARGS" >&5 -printf "%s\n" "$GEN_DH_PARAMS_ARGS" >&6; } - # Check whether --enable-ssl-fastpath was given. if test ${enable_ssl_fastpath+y} then : enableval=$enable_ssl_fastpath; @@ -9205,16 +9166,10 @@ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for static linking of openSSL libraries" >&5 printf %s "checking for static linking of openSSL libraries... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $TCLEXT_TLS_STATIC_SSL" >&5 printf "%s\n" "$TCLEXT_TLS_STATIC_SSL" >&6; } - # Static lib - pkgConfigExtraArgs='' - if test "${SHARED_BUILD}" == 0 -o "$TCLEXT_TLS_STATIC_SSL" = 'yes'; then - pkgConfigExtraArgs='--static' - fi - # Check whether --with-openssl-dir was given. if test ${with_openssl_dir+y} then : @@ -9237,11 +9192,11 @@ opensslincludedir="$withval" else $as_nop if test -n "$openssldir"; then - opensslincludedir="${openssldir}${PATH_SEPARATOR}include${PATH_SEPARATOR}openssl" + opensslincludedir="$openssldir/include/openssl" else opensslincludedir='' fi @@ -9251,16 +9206,19 @@ printf %s "checking for OpenSSL include directory... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $opensslincludedir" >&5 printf "%s\n" "$opensslincludedir" >&6; } if test -n "$opensslincludedir"; then - if test -f "${opensslincludedir}${PATH_SEPARATOR}ssl.h"; then + if test -f "$opensslincludedir/ssl.h"; then TCLTLS_SSL_CFLAGS="-I$opensslincludedir" TCLTLS_SSL_INCLUDES="-I$opensslincludedir" else as_fn_error $? "Unable to locate ssl.h" "$LINENO" 5 fi + else + TCLTLS_SSL_CFLAGS="-I$(includedir)/openssl" + TCLTLS_SSL_INCLUDES="-I$(includedir)/openssl" fi # Check whether --with-openssl-libdir was given. if test ${with_openssl_libdir+y} @@ -9270,13 +9228,13 @@ else $as_nop if test -n "$openssldir"; then if test "$do64bit" == 'yes'; then - openssllibdir="${openssldir}${PATH_SEPARATOR}lib64" + openssllibdir="$openssldir/lib64" else - openssllibdir="${openssldir}${PATH_SEPARATOR}lib" + openssllibdir="$openssldir/lib" fi else openssllibdir='' fi @@ -9286,12 +9244,12 @@ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OpenSSL lib directory" >&5 printf %s "checking for OpenSSL lib directory... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $openssllibdir" >&5 printf "%s\n" "$openssllibdir" >&6; } - if test -n "$openssllibdir"; then - if test -f "${openssllibdir}${PATH_SEPARATOR}libssl${SHLIB_SUFFIX}"; then + if test -n "$openssllibdir"; then + if test -f "$openssllibdir/libssl${SHLIB_SUFFIX}"; then if test "${TCLEXT_TLS_STATIC_SSL}" == 'no'; then TCLTLS_SSL_LIBS="-L$openssllibdir -lcrypto -lssl" else # Linux and Solaris TCLTLS_SSL_LIBS="-Wl,-Bstatic `$PKG_CONFIG --static --libs crypto ssl` -Wl,-Bdynamic" @@ -9302,10 +9260,15 @@ as_fn_error $? "Unable to locate libssl${SHLIB_SUFFIX}" "$LINENO" 5 fi else TCLTLS_SSL_LIBS="-lcrypto -lssl" fi + + + + + # Check whether --with-openssl-pkgconfig was given. if test ${with_openssl_pkgconfig+y} @@ -9323,33 +9286,38 @@ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OpenSSL pkgconfig" >&5 printf %s "checking for OpenSSL pkgconfig... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $opensslpkgconfigdir" >&5 printf "%s\n" "$opensslpkgconfigdir" >&6; } - PKG_CONFIG_PATH_SAVE="${PKG_CONFIG_PATH}" - if test -n "${opensslpkgconfigdir}"; then - if ! test -f "${opensslpkgconfigdir}${PATH_SEPARATOR}openssl.pc"; then - as_fn_error $? "Unable to locate ${opensslpkgconfigdir}${PATH_SEPARATOR}openssl.pc" "$LINENO" 5 - fi - - PKG_CONFIG_PATH="${opensslpkgconfigdir}${PATH_SEPARATOR}${PKG_CONFIG_PATH}" - export PKG_CONFIG_PATH - fi - - - - - if test -z "$TCLTLS_SSL_LIBS"; then - TCLTLS_SSL_LIBS="`"${PKG_CONFIG}" openssl --libs $pkgConfigExtraArgs`" || as_fn_error $? "Unable to get OpenSSL Configuration" "$LINENO" 5 - fi - if test -z "$TCLTLS_SSL_CFLAGS"; then - TCLTLS_SSL_CFLAGS="`"${PKG_CONFIG}" openssl --cflags-only-other $pkgConfigExtraArgs`" || as_fn_error $? "Unable to get OpenSSL Configuration" "$LINENO" 5 - fi - if test -z "$TCLTLS_SSL_INCLUDES"; then - TCLTLS_SSL_INCLUDES="`"${PKG_CONFIG}" openssl --cflags-only-I $pkgConfigExtraArgs`" || as_fn_error $? "Unable to get OpenSSL Configuration" "$LINENO" 5 - fi - PKG_CONFIG_PATH="${PKG_CONFIG_PATH_SAVE}" + + # Use Package Config tool to get config + pkgConfigExtraArgs='' + if test "${SHARED_BUILD}" == 0 -o "$TCLEXT_TLS_STATIC_SSL" = 'yes'; then + pkgConfigExtraArgs='--static' + fi + + if test -n "${PKG_CONFIG}"; then + PKG_CONFIG_PATH_SAVE="${PKG_CONFIG_PATH}" + if test -n "${opensslpkgconfigdir}"; then + if ! test -f "${opensslpkgconfigdir}/openssl.pc"; then + as_fn_error $? "Unable to locate ${opensslpkgconfigdir}/openssl.pc" "$LINENO" 5 + fi + + PKG_CONFIG_PATH="${opensslpkgconfigdir}${PATH_SEPARATOR}${PKG_CONFIG_PATH}" + export PKG_CONFIG_PATH + fi + if test -z "$TCLTLS_SSL_LIBS"; then + TCLTLS_SSL_LIBS="`"${PKG_CONFIG}" openssl --libs $pkgConfigExtraArgs`" || as_fn_error $? "Unable to get OpenSSL Configuration" "$LINENO" 5 + fi + if test -z "$TCLTLS_SSL_CFLAGS"; then + TCLTLS_SSL_CFLAGS="`"${PKG_CONFIG}" openssl --cflags-only-other $pkgConfigExtraArgs`" || as_fn_error $? "Unable to get OpenSSL Configuration" "$LINENO" 5 + fi + if test -z "$TCLTLS_SSL_INCLUDES"; then + TCLTLS_SSL_INCLUDES="`"${PKG_CONFIG}" openssl --cflags-only-I $pkgConfigExtraArgs`" || as_fn_error $? "Unable to get OpenSSL Configuration" "$LINENO" 5 + fi + PKG_CONFIG_PATH="${PKG_CONFIG_PATH_SAVE}" + fi #-------------------------------------------------------------------- # Shared libraries and static libraries have different names. # Also, windows libraries and unix libraries have different names.