ADDED   .fossil-settings/crlf-glob
Index: .fossil-settings/crlf-glob
==================================================================
--- /dev/null
+++ .fossil-settings/crlf-glob
@@ -0,0 +1,1 @@
+win/*.vc

Index: .fossil-settings/ignore-glob
==================================================================
--- .fossil-settings/ignore-glob
+++ .fossil-settings/ignore-glob
@@ -15,14 +15,15 @@
 config.log
 config.status
 configure
 manifest.uuid
 pkgIndex.tcl
-tls.tcl.h
-tls.tcl.h.new.1
-tls.tcl.h.new.2
-tlsUuid.h
-win/versions.vc
+*Uuid.h
+win/Debug*
 win/Release*
-win/Debug*
+win/version*.vc
+win/nmakehlp.exe
+win/nmakehlp.obj
+win/nmakehlp.out
+win/_junk.pch
 win/nmhlp-out.txt
 *~

Index: ChangeLog
==================================================================
--- ChangeLog
+++ ChangeLog
@@ -1,5 +1,12 @@
+TclTLS 1.7.22
+==========
+
+Release Date: Mon Oct 12 15:40:16 CDT 2020
+
+https://tcltls.rkeene.org/
+
 2015-05-01  Andreas Kupries  <andreask@activestate.com>
 
 	* configure.in: Bump to version 1.6.5.
 	* win/makefile.vc:
 	* configure: regen with ac-2.59

Index: Makefile.in
==================================================================
--- Makefile.in
+++ Makefile.in
@@ -158,11 +158,11 @@
 # compiled with.
 #DEFS		= $(TCL_DEFS) @DEFS@ $(PKG_CFLAGS)
 DEFS		= @DEFS@ $(PKG_CFLAGS)
 
 # Move pkgIndex.tcl to 'BINARIES' var if it is generated in the Makefile
-CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl generic/tls.tcl.h tlsUuid.h
+CONFIG_CLEAN_FILES = Makefile
 CLEANFILES	= @CLEANFILES@
 
 CPPFLAGS	= @CPPFLAGS@
 LIBS		= @PKG_LIBS@ @LIBS@
 AR		= @AR@
@@ -214,11 +214,11 @@
 	@echo "If you have documentation to create, place the commands to"
 	@echo "build the docs in the 'doc:' target.  For example:"
 	@echo "        xml2nroff sample.xml > sample.n"
 	@echo "        xml2html sample.xml > sample.html"
 
-install: all install-binaries install-libraries install-doc
+install: all install-binaries install-libraries install-doc-n install-doc-html
 
 install-binaries: binaries install-lib-binaries install-bin-binaries
 
 #========================================================================
 # This rule installs platform-independent files, such as header files.
@@ -229,23 +229,34 @@
 	@$(INSTALL_DATA_DIR) "$(DESTDIR)$(includedir)"
 	@echo "Installing header files in $(DESTDIR)$(includedir)"
 	@list='$(PKG_HEADERS)'; for i in $$list; do \
 	    echo "Installing $(srcdir)/$$i" ; \
 	    $(INSTALL_DATA) $(srcdir)/$$i "$(DESTDIR)$(includedir)" ; \
-	done;
+	done
 
 #========================================================================
 # Install documentation.  Unix manpages should go in the $(mandir)
 # directory.
 #========================================================================
+ 
+install-doc-html: doc
+	@$(INSTALL_DATA_DIR) "$(DESTDIR)$(pkglibdir)/html"
+	@list='$(srcdir)/doc/*.html'; for i in $$list; do \
+	    if test -f $$i ; then \
+		echo "Installing $$i"; \
+		$(INSTALL_DATA) $$i "$(DESTDIR)$(pkglibdir)/html"; \
+	    fi; \
+	done
 
-install-doc: doc
+install-doc-n: doc
 	@$(INSTALL_DATA_DIR) "$(DESTDIR)$(mandir)/mann"
 	@echo "Installing documentation in $(DESTDIR)$(mandir)"
 	@list='$(srcdir)/doc/*.n'; for i in $$list; do \
-	    echo "Installing $$i"; \
-	    $(INSTALL_DATA) $$i "$(DESTDIR)$(mandir)/mann" ; \
+	    if test -f $$i ; then \
+		echo "Installing $$i"; \
+		$(INSTALL_DATA) $$i "$(DESTDIR)$(mandir)/mann" ; \
+	    fi; \
 	done
 
 test: binaries libraries
 	$(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS) \
 	    -load "package ifneeded $(PACKAGE_NAME) $(PACKAGE_VERSION) \
@@ -308,24 +319,19 @@
 # As necessary, add $(srcdir):$(srcdir)/compat:....
 #========================================================================
 
 VPATH = $(srcdir):$(srcdir)/generic:$(srcdir)/unix:$(srcdir)/win:$(srcdir)/macosx
 
-.c.@OBJEXT@:
-	$(COMPILE) -c `@CYGPATH@ $<` -o $@
-
 # Create a C-source-ified version of the script resources
 # for TclTLS so that we only need a single file to enable
 # this extension
 tls.tcl.h: @srcdir@/library/tls.tcl Makefile
 	od -A n -v -t xC < '@srcdir@/library/tls.tcl' > tls.tcl.h.new.1
 	sed 's@[^0-9A-Fa-f]@@g;s@..@0x&, @g' < tls.tcl.h.new.1 > tls.tcl.h.new.2
 	rm -f tls.tcl.h.new.1
 	mv tls.tcl.h.new.2 @srcdir@/generic/tls.tcl.h
 
-tls.o:	tlsUuid.h
-
 $(srcdir)/manifest.uuid:
 	printf "git-" >$(srcdir)/manifest.uuid
 	(cd $(srcdir); git rev-parse HEAD >>$(srcdir)/manifest.uuid || \
 	    (printf "svn-r" >$(srcdir)/manifest.uuid ; \
 	    svn info --show-item last-changed-revision >>$(srcdir)/manifest.uuid) || \
@@ -334,10 +340,15 @@
 tlsUuid.h:	$(srcdir)/manifest.uuid
 	echo "#define TLS_VERSION_UUID \\" >$@
 	cat $(srcdir)/manifest.uuid >>$@
 	echo "" >>$@
 
+tls.@OBJEXT@:	tlsUuid.h tls.tcl.h
+
+.c.@OBJEXT@:
+	$(COMPILE) -c `@CYGPATH@ $<` -o $@
+
 #========================================================================
 # Create the pkgIndex.tcl file.
 # It is usually easiest to let Tcl do this for you with pkg_mkIndex, but
 # you may find that you need to customize the package.  If so, either
 # modify the -hand version, or create a pkgIndex.tcl.in file and have
@@ -361,13 +372,13 @@
 DIST_INSTALL_DATA	= CPPROG='cp -p' $(INSTALL) -m 644
 DIST_INSTALL_DATA_RECUR	= CPPROG='cp -p -R' $(INSTALL)
 DIST_INSTALL_SCRIPT	= CPPROG='cp -p' $(INSTALL) -m 755
 
 dist-clean:
-	rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.*
+	rm -rf $(DIST_DIR) $(top_builddir)/$(PKG_DIR).tar.*
 
-dist: dist-clean
+dist: dist-clean $(srcdir)/manifest.uuid
 	# TEA files
 	$(INSTALL_DATA_DIR) $(DIST_DIR)
 	$(DIST_INSTALL_DATA) $(srcdir)/Makefile.in \
 		$(srcdir)/acinclude.m4 $(srcdir)/aclocal.m4 \
 		$(srcdir)/configure.ac $(DIST_DIR)/
@@ -376,32 +387,21 @@
 	# Extension files
 	$(DIST_INSTALL_DATA) $(srcdir)/ChangeLog \
 		$(srcdir)/license.terms $(srcdir)/manifest.uuid \
 		$(srcdir)/README.txt $(srcdir)/pkgIndex.tcl.in $(DIST_DIR)/
 
-	# TEA files
-	$(INSTALL_DATA_DIR) $(DIST_DIR)/tclconfig
-	$(DIST_INSTALL_DATA) $(srcdir)/tclconfig/README.txt \
-		$(srcdir)/tclconfig/tcl.m4 $(srcdir)/tclconfig/install-sh \
-		$(srcdir)/tclconfig/license.terms $(DIST_DIR)/tclconfig/
-
-	$(INSTALL_DATA_DIR) $(DIST_DIR)/win
-	$(DIST_INSTALL_DATA) \
-		$(srcdir)/win/README.txt $(srcdir)/win/*.vc \
-		$(srcdir)/win/nmakehlp.c $(srcdir)/win/*.in $(DIST_DIR)/win/
-
-	list='build demos doc generic library macosx tests unix'; \
+	list='build demos doc generic library tclconfig tests win'; \
 	for p in $$list; do \
 	    if test -d $(srcdir)/$$p ; then \
 		$(INSTALL_DATA_DIR) $(DIST_DIR)/$$p; \
 		$(DIST_INSTALL_DATA_RECUR) $(srcdir)/$$p/* $(DIST_DIR)/$$p/; \
 	    fi; \
 	done
 
 	(cd $(DIST_ROOT); $(COMPRESS);)
-	cd $(top_builddir)
 	mv $(DIST_ROOT)/$(PKG_DIR).tar.gz $(top_builddir)
+	cd $(top_builddir)
 
 #========================================================================
 # End of user-definable section
 #========================================================================
 
@@ -416,11 +416,11 @@
 	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
 
 distclean: clean
 	-rm -f *.tab.c
 	-rm -f $(CONFIG_CLEAN_FILES)
-	-rm -f config.cache config.log config.status
+	-rm -f config.cache config.log config.status configure~
 	-rm -fR autom4te.cache
 
 #========================================================================
 # Install binary object libraries.  On Windows this includes both .dll and
 # .lib files.  Because the .lib files are not explicitly listed anywhere,
@@ -457,10 +457,13 @@
 	done
 	@if test "x$(SHARED_BUILD)" = "x1"; then \
 	    echo " Install pkgIndex.tcl $(DESTDIR)$(pkglibdir)"; \
 	    $(INSTALL_DATA) pkgIndex.tcl "$(DESTDIR)$(pkglibdir)"; \
 	fi
+	@if test -f "$(srcdir)/tlsConfig.sh"; then \
+	    $(INSTALL_DATA) $(srcdir)/tlsConfig.sh $(DESTDIR)$(libdir); \
+	fi
 
 #========================================================================
 # Install binary executables (e.g. .exe files and dependent .dll files)
 # This is for files that must go in the bin directory (located next to
 # wish and tclsh), like dependent .dll files on Windows.

Index: acinclude.m4
==================================================================
--- acinclude.m4
+++ acinclude.m4
@@ -7,42 +7,43 @@
 #
 # Add here whatever m4 macros you want to define for your package
 #
 
 AC_DEFUN([TCLTLS_SSL_OPENSSL], [
+	dnl Determine if pkg-config tool is available
 	AC_CHECK_TOOL([PKG_CONFIG], [pkg-config])
 
 	dnl Disable support for TLS 1.0 protocol
 	AC_ARG_ENABLE([tls1], AS_HELP_STRING([--disable-tls1], [disable TLS1 protocol]), [
-		if test "${enableval}" = "no"; then
+		if test "${enableval}" == "no"; then
 			AC_DEFINE([NO_TLS1], [1], [Disable TLS1 protocol])
 			AC_MSG_CHECKING([for disable TLS1 protocol])
 			AC_MSG_RESULT([yes])
 		fi
 	])
 
 	dnl Disable support for TLS 1.1 protocol
 	AC_ARG_ENABLE([tls1_1], AS_HELP_STRING([--disable-tls1_1], [disable TLS1.1 protocol]), [
-		if test "${enableval}" = "no"; then
+		if test "${enableval}" == "no"; then
 			AC_DEFINE([NO_TLS1_1], [1], [Disable TLS1.1 protocol])
 			AC_MSG_CHECKING([for disable TLS1.1 protocol])
 			AC_MSG_RESULT([yes])
 		fi
 	])
 
 	dnl Disable support for TLS 1.2 protocol
 	AC_ARG_ENABLE([tls1_2], AS_HELP_STRING([--disable-tls1_2], [disable TLS1.2 protocol]), [
-		if test "${enableval}" = "no"; then
+		if test "${enableval}" == "no"; then
 			AC_DEFINE([NO_TLS1_2], [1], [Disable TLS1.2 protocol])
 			AC_MSG_CHECKING([for disable TLS1.2 protocol])
 			AC_MSG_RESULT([yes])
 		fi
 	])
 
 	dnl Disable support for TLS 1.3 protocol
 	AC_ARG_ENABLE([tls1_3], AS_HELP_STRING([--disable-tls1_3], [disable TLS1.3 protocol]), [
-		if test "${enableval}" = "no"; then
+		if test "${enableval}" == "no"; then
 			AC_DEFINE([NO_TLS1_3], [1], [Disable TLS1.3 protocol])
 			AC_MSG_CHECKING([for disable TLS1.3 protocol])
 			AC_MSG_RESULT([yes])
 		fi
 	])
@@ -53,11 +54,11 @@
 		[enable using the underlying file descriptor for talking directly to the SSL library]), [
 		tcltls_ssl_fastpath="$enableval"
 	], [
 		tcltls_ssl_fastpath='no'
 	])
-	if test "$tcltls_ssl_fastpath" = 'yes'; then
+	if test "$tcltls_ssl_fastpath" == 'yes'; then
 		AC_DEFINE(TCLTLS_SSL_USE_FASTPATH, [1], [Enable SSL library direct use of the underlying file descriptor])
 	fi
 	AC_MSG_CHECKING([for fast path])
 	AC_MSG_RESULT([$tcltls_ssl_fastpath])
 
@@ -66,12 +67,12 @@
 	AC_ARG_ENABLE([hardening], AS_HELP_STRING([--enable-hardening], [enable hardening attempts]), [
 		tcltls_enable_hardening="$enableval"
 	], [
 		tcltls_enable_hardening='yes'
 	])
-	if test "$tcltls_enable_hardening" = 'yes'; then
-		if test "$GCC" = 'yes' -o "$CC" = 'clang'; then
+	if test "$tcltls_enable_hardening" == 'yes'; then
+		if test "$GCC" == 'yes' -o "$CC" = 'clang'; then
 			TEA_ADD_CFLAGS([-fstack-protector-all])
 			TEA_ADD_CFLAGS([-fno-strict-overflow])
 			AC_DEFINE([_FORTIFY_SOURCE], [2], [Enable fortification])
 		fi
 	fi
@@ -107,29 +108,28 @@
 		AS_HELP_STRING([--with-openssl-includedir=<dir>],
 			[path to include directory of OpenSSL or LibreSSL installation]
 		), [
 			opensslincludedir="$withval"
 		], [
-			if test ! -z "$openssldir"; then
+			if test -n "$openssldir"; then
 				opensslincludedir="${openssldir}/include"
 			else
 				opensslincludedir=''
 			fi
 		]
 	)
 	AC_MSG_CHECKING([for OpenSSL include directory])
 	AC_MSG_RESULT($opensslincludedir)
 
-	dnl Set SSL include vars
-	if test ! -z "$opensslincludedir"; then
+	dnl Set SSL include variables
+	if test -n "$opensslincludedir"; then
+		AC_MSG_CHECKING([for ssl.h])
 		if test -f "$opensslincludedir/openssl/ssl.h"; then
 			TCLTLS_SSL_CFLAGS="-I$opensslincludedir"
 			TCLTLS_SSL_INCLUDES="-I$opensslincludedir"
-			AC_MSG_CHECKING([for ssl.h])
 			AC_MSG_RESULT([yes])
 		else
-			AC_MSG_CHECKING([for ssl.h])
 			AC_MSG_RESULT([no])
 			AC_MSG_ERROR([Unable to locate ssl.h])
 		fi
 	fi
 
@@ -138,12 +138,12 @@
 		AS_HELP_STRING([--with-openssl-libdir=<dir>],
 			[path to lib directory of OpenSSL or LibreSSL installation]
 		), [
 			openssllibdir="$withval"
 		], [
-			if test ! -z "$openssldir"; then
-				if test "$do64bit" == 'yes'; then
+			if test -n "$openssldir"; then
+				if test "$do64bit" == 'yes' -a -d $openssldir/lib64; then
 					openssllibdir="$openssldir/lib64"
 				else
 					openssllibdir="$openssldir/lib"
 				fi
 			else
@@ -152,23 +152,23 @@
 		]
 	)
 	AC_MSG_CHECKING([for OpenSSL lib directory])
 	AC_MSG_RESULT($openssllibdir)
 
-	dnl Set SSL lib vars
-	if test ! -z "$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"
-				# HPUX
-				# -Wl,-a,archive ... -Wl,-a,shared_archive
-			fi
+	dnl Set SSL lib variables
+	SSL_LIBS_PATH=''
+	if test -n "$openssllibdir"; then
+		if test "${TCLEXT_TLS_STATIC_SSL}" == 'no'; then
+			LIBEXT=${SHLIB_SUFFIX}
+		else
+			LIBEXT='.a'
+		fi
+
+		if test -f "$openssllibdir/libssl${LIBEXT}"; then
+			SSL_LIBS_PATH="-L$openssllibdir"
 		else
-			AC_MSG_ERROR([Unable to locate libssl${SHLIB_SUFFIX}])
+			AC_MSG_ERROR([Unable to locate libssl${LIBEXT}])
 		fi
 	fi
 
 	dnl Set location of pkgconfig files
 	AC_ARG_WITH([openssl-pkgconfig],
@@ -185,19 +185,15 @@
 		]
 	)
 	AC_MSG_CHECKING([for OpenSSL pkgconfig])
 	AC_MSG_RESULT($opensslpkgconfigdir)
 
-
-	# Use Package Config tool to get config
-	pkgConfigExtraArgs=''
-	if test "${SHARED_BUILD}" == 0 -o "$TCLEXT_TLS_STATIC_SSL" = 'yes'; then
-		pkgConfigExtraArgs='--static'
-	fi
-
-	dnl Use pkg-config to find the libraries
-	if test -n "${PKG_CONFIG}"; then
+	dnl Check if OpenSSL is available
+	USE_PKG_CONFIG=`"${PKG_CONFIG}" --list-package-names | grep openssl`
+
+	dnl Use pkg-config to find the library names
+	if test -n "${PKG_CONFIG}" -a -n "${USE_PKG_CONFIG}"; then
 		dnl Temporarily update PKG_CONFIG_PATH
 		PKG_CONFIG_PATH_SAVE="${PKG_CONFIG_PATH}"
 		if test -n "${opensslpkgconfigdir}"; then
 			if ! test -f "${opensslpkgconfigdir}/openssl.pc"; then
 				AC_MSG_ERROR([Unable to locate ${opensslpkgconfigdir}/openssl.pc])
@@ -204,12 +200,21 @@
 			fi
 
 			PKG_CONFIG_PATH="${opensslpkgconfigdir}:${PKG_CONFIG_PATH}"
 			export PKG_CONFIG_PATH
 		fi
+
+		pkgConfigExtraArgs=''
+		if test "${SHARED_BUILD}" == "0" -o "$TCLEXT_TLS_STATIC_SSL" == 'yes'; then
+			pkgConfigExtraArgs='--static'
+		fi
+
 		if test -z "$TCLTLS_SSL_LIBS"; then
-			TCLTLS_SSL_LIBS="`"${PKG_CONFIG}" openssl --libs $pkgConfigExtraArgs`" || AC_MSG_ERROR([Unable to get OpenSSL Configuration])
+			TCLTLS_SSL_LIBS="$SSL_LIBS_PATH `${PKG_CONFIG} openssl --libs $pkgConfigExtraArgs`" || AC_MSG_ERROR([Unable to get OpenSSL Configuration])
+			if test "${TCLEXT_TLS_STATIC_SSL}" == 'yes'; then
+				TCLTLS_SSL_LIBS="-Wl,-Bstatic $TCLTLS_SSL_LIBS -Wl,-Bdynamic"
+			fi
 		fi
 		if test -z "$TCLTLS_SSL_CFLAGS"; then
 			TCLTLS_SSL_CFLAGS="`"${PKG_CONFIG}" openssl --cflags-only-other $pkgConfigExtraArgs`" || AC_MSG_ERROR([Unable to get OpenSSL Configuration])
 		fi
 		if test -z "$TCLTLS_SSL_INCLUDES"; then
@@ -216,24 +221,29 @@
 			TCLTLS_SSL_INCLUDES="`"${PKG_CONFIG}" openssl --cflags-only-I $pkgConfigExtraArgs`" || AC_MSG_ERROR([Unable to get OpenSSL Configuration])
 		fi
 		PKG_CONFIG_PATH="${PKG_CONFIG_PATH_SAVE}"
 	fi
 
-
-	dnl Fallback settings for OpenSSL includes and libs
-	if test -z "$TCLTLS_SSL_LIBS"; then
-		TCLTLS_SSL_LIBS="-lcrypto -lssl"
-	fi
+	dnl Use fall-back settings for OpenSSL include and library paths
 	if test -z "$TCLTLS_SSL_CFLAGS"; then
 		TCLTLS_SSL_CFLAGS=""
 	fi
 	if test -z "$TCLTLS_SSL_INCLUDES"; then
 		if test -f /usr/include/openssl/ssl.h; then
 			TCLTLS_SSL_INCLUDES="-I/usr/include"
 		fi
+	fi
+	if test -z "$TCLTLS_SSL_LIBS"; then
+		if test "${TCLEXT_TLS_STATIC_SSL}" == 'no'; then
+		    TCLTLS_SSL_LIBS="$SSL_LIBS_PATH -lssl -lcrypto"
+		else
+		    # Linux and Solaris
+		    TCLTLS_SSL_LIBS="$SSL_LIBS_PATH -Wl,-Bstatic -lssl -lcrypto -Wl,-Bdynamic"
+		    # HPUX: -Wl,-a,archive ... -Wl,-a,shared_archive
+		fi
 	fi
 
 	dnl Include config variables in --help list and make available to be substituted via AC_SUBST.
 	AC_ARG_VAR([TCLTLS_SSL_CFLAGS], [C compiler flags for OpenSSL or LibreSSL])
 	AC_ARG_VAR([TCLTLS_SSL_INCLUDES], [C compiler include paths for OpenSSL or LibreSSL])
 	AC_ARG_VAR([TCLTLS_SSL_LIBS], [libraries to pass to the linker for OpenSSL or LibreSSL])
 ])

Index: configure
==================================================================
--- configure
+++ configure
@@ -1,11 +1,11 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for tls 1.8.0.
+# Generated by GNU Autoconf 2.72 for tls 1.8.0.
 #
 #
-# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
+# Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation,
 # Inc.
 #
 #
 # This configure script is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
@@ -13,25 +13,25 @@
 ## M4sh Initialization. ##
 ## -------------------- ##
 
 # Be more Bourne compatible
 DUALCASE=1; export DUALCASE # for MKS sh
-as_nop=:
 if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
 then :
   emulate sh
   NULLCMD=:
   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
   # is contrary to our usage.  Disable this feature.
   alias -g '${1+"$@"}'='"$@"'
   setopt NO_GLOB_SUBST
-else $as_nop
-  case `(set -o) 2>/dev/null` in #(
+else case e in #(
+  e) case `(set -o) 2>/dev/null` in #(
   *posix*) :
     set -o posix ;; #(
   *) :
      ;;
+esac ;;
 esac
 fi
 
 
 
@@ -99,11 +99,11 @@
   done
 IFS=$as_save_IFS
 
      ;;
 esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
+# We did not find ourselves, most probably we were run as 'sh COMMAND'
 # in which case we are not to be found in the path.
 if test "x$as_myself" = x; then
   as_myself=$0
 fi
 if test ! -f "$as_myself"; then
@@ -129,32 +129,32 @@
   *x* ) as_opts=-x ;;
   * ) as_opts= ;;
 esac
 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
 # Admittedly, this is quite paranoid, since all the known shells bail
-# out after a failed `exec'.
+# out after a failed 'exec'.
 printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
 exit 255
   fi
   # We don't want this to propagate to other subprocesses.
           { _as_can_reexec=; unset _as_can_reexec;}
 if test "x$CONFIG_SHELL" = x; then
-  as_bourne_compatible="as_nop=:
-if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+  as_bourne_compatible="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
 then :
   emulate sh
   NULLCMD=:
   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
   # is contrary to our usage.  Disable this feature.
   alias -g '\${1+\"\$@\"}'='\"\$@\"'
   setopt NO_GLOB_SUBST
-else \$as_nop
-  case \`(set -o) 2>/dev/null\` in #(
+else case e in #(
+  e) case \`(set -o) 2>/dev/null\` in #(
   *posix*) :
     set -o posix ;; #(
   *) :
      ;;
+esac ;;
 esac
 fi
 "
   as_required="as_fn_return () { (exit \$1); }
 as_fn_success () { as_fn_return 0; }
@@ -168,12 +168,13 @@
 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
 if ( set x; as_fn_ret_success y && test x = \"\$1\" )
 then :
 
-else \$as_nop
-  exitcode=1; echo positional parameters were not saved.
+else case e in #(
+  e) exitcode=1; echo positional parameters were not saved. ;;
+esac
 fi
 test x\$exitcode = x0 || exit 1
 blah=\$(echo \$(echo blah))
 test x\"\$blah\" = xblah || exit 1
 test -x / || exit 1"
@@ -183,18 +184,19 @@
   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
 test \$(( 1 + 1 )) = 2 || exit 1"
   if (eval "$as_required") 2>/dev/null
 then :
   as_have_required=yes
-else $as_nop
-  as_have_required=no
+else case e in #(
+  e) as_have_required=no ;;
+esac
 fi
   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
 then :
 
-else $as_nop
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+else case e in #(
+  e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 as_found=false
 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 do
   IFS=$as_save_IFS
   case $as_dir in #(((
@@ -223,16 +225,17 @@
 done
 IFS=$as_save_IFS
 if $as_found
 then :
 
-else $as_nop
-  if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+else case e in #(
+  e) if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
 	      as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
 then :
   CONFIG_SHELL=$SHELL as_have_required=yes
-fi
+fi ;;
+esac
 fi
 
 
       if test "x$CONFIG_SHELL" != x
 then :
@@ -250,11 +253,11 @@
   *x* ) as_opts=-x ;;
   * ) as_opts= ;;
 esac
 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
 # Admittedly, this is quite paranoid, since all the known shells bail
-# out after a failed `exec'.
+# out after a failed 'exec'.
 printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
 exit 255
 fi
 
     if test x$as_have_required = xno
@@ -269,11 +272,12 @@
 $0: including any error possibly output before this
 $0: message. Then install a modern shell, or manually run
 $0: the script under such a shell if you do have one."
   fi
   exit 1
-fi
+fi ;;
+esac
 fi
 fi
 SHELL=${CONFIG_SHELL-/bin/sh}
 export SHELL
 # Unset more variables known to interfere with behavior of common tools.
@@ -308,18 +312,10 @@
 {
   set +e
   as_fn_set_status $1
   exit $1
 } # as_fn_exit
-# as_fn_nop
-# ---------
-# Do nothing but, unlike ":", preserve the value of $?.
-as_fn_nop ()
-{
-  return $?
-}
-as_nop=as_fn_nop
 
 # as_fn_mkdir_p
 # -------------
 # Create "$as_dir" as a directory, including parents if necessary.
 as_fn_mkdir_p ()
@@ -384,15 +380,16 @@
 then :
   eval 'as_fn_append ()
   {
     eval $1+=\$2
   }'
-else $as_nop
-  as_fn_append ()
+else case e in #(
+  e) as_fn_append ()
   {
     eval $1=\$$1\$2
-  }
+  } ;;
+esac
 fi # as_fn_append
 
 # as_fn_arith ARG...
 # ------------------
 # Perform arithmetic evaluation on the ARGs, and store the result in the
@@ -402,25 +399,18 @@
 then :
   eval 'as_fn_arith ()
   {
     as_val=$(( $* ))
   }'
-else $as_nop
-  as_fn_arith ()
+else case e in #(
+  e) as_fn_arith ()
   {
     as_val=`expr "$@" || test $? -eq 1`
-  }
+  } ;;
+esac
 fi # as_fn_arith
 
-# as_fn_nop
-# ---------
-# Do nothing but, unlike ":", preserve the value of $?.
-as_fn_nop ()
-{
-  return $?
-}
-as_nop=as_fn_nop
 
 # as_fn_error STATUS ERROR [LINENO LOG_FD]
 # ----------------------------------------
 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
@@ -490,10 +480,12 @@
   sed -n '
     p
     /[$]LINENO/=
   ' <$as_myself |
     sed '
+      t clear
+      :clear
       s/[$]LINENO.*/&-/
       t lineno
       b
       :lineno
       N
@@ -538,11 +530,10 @@
 # the shell variables $as_echo and $as_echo_n.  New code should use
 # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
 as_echo='printf %s\n'
 as_echo_n='printf %s'
 
-
 rm -f conf$$ conf$$.exe conf$$.file
 if test -d conf$$.dir; then
   rm -f conf$$.dir/conf$$.file
 else
   rm -f conf$$.dir
@@ -550,13 +541,13 @@
 fi
 if (echo >conf$$.file) 2>/dev/null; then
   if ln -s conf$$.file conf$$ 2>/dev/null; then
     as_ln_s='ln -s'
     # ... but there are two gotchas:
-    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
-    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -pR'.
+    # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable.
+    # In both cases, we have to default to 'cp -pR'.
     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
       as_ln_s='cp -pR'
   elif ln conf$$.file conf$$ 2>/dev/null; then
     as_ln_s=ln
   else
@@ -577,14 +568,16 @@
 
 as_test_x='test -x'
 as_executable_p=as_fn_executable_p
 
 # Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated
 
 # Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+as_tr_sh="eval sed '$as_sed_sh'" # deprecated
 
 
 test -n "$DJDIR" || exec 7<&0 </dev/null
 exec 6>&1
 
@@ -657,12 +650,10 @@
 PKG_STUB_LIB_FILE
 MAKE_STUB_LIB
 MAKE_STATIC_LIB
 MAKE_SHARED_LIB
 MAKE_LIB
-EGREP
-GREP
 LDFLAGS_DEFAULT
 CFLAGS_DEFAULT
 LD_LIBRARY_PATH_VAR
 SHLIB_CFLAGS
 SHLIB_LD_LIBS
@@ -907,11 +898,11 @@
 
   -disable-* | --disable-*)
     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid feature name: \`$ac_useropt'"
+      as_fn_error $? "invalid feature name: '$ac_useropt'"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
       *"
 "enable_$ac_useropt"
@@ -933,11 +924,11 @@
 
   -enable-* | --enable-*)
     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid feature name: \`$ac_useropt'"
+      as_fn_error $? "invalid feature name: '$ac_useropt'"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
       *"
 "enable_$ac_useropt"
@@ -1146,11 +1137,11 @@
 
   -with-* | --with-*)
     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid package name: \`$ac_useropt'"
+      as_fn_error $? "invalid package name: '$ac_useropt'"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
       *"
 "with_$ac_useropt"
@@ -1162,11 +1153,11 @@
 
   -without-* | --without-*)
     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid package name: \`$ac_useropt'"
+      as_fn_error $? "invalid package name: '$ac_useropt'"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
       *"
 "with_$ac_useropt"
@@ -1192,20 +1183,20 @@
     ac_prev=x_libraries ;;
   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
     x_libraries=$ac_optarg ;;
 
-  -*) as_fn_error $? "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information"
+  -*) as_fn_error $? "unrecognized option: '$ac_option'
+Try '$0 --help' for more information"
     ;;
 
   *=*)
     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
     # Reject names that are not valid shell variable names.
     case $ac_envvar in #(
       '' | [0-9]* | *[!_$as_cr_alnum]* )
-      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+      as_fn_error $? "invalid variable name: '$ac_envvar'" ;;
     esac
     eval $ac_envvar=\$ac_optarg
     export $ac_envvar ;;
 
   *)
@@ -1251,11 +1242,11 @@
     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
   esac
   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
 done
 
-# There might be people who depend on the old broken behavior: `$host'
+# There might be people who depend on the old broken behavior: '$host'
 # used to hold the argument of --host etc.
 # FIXME: To remove some day.
 build=$build_alias
 host=$host_alias
 target=$target_alias
@@ -1319,11 +1310,11 @@
 fi
 if test ! -r "$srcdir/$ac_unique_file"; then
   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
 fi
-ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_msg="sources are in $srcdir, but 'cd $srcdir' does not work"
 ac_abs_confdir=`(
 	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
 	pwd)`
 # When building in place, set srcdir=.
 if test "$ac_abs_confdir" = "$ac_pwd"; then
@@ -1347,11 +1338,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.8.0 to adapt to many kinds of systems.
+'configure' configures tls 1.8.0 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.
@@ -1361,26 +1352,26 @@
 Configuration:
   -h, --help              display this help and exit
       --help=short        display options specific to this package
       --help=recursive    display the short help of all the included packages
   -V, --version           display version information and exit
-  -q, --quiet, --silent   do not print \`checking ...' messages
+  -q, --quiet, --silent   do not print 'checking ...' messages
       --cache-file=FILE   cache test results in FILE [disabled]
-  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -C, --config-cache      alias for '--cache-file=config.cache'
   -n, --no-create         do not create output files
-      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+      --srcdir=DIR        find the sources in DIR [configure dir or '..']
 
 Installation directories:
   --prefix=PREFIX         install architecture-independent files in PREFIX
                           [$ac_default_prefix]
   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                           [PREFIX]
 
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
+By default, 'make install' will install all the files in
+'$ac_default_prefix/bin', '$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than '$ac_default_prefix' using '--prefix',
+for instance '--prefix=\$HOME'.
 
 For better control, use the options below.
 
 Fine tuning of the installation directories:
   --bindir=DIR            user executables [EPREFIX/bin]
@@ -1470,11 +1461,11 @@
   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
+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.
 _ACEOF
 ac_status=$?
@@ -1538,13 +1529,13 @@
 
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
 tls configure 1.8.0
-generated by GNU Autoconf 2.71
+generated by GNU Autoconf 2.72
 
-Copyright (C) 2021 Free Software Foundation, Inc.
+Copyright (C) 2023 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 _ACEOF
   exit
 fi
@@ -1579,15 +1570,16 @@
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
        } && test -s conftest.$ac_objext
 then :
   ac_retval=0
-else $as_nop
-  printf "%s\n" "$as_me: failed program was:" >&5
+else case e in #(
+  e) printf "%s\n" "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_retval=1
+	ac_retval=1 ;;
+esac
 fi
   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_compile
@@ -1617,97 +1609,22 @@
 	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
 	 test ! -s conftest.err
        }
 then :
   ac_retval=0
-else $as_nop
-  printf "%s\n" "$as_me: failed program was:" >&5
+else case e in #(
+  e) printf "%s\n" "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-    ac_retval=1
+    ac_retval=1 ;;
+esac
 fi
   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_cpp
 
-# ac_fn_c_try_run LINENO
-# ----------------------
-# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
-# executables *can* be run.
-ac_fn_c_try_run ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if { { ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-printf "%s\n" "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
-  { { case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-printf "%s\n" "$ac_try_echo"; } >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }
-then :
-  ac_retval=0
-else $as_nop
-  printf "%s\n" "$as_me: program exited with status $ac_status" >&5
-       printf "%s\n" "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_retval=$ac_status
-fi
-  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-  as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_run
-
-# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists and can be compiled using the include files in
-# INCLUDES, setting the cache variable VAR accordingly.
-ac_fn_c_check_header_compile ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-printf %s "checking for $2... " >&6; }
-if eval test \${$3+y}
-then :
-  printf %s "(cached) " >&6
-else $as_nop
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  eval "$3=yes"
-else $as_nop
-  eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-eval ac_res=\$$3
-	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-printf "%s\n" "$ac_res" >&6; }
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_header_compile
-
 # ac_fn_c_try_link LINENO
 # -----------------------
 # Try to link conftest.$ac_ext, and return whether this succeeded.
 ac_fn_c_try_link ()
 {
@@ -1735,15 +1652,16 @@
 	 test "$cross_compiling" = yes ||
 	 test -x conftest$ac_exeext
        }
 then :
   ac_retval=0
-else $as_nop
-  printf "%s\n" "$as_me: failed program was:" >&5
+else case e in #(
+  e) printf "%s\n" "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_retval=1
+	ac_retval=1 ;;
+esac
 fi
   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
   # interfere with the next link command; also delete a directory that is
   # left behind by Apple's compiler.  We do this before executing the actions.
@@ -1751,10 +1669,89 @@
   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_link
 
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
+# executables *can* be run.
+ac_fn_c_try_run ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }
+then :
+  ac_retval=0
+else case e in #(
+  e) printf "%s\n" "$as_me: program exited with status $ac_status" >&5
+       printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=$ac_status ;;
+esac
+fi
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  eval "$3=yes"
+else case e in #(
+  e) eval "$3=no" ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
+fi
+eval ac_res=\$$3
+	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_compile
+
 # ac_fn_c_check_func LINENO FUNC VAR
 # ----------------------------------
 # Tests whether FUNC exists, setting the cache variable VAR accordingly
 ac_fn_c_check_func ()
 {
@@ -1762,19 +1759,19 @@
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 printf %s "checking for $2... " >&6; }
 if eval test \${$3+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 #define $2 innocuous_$2
 
 /* System header to define __stub macros and hopefully few prototypes,
-   which can conflict with char $2 (); below.  */
+   which can conflict with char $2 (void); below.  */
 
 #include <limits.h>
 #undef $2
 
 /* Override any GCC internal prototype to avoid an error.
@@ -1781,11 +1778,11 @@
    Use char because int might match the return type of a GCC
    builtin and then its argument prototype would still apply.  */
 #ifdef __cplusplus
 extern "C"
 #endif
-char $2 ();
+char $2 (void);
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
 #if defined __stub_$2 || defined __stub___$2
 choke me
@@ -1800,15 +1797,17 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
   eval "$3=yes"
-else $as_nop
-  eval "$3=no"
+else case e in #(
+  e) eval "$3=no" ;;
+esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam \
-    conftest$ac_exeext conftest.$ac_ext
+    conftest$ac_exeext conftest.$ac_ext ;;
+esac
 fi
 eval ac_res=\$$3
 	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 printf "%s\n" "$ac_res" >&6; }
   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
@@ -1837,11 +1836,11 @@
 cat >config.log <<_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.8.0, which was
-generated by GNU Autoconf 2.71.  Invocation command line was
+generated by GNU Autoconf 2.72.  Invocation command line was
 
   $ $0$ac_configure_args_raw
 
 _ACEOF
 exec 5>>config.log
@@ -2083,14 +2082,14 @@
   if test -f "$ac_site_file" && test -r "$ac_site_file"; then
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
 printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
     sed 's/^/| /' "$ac_site_file" >&5
     . "$ac_site_file" \
-      || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+      || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
 as_fn_error $? "failed to load site script $ac_site_file
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; }
   fi
 done
 
 if test -r "$cache_file"; then
   # Some versions of bash will fail to source /dev/null (special files
@@ -2122,13 +2121,11 @@
 #include <stdarg.h>
 struct stat;
 /* Most of the following tests are stolen from RCS 5.7 src/conf.sh.  */
 struct buf { int x; };
 struct buf * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
-     char **p;
-     int i;
+static char *e (char **p, int i)
 {
   return p[i];
 }
 static char *f (char * (*g) (char **, int), char **p, ...)
 {
@@ -2138,10 +2135,25 @@
   s = g (p, va_arg (v,int));
   va_end (v);
   return s;
 }
 
+/* C89 style stringification. */
+#define noexpand_stringify(a) #a
+const char *stringified = noexpand_stringify(arbitrary+token=sequence);
+
+/* C89 style token pasting.  Exercises some of the corner cases that
+   e.g. old MSVC gets wrong, but not very hard. */
+#define noexpand_concat(a,b) a##b
+#define expand_concat(a,b) noexpand_concat(a,b)
+extern int vA;
+extern int vbee;
+#define aye A
+#define bee B
+int *pvA = &expand_concat(v,aye);
+int *pvbee = &noexpand_concat(v,bee);
+
 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
    function prototypes and stuff, but not \xHH hex character constants.
    These do not provoke an error unfortunately, instead are silently treated
    as an "x".  The following induces an error, until -std is added to get
    proper ANSI mode.  Curiously \x00 != x always comes out true, for an
@@ -2165,20 +2177,23 @@
 ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
 '
 
 # Test code for whether the C compiler supports C99 (global declarations)
 ac_c_conftest_c99_globals='
-// Does the compiler advertise C99 conformance?
+/* Does the compiler advertise C99 conformance? */
 #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
 # error "Compiler does not advertise C99 conformance"
 #endif
+
+// See if C++-style comments work.
 
 #include <stdbool.h>
 extern int puts (const char *);
 extern int printf (const char *, ...);
 extern int dprintf (int, const char *, ...);
 extern void *malloc (size_t);
+extern void free (void *);
 
 // Check varargs macros.  These examples are taken from C99 6.10.3.5.
 // dprintf is used instead of fprintf to avoid needing to declare
 // FILE and stderr.
 #define debug(...) dprintf (2, __VA_ARGS__)
@@ -2224,11 +2239,10 @@
 typedef const char *ccp;
 
 static inline int
 test_restrict (ccp restrict text)
 {
-  // See if C++-style comments work.
   // Iterate through items via the restricted pointer.
   // Also check for declarations in for loops.
   for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
     continue;
   return 0;
@@ -2290,10 +2304,12 @@
   struct incomplete_array *ia =
     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
   ia->datasize = 10;
   for (int i = 0; i < ia->datasize; ++i)
     ia->data[i] = i * 1.234;
+  // Work around memory leak warnings.
+  free (ia);
 
   // Check named initializers.
   struct named_init ni = {
     .number = 34,
     .name = L"Test wide string",
@@ -2311,11 +2327,11 @@
 	 || dynamic_array[ni.number - 1] != 543);
 '
 
 # Test code for whether the C compiler supports C11 (global declarations)
 ac_c_conftest_c11_globals='
-// Does the compiler advertise C11 conformance?
+/* Does the compiler advertise C11 conformance? */
 #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
 # error "Compiler does not advertise C11 conformance"
 #endif
 
 // Check _Alignas.
@@ -2434,36 +2450,36 @@
   eval ac_new_set=\$ac_env_${ac_var}_set
   eval ac_old_val=\$ac_cv_env_${ac_var}_value
   eval ac_new_val=\$ac_env_${ac_var}_value
   case $ac_old_set,$ac_new_set in
     set,)
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&5
+printf "%s\n" "$as_me: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&2;}
       ac_cache_corrupted=: ;;
     ,set)
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
-printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was not set in the previous run" >&5
+printf "%s\n" "$as_me: error: '$ac_var' was not set in the previous run" >&2;}
       ac_cache_corrupted=: ;;
     ,);;
     *)
       if test "x$ac_old_val" != "x$ac_new_val"; then
 	# differences in whitespace do not lead to failure.
 	ac_old_val_w=`echo x $ac_old_val`
 	ac_new_val_w=`echo x $ac_new_val`
 	if test "$ac_old_val_w" != "$ac_new_val_w"; then
-	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
-printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' has changed since the previous run:" >&5
+printf "%s\n" "$as_me: error: '$ac_var' has changed since the previous run:" >&2;}
 	  ac_cache_corrupted=:
 	else
-	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&5
+printf "%s\n" "$as_me: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&2;}
 	  eval $ac_var=\$ac_old_val
 	fi
-	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
-printf "%s\n" "$as_me:   former value:  \`$ac_old_val'" >&2;}
-	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
-printf "%s\n" "$as_me:   current value: \`$ac_new_val'" >&2;}
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   former value:  '$ac_old_val'" >&5
+printf "%s\n" "$as_me:   former value:  '$ac_old_val'" >&2;}
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   current value: '$ac_new_val'" >&5
+printf "%s\n" "$as_me:   current value: '$ac_new_val'" >&2;}
       fi;;
   esac
   # Pass precious variables to config.status.
   if test "$ac_new_set" = set; then
     case $ac_new_val in
@@ -2475,15 +2491,15 @@
       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
     esac
   fi
 done
 if $ac_cache_corrupted; then
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
-  as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
+  as_fn_error $? "run '${MAKE-make} distclean' and/or 'rm $cache_file'
 	    and start over" "$LINENO" 5
 fi
 ## -------------------- ##
 ## Main body of script. ##
 ## -------------------- ##
@@ -2527,12 +2543,12 @@
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_CYGPATH+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  if test -n "$CYGPATH"; then
+else case e in #(
+  e) if test -n "$CYGPATH"; then
   ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
@@ -2551,11 +2567,12 @@
 done
   done
 IFS=$as_save_IFS
 
   test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
-fi
+fi ;;
+esac
 fi
 CYGPATH=$ac_cv_prog_CYGPATH
 if test -n "$CYGPATH"; then
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
 printf "%s\n" "$CYGPATH" >&6; }
@@ -2630,12 +2647,12 @@
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking system version" >&5
 printf %s "checking system version... " >&6; }
 if test ${tcl_cv_sys_version+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+  e)
 	# TEA specific:
 	if test "${TEA_PLATFORM}" = "windows" ; then
 	    tcl_cv_sys_version=windows
 	else
 	    tcl_cv_sys_version=`uname -s`-`uname -r`
@@ -2650,11 +2667,12 @@
 		if test "`uname -s`" = "NetBSD" -a -f /etc/debian_version ; then
 		    tcl_cv_sys_version=NetBSD-Debian
 		fi
 	    fi
 	fi
-
+     ;;
+esac
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_sys_version" >&5
 printf "%s\n" "$tcl_cv_sys_version" >&6; }
     system=$tcl_cv_sys_version
 
@@ -2706,12 +2724,12 @@
 	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
 printf %s "checking for Tcl configuration... " >&6; }
 	if test ${ac_cv_c_tclconfig+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+  e)
 
 	    # First check to see if --with-tcl was specified.
 	    if test x"${with_tclconfig}" != x ; then
 		case "${with_tclconfig}" in
 		    */tclConfig.sh )
@@ -2824,11 +2842,12 @@
 			ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
 			break
 		    fi
 		done
 	    fi
-
+	 ;;
+esac
 fi
 
 
 	if test x"${ac_cv_c_tclconfig}" = x ; then
 	    TCL_BIN_DIR="# no Tcl configs found"
@@ -2861,12 +2880,12 @@
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_CC+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  if test -n "$CC"; then
+else case e in #(
+  e) if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
@@ -2884,11 +2903,12 @@
   fi
 done
   done
 IFS=$as_save_IFS
 
-fi
+fi ;;
+esac
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
 printf "%s\n" "$CC" >&6; }
@@ -2906,12 +2926,12 @@
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_ac_ct_CC+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  if test -n "$ac_ct_CC"; then
+else case e in #(
+  e) if test -n "$ac_ct_CC"; then
   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
@@ -2929,11 +2949,12 @@
   fi
 done
   done
 IFS=$as_save_IFS
 
-fi
+fi ;;
+esac
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
 printf "%s\n" "$ac_ct_CC" >&6; }
@@ -2964,12 +2985,12 @@
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_CC+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  if test -n "$CC"; then
+else case e in #(
+  e) if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
@@ -2987,11 +3008,12 @@
   fi
 done
   done
 IFS=$as_save_IFS
 
-fi
+fi ;;
+esac
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
 printf "%s\n" "$CC" >&6; }
@@ -3009,12 +3031,12 @@
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_CC+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  if test -n "$CC"; then
+else case e in #(
+  e) if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
   ac_prog_rejected=no
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -3049,11 +3071,12 @@
     # first if we set CC to just the basename; use the full file name.
     shift
     ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
   fi
 fi
-fi
+fi ;;
+esac
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
 printf "%s\n" "$CC" >&6; }
@@ -3073,12 +3096,12 @@
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_CC+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  if test -n "$CC"; then
+else case e in #(
+  e) if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
@@ -3096,11 +3119,12 @@
   fi
 done
   done
 IFS=$as_save_IFS
 
-fi
+fi ;;
+esac
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
 printf "%s\n" "$CC" >&6; }
@@ -3122,12 +3146,12 @@
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_ac_ct_CC+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  if test -n "$ac_ct_CC"; then
+else case e in #(
+  e) if test -n "$ac_ct_CC"; then
   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
@@ -3145,11 +3169,12 @@
   fi
 done
   done
 IFS=$as_save_IFS
 
-fi
+fi ;;
+esac
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
 printf "%s\n" "$ac_ct_CC" >&6; }
@@ -3183,12 +3208,12 @@
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_CC+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  if test -n "$CC"; then
+else case e in #(
+  e) if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
@@ -3206,11 +3231,12 @@
   fi
 done
   done
 IFS=$as_save_IFS
 
-fi
+fi ;;
+esac
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
 printf "%s\n" "$CC" >&6; }
@@ -3228,12 +3254,12 @@
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_ac_ct_CC+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  if test -n "$ac_ct_CC"; then
+else case e in #(
+  e) if test -n "$ac_ct_CC"; then
   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
@@ -3251,11 +3277,12 @@
   fi
 done
   done
 IFS=$as_save_IFS
 
-fi
+fi ;;
+esac
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
 printf "%s\n" "$ac_ct_CC" >&6; }
@@ -3280,14 +3307,14 @@
 fi
 
 fi
 
 
-test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
 as_fn_error $? "no acceptable C compiler found in \$PATH
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; }
 
 # Provide some information about the compiler.
 printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
 set X $ac_compile
 ac_compiler=$2
@@ -3355,12 +3382,12 @@
   (eval "$ac_link_default") 2>&5
   ac_status=$?
   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }
 then :
-  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
-# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+  # Autoconf-2.13 could set the ac_cv_exeext variable to 'no'.
+# So ignore a value of 'no', otherwise this would lead to 'EXEEXT = no'
 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
 # so that the user can short-circuit this test for compilers unknown to
 # Autoconf.
 for ac_file in $ac_files ''
 do
@@ -3376,11 +3403,11 @@
 	if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
 	then :; else
 	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
 	fi
 	# We set ac_cv_exeext here because the later test for it is not
-	# safe: cross compilers may not add the suffix if given an `-o'
+	# safe: cross compilers may not add the suffix if given an '-o'
 	# argument, so we may need to know it at that point already.
 	# Even if this section looks crufty: it has the advantage of
 	# actually working.
 	break;;
     * )
@@ -3387,27 +3414,29 @@
 	break;;
   esac
 done
 test "$ac_cv_exeext" = no && ac_cv_exeext=
 
-else $as_nop
-  ac_file=''
+else case e in #(
+  e) ac_file='' ;;
+esac
 fi
 if test -z "$ac_file"
 then :
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
 printf "%s\n" "no" >&6; }
 printf "%s\n" "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
 as_fn_error 77 "C compiler cannot create executables
-See \`config.log' for more details" "$LINENO" 5; }
-else $as_nop
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
+See 'config.log' for more details" "$LINENO" 5; }
+else case e in #(
+  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; } ;;
+esac
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
 printf %s "checking for C compiler default output file name... " >&6; }
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
 printf "%s\n" "$ac_file" >&6; }
@@ -3427,28 +3456,29 @@
   (eval "$ac_link") 2>&5
   ac_status=$?
   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }
 then :
-  # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
+  # If both 'conftest.exe' and 'conftest' are 'present' (well, observable)
+# catch 'conftest.exe'.  For instance with Cygwin, 'ls conftest' will
+# work properly (i.e., refer to 'conftest.exe'), while it won't with
+# 'rm'.
 for ac_file in conftest.exe conftest conftest.*; do
   test -f "$ac_file" || continue
   case $ac_file in
     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
 	  break;;
     * ) break;;
   esac
 done
-else $as_nop
-  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+else case e in #(
+  e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; } ;;
+esac
 fi
 rm -f conftest conftest$ac_cv_exeext
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
 printf "%s\n" "$ac_cv_exeext" >&6; }
 
@@ -3460,10 +3490,12 @@
 #include <stdio.h>
 int
 main (void)
 {
 FILE *f = fopen ("conftest.out", "w");
+ if (!f)
+  return 1;
  return ferror (f) || fclose (f) != 0;
 
   ;
   return 0;
 }
@@ -3499,30 +3531,31 @@
     cross_compiling=no
   else
     if test "$cross_compiling" = maybe; then
 	cross_compiling=yes
     else
-	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
 as_fn_error 77 "cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details" "$LINENO" 5; }
+If you meant to cross compile, use '--host'.
+See 'config.log' for more details" "$LINENO" 5; }
     fi
   fi
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
 printf "%s\n" "$cross_compiling" >&6; }
 
-rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+rm -f conftest.$ac_ext conftest$ac_cv_exeext \
+  conftest.o conftest.obj conftest.out
 ac_clean_files=$ac_clean_files_save
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
 printf %s "checking for suffix of object files... " >&6; }
 if test ${ac_cv_objext+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
 main (void)
 {
@@ -3550,20 +3583,22 @@
     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
        break;;
   esac
 done
-else $as_nop
-  printf "%s\n" "$as_me: failed program was:" >&5
+else case e in #(
+  e) printf "%s\n" "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
 as_fn_error $? "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; } ;;
+esac
 fi
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
+rm -f conftest.$ac_cv_objext conftest.$ac_ext ;;
+esac
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
 printf "%s\n" "$ac_cv_objext" >&6; }
 OBJEXT=$ac_cv_objext
 ac_objext=$OBJEXT
@@ -3570,12 +3605,12 @@
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
 printf %s "checking whether the compiler supports GNU C... " >&6; }
 if test ${ac_cv_c_compiler_gnu+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
 main (void)
 {
@@ -3588,16 +3623,18 @@
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   ac_compiler_gnu=yes
-else $as_nop
-  ac_compiler_gnu=no
+else case e in #(
+  e) ac_compiler_gnu=no ;;
+esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
+ ;;
+esac
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
@@ -3611,12 +3648,12 @@
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
 printf %s "checking whether $CC accepts -g... " >&6; }
 if test ${ac_cv_prog_cc_g+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  ac_save_c_werror_flag=$ac_c_werror_flag
+else case e in #(
+  e) ac_save_c_werror_flag=$ac_c_werror_flag
    ac_c_werror_flag=yes
    ac_cv_prog_cc_g=no
    CFLAGS="-g"
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -3630,12 +3667,12 @@
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   ac_cv_prog_cc_g=yes
-else $as_nop
-  CFLAGS=""
+else case e in #(
+  e) CFLAGS=""
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
 main (void)
@@ -3646,12 +3683,12 @@
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
 
-else $as_nop
-  ac_c_werror_flag=$ac_save_c_werror_flag
+else case e in #(
+  e) ac_c_werror_flag=$ac_save_c_werror_flag
 	 CFLAGS="-g"
 	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -3664,16 +3701,19 @@
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   ac_cv_prog_cc_g=yes
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-   ac_c_werror_flag=$ac_save_c_werror_flag
+   ac_c_werror_flag=$ac_save_c_werror_flag ;;
+esac
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
 printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
 if test $ac_test_CFLAGS; then
   CFLAGS=$ac_save_CFLAGS
@@ -3696,12 +3736,12 @@
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
 printf %s "checking for $CC option to enable C11 features... " >&6; }
 if test ${ac_cv_prog_cc_c11+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  ac_cv_prog_cc_c11=no
+else case e in #(
+  e) ac_cv_prog_cc_c11=no
 ac_save_CC=$CC
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 $ac_c_conftest_c11_program
 _ACEOF
@@ -3714,40 +3754,43 @@
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam
   test "x$ac_cv_prog_cc_c11" != "xno" && break
 done
 rm -f conftest.$ac_ext
-CC=$ac_save_CC
+CC=$ac_save_CC ;;
+esac
 fi
 
 if test "x$ac_cv_prog_cc_c11" = xno
 then :
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
 printf "%s\n" "unsupported" >&6; }
-else $as_nop
-  if test "x$ac_cv_prog_cc_c11" = x
+else case e in #(
+  e) if test "x$ac_cv_prog_cc_c11" = x
 then :
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
 printf "%s\n" "none needed" >&6; }
-else $as_nop
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
+else case e in #(
+  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
-     CC="$CC $ac_cv_prog_cc_c11"
+     CC="$CC $ac_cv_prog_cc_c11" ;;
+esac
 fi
   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
-  ac_prog_cc_stdc=c11
+  ac_prog_cc_stdc=c11 ;;
+esac
 fi
 fi
 if test x$ac_prog_cc_stdc = xno
 then :
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
 printf %s "checking for $CC option to enable C99 features... " >&6; }
 if test ${ac_cv_prog_cc_c99+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  ac_cv_prog_cc_c99=no
+else case e in #(
+  e) ac_cv_prog_cc_c99=no
 ac_save_CC=$CC
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 $ac_c_conftest_c99_program
 _ACEOF
@@ -3760,40 +3803,43 @@
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam
   test "x$ac_cv_prog_cc_c99" != "xno" && break
 done
 rm -f conftest.$ac_ext
-CC=$ac_save_CC
+CC=$ac_save_CC ;;
+esac
 fi
 
 if test "x$ac_cv_prog_cc_c99" = xno
 then :
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
 printf "%s\n" "unsupported" >&6; }
-else $as_nop
-  if test "x$ac_cv_prog_cc_c99" = x
+else case e in #(
+  e) if test "x$ac_cv_prog_cc_c99" = x
 then :
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
 printf "%s\n" "none needed" >&6; }
-else $as_nop
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+else case e in #(
+  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
-     CC="$CC $ac_cv_prog_cc_c99"
+     CC="$CC $ac_cv_prog_cc_c99" ;;
+esac
 fi
   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
-  ac_prog_cc_stdc=c99
+  ac_prog_cc_stdc=c99 ;;
+esac
 fi
 fi
 if test x$ac_prog_cc_stdc = xno
 then :
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
 printf %s "checking for $CC option to enable C89 features... " >&6; }
 if test ${ac_cv_prog_cc_c89+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  ac_cv_prog_cc_c89=no
+else case e in #(
+  e) ac_cv_prog_cc_c89=no
 ac_save_CC=$CC
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 $ac_c_conftest_c89_program
 _ACEOF
@@ -3806,29 +3852,32 @@
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam
   test "x$ac_cv_prog_cc_c89" != "xno" && break
 done
 rm -f conftest.$ac_ext
-CC=$ac_save_CC
+CC=$ac_save_CC ;;
+esac
 fi
 
 if test "x$ac_cv_prog_cc_c89" = xno
 then :
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
 printf "%s\n" "unsupported" >&6; }
-else $as_nop
-  if test "x$ac_cv_prog_cc_c89" = x
+else case e in #(
+  e) if test "x$ac_cv_prog_cc_c89" = x
 then :
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
 printf "%s\n" "none needed" >&6; }
-else $as_nop
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+else case e in #(
+  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
-     CC="$CC $ac_cv_prog_cc_c89"
+     CC="$CC $ac_cv_prog_cc_c89" ;;
+esac
 fi
   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
-  ac_prog_cc_stdc=c89
+  ac_prog_cc_stdc=c89 ;;
+esac
 fi
 fi
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -3919,22 +3968,22 @@
 
 	    # first test we've already retrieved platform (cross-compile), fallback to unix otherwise:
 	    TEA_PLATFORM="${TEA_PLATFORM-unix}"
 	    CYGPATH=echo
 
-else $as_nop
-
+else case e in #(
+  e)
 	    TEA_PLATFORM="windows"
 	    # Extract the first word of "cygpath", so it can be a program name with args.
 set dummy cygpath; ac_word=$2
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_CYGPATH+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  if test -n "$CYGPATH"; then
+else case e in #(
+  e) if test -n "$CYGPATH"; then
   ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
@@ -3953,11 +4002,12 @@
 done
   done
 IFS=$as_save_IFS
 
   test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
-fi
+fi ;;
+esac
 fi
 CYGPATH=$ac_cv_prog_CYGPATH
 if test -n "$CYGPATH"; then
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
 printf "%s\n" "$CYGPATH" >&6; }
@@ -3965,11 +4015,12 @@
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
 printf "%s\n" "no" >&6; }
 fi
 
 
-
+     ;;
+esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
     CC=$hold_cc
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $TEA_PLATFORM" >&5
 printf "%s\n" "$TEA_PLATFORM" >&6; }
@@ -4055,12 +4106,12 @@
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_CC+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  if test -n "$CC"; then
+else case e in #(
+  e) if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
@@ -4078,11 +4129,12 @@
   fi
 done
   done
 IFS=$as_save_IFS
 
-fi
+fi ;;
+esac
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
 printf "%s\n" "$CC" >&6; }
@@ -4100,12 +4152,12 @@
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_ac_ct_CC+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  if test -n "$ac_ct_CC"; then
+else case e in #(
+  e) if test -n "$ac_ct_CC"; then
   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
@@ -4123,11 +4175,12 @@
   fi
 done
   done
 IFS=$as_save_IFS
 
-fi
+fi ;;
+esac
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
 printf "%s\n" "$ac_ct_CC" >&6; }
@@ -4158,12 +4211,12 @@
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_CC+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  if test -n "$CC"; then
+else case e in #(
+  e) if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
@@ -4181,11 +4234,12 @@
   fi
 done
   done
 IFS=$as_save_IFS
 
-fi
+fi ;;
+esac
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
 printf "%s\n" "$CC" >&6; }
@@ -4203,12 +4257,12 @@
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_CC+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  if test -n "$CC"; then
+else case e in #(
+  e) if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
   ac_prog_rejected=no
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -4243,11 +4297,12 @@
     # first if we set CC to just the basename; use the full file name.
     shift
     ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
   fi
 fi
-fi
+fi ;;
+esac
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
 printf "%s\n" "$CC" >&6; }
@@ -4267,12 +4322,12 @@
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_CC+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  if test -n "$CC"; then
+else case e in #(
+  e) if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
@@ -4290,11 +4345,12 @@
   fi
 done
   done
 IFS=$as_save_IFS
 
-fi
+fi ;;
+esac
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
 printf "%s\n" "$CC" >&6; }
@@ -4316,12 +4372,12 @@
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_ac_ct_CC+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  if test -n "$ac_ct_CC"; then
+else case e in #(
+  e) if test -n "$ac_ct_CC"; then
   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
@@ -4339,11 +4395,12 @@
   fi
 done
   done
 IFS=$as_save_IFS
 
-fi
+fi ;;
+esac
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
 printf "%s\n" "$ac_ct_CC" >&6; }
@@ -4377,12 +4434,12 @@
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_CC+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  if test -n "$CC"; then
+else case e in #(
+  e) if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
@@ -4400,11 +4457,12 @@
   fi
 done
   done
 IFS=$as_save_IFS
 
-fi
+fi ;;
+esac
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
 printf "%s\n" "$CC" >&6; }
@@ -4422,12 +4480,12 @@
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_ac_ct_CC+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  if test -n "$ac_ct_CC"; then
+else case e in #(
+  e) if test -n "$ac_ct_CC"; then
   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
@@ -4445,11 +4503,12 @@
   fi
 done
   done
 IFS=$as_save_IFS
 
-fi
+fi ;;
+esac
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
 printf "%s\n" "$ac_ct_CC" >&6; }
@@ -4474,14 +4533,14 @@
 fi
 
 fi
 
 
-test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
 as_fn_error $? "no acceptable C compiler found in \$PATH
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; }
 
 # Provide some information about the compiler.
 printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
 set X $ac_compile
 ac_compiler=$2
@@ -4509,12 +4568,12 @@
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
 printf %s "checking whether the compiler supports GNU C... " >&6; }
 if test ${ac_cv_c_compiler_gnu+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
 main (void)
 {
@@ -4527,16 +4586,18 @@
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   ac_compiler_gnu=yes
-else $as_nop
-  ac_compiler_gnu=no
+else case e in #(
+  e) ac_compiler_gnu=no ;;
+esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
+ ;;
+esac
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
@@ -4550,12 +4611,12 @@
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
 printf %s "checking whether $CC accepts -g... " >&6; }
 if test ${ac_cv_prog_cc_g+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  ac_save_c_werror_flag=$ac_c_werror_flag
+else case e in #(
+  e) ac_save_c_werror_flag=$ac_c_werror_flag
    ac_c_werror_flag=yes
    ac_cv_prog_cc_g=no
    CFLAGS="-g"
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -4569,12 +4630,12 @@
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   ac_cv_prog_cc_g=yes
-else $as_nop
-  CFLAGS=""
+else case e in #(
+  e) CFLAGS=""
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
 main (void)
@@ -4585,12 +4646,12 @@
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
 
-else $as_nop
-  ac_c_werror_flag=$ac_save_c_werror_flag
+else case e in #(
+  e) ac_c_werror_flag=$ac_save_c_werror_flag
 	 CFLAGS="-g"
 	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -4603,16 +4664,19 @@
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   ac_cv_prog_cc_g=yes
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-   ac_c_werror_flag=$ac_save_c_werror_flag
+   ac_c_werror_flag=$ac_save_c_werror_flag ;;
+esac
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
 printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
 if test $ac_test_CFLAGS; then
   CFLAGS=$ac_save_CFLAGS
@@ -4635,12 +4699,12 @@
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
 printf %s "checking for $CC option to enable C11 features... " >&6; }
 if test ${ac_cv_prog_cc_c11+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  ac_cv_prog_cc_c11=no
+else case e in #(
+  e) ac_cv_prog_cc_c11=no
 ac_save_CC=$CC
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 $ac_c_conftest_c11_program
 _ACEOF
@@ -4653,40 +4717,43 @@
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam
   test "x$ac_cv_prog_cc_c11" != "xno" && break
 done
 rm -f conftest.$ac_ext
-CC=$ac_save_CC
+CC=$ac_save_CC ;;
+esac
 fi
 
 if test "x$ac_cv_prog_cc_c11" = xno
 then :
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
 printf "%s\n" "unsupported" >&6; }
-else $as_nop
-  if test "x$ac_cv_prog_cc_c11" = x
+else case e in #(
+  e) if test "x$ac_cv_prog_cc_c11" = x
 then :
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
 printf "%s\n" "none needed" >&6; }
-else $as_nop
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
+else case e in #(
+  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
-     CC="$CC $ac_cv_prog_cc_c11"
+     CC="$CC $ac_cv_prog_cc_c11" ;;
+esac
 fi
   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
-  ac_prog_cc_stdc=c11
+  ac_prog_cc_stdc=c11 ;;
+esac
 fi
 fi
 if test x$ac_prog_cc_stdc = xno
 then :
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
 printf %s "checking for $CC option to enable C99 features... " >&6; }
 if test ${ac_cv_prog_cc_c99+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  ac_cv_prog_cc_c99=no
+else case e in #(
+  e) ac_cv_prog_cc_c99=no
 ac_save_CC=$CC
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 $ac_c_conftest_c99_program
 _ACEOF
@@ -4699,40 +4766,43 @@
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam
   test "x$ac_cv_prog_cc_c99" != "xno" && break
 done
 rm -f conftest.$ac_ext
-CC=$ac_save_CC
+CC=$ac_save_CC ;;
+esac
 fi
 
 if test "x$ac_cv_prog_cc_c99" = xno
 then :
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
 printf "%s\n" "unsupported" >&6; }
-else $as_nop
-  if test "x$ac_cv_prog_cc_c99" = x
+else case e in #(
+  e) if test "x$ac_cv_prog_cc_c99" = x
 then :
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
 printf "%s\n" "none needed" >&6; }
-else $as_nop
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+else case e in #(
+  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
-     CC="$CC $ac_cv_prog_cc_c99"
+     CC="$CC $ac_cv_prog_cc_c99" ;;
+esac
 fi
   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
-  ac_prog_cc_stdc=c99
+  ac_prog_cc_stdc=c99 ;;
+esac
 fi
 fi
 if test x$ac_prog_cc_stdc = xno
 then :
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
 printf %s "checking for $CC option to enable C89 features... " >&6; }
 if test ${ac_cv_prog_cc_c89+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  ac_cv_prog_cc_c89=no
+else case e in #(
+  e) ac_cv_prog_cc_c89=no
 ac_save_CC=$CC
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 $ac_c_conftest_c89_program
 _ACEOF
@@ -4745,29 +4815,32 @@
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam
   test "x$ac_cv_prog_cc_c89" != "xno" && break
 done
 rm -f conftest.$ac_ext
-CC=$ac_save_CC
+CC=$ac_save_CC ;;
+esac
 fi
 
 if test "x$ac_cv_prog_cc_c89" = xno
 then :
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
 printf "%s\n" "unsupported" >&6; }
-else $as_nop
-  if test "x$ac_cv_prog_cc_c89" = x
+else case e in #(
+  e) if test "x$ac_cv_prog_cc_c89" = x
 then :
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
 printf "%s\n" "none needed" >&6; }
-else $as_nop
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+else case e in #(
+  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
-     CC="$CC $ac_cv_prog_cc_c89"
+     CC="$CC $ac_cv_prog_cc_c89" ;;
+esac
 fi
   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
-  ac_prog_cc_stdc=c89
+  ac_prog_cc_stdc=c89 ;;
+esac
 fi
 fi
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -4788,12 +4861,12 @@
 fi
 if test -z "$CPP"; then
   if test ${ac_cv_prog_CPP+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-      # Double quotes because $CC needs to be expanded
+else case e in #(
+  e)     # Double quotes because $CC needs to be expanded
     for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
     do
       ac_preproc_ok=false
 for ac_c_preproc_warn_flag in '' yes
 do
@@ -4807,13 +4880,14 @@
 		     Syntax error
 _ACEOF
 if ac_fn_c_try_cpp "$LINENO"
 then :
 
-else $as_nop
-  # Broken: fails on valid input.
-continue
+else case e in #(
+  e) # Broken: fails on valid input.
+continue ;;
+esac
 fi
 rm -f conftest.err conftest.i conftest.$ac_ext
 
   # OK, works on sane cases.  Now check whether nonexistent headers
   # can be detected and how.
@@ -4823,28 +4897,30 @@
 _ACEOF
 if ac_fn_c_try_cpp "$LINENO"
 then :
   # Broken: success on invalid input.
 continue
-else $as_nop
-  # Passes both tests.
+else case e in #(
+  e) # Passes both tests.
 ac_preproc_ok=:
-break
+break ;;
+esac
 fi
 rm -f conftest.err conftest.i conftest.$ac_ext
 
 done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped.
 rm -f conftest.i conftest.err conftest.$ac_ext
 if $ac_preproc_ok
 then :
   break
 fi
 
     done
     ac_cv_prog_CPP=$CPP
-
+   ;;
+esac
 fi
   CPP=$ac_cv_prog_CPP
 else
   ac_cv_prog_CPP=$CPP
 fi
@@ -4863,13 +4939,14 @@
 		     Syntax error
 _ACEOF
 if ac_fn_c_try_cpp "$LINENO"
 then :
 
-else $as_nop
-  # Broken: fails on valid input.
-continue
+else case e in #(
+  e) # Broken: fails on valid input.
+continue ;;
+esac
 fi
 rm -f conftest.err conftest.i conftest.$ac_ext
 
   # OK, works on sane cases.  Now check whether nonexistent headers
   # can be detected and how.
@@ -4879,28 +4956,30 @@
 _ACEOF
 if ac_fn_c_try_cpp "$LINENO"
 then :
   # Broken: success on invalid input.
 continue
-else $as_nop
-  # Passes both tests.
+else case e in #(
+  e) # Passes both tests.
 ac_preproc_ok=:
-break
+break ;;
+esac
 fi
 rm -f conftest.err conftest.i conftest.$ac_ext
 
 done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped.
 rm -f conftest.i conftest.err conftest.$ac_ext
 if $ac_preproc_ok
 then :
 
-else $as_nop
-  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+else case e in #(
+  e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; } ;;
+esac
 fi
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -4917,12 +4996,12 @@
 set x ${MAKE-make}
 ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
 if eval test \${ac_cv_prog_make_${ac_make}_set+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  cat >conftest.make <<\_ACEOF
+else case e in #(
+  e) cat >conftest.make <<\_ACEOF
 SHELL = /bin/sh
 all:
 	@echo '@@@%%%=$(MAKE)=@@@%%%'
 _ACEOF
 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
@@ -4930,11 +5009,12 @@
   *@@@%%%=?*=@@@%%%*)
     eval ac_cv_prog_make_${ac_make}_set=yes;;
   *)
     eval ac_cv_prog_make_${ac_make}_set=no;;
 esac
-rm -f conftest.make
+rm -f conftest.make ;;
+esac
 fi
 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 printf "%s\n" "yes" >&6; }
   SET_MAKE=
@@ -4955,12 +5035,12 @@
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_RANLIB+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  if test -n "$RANLIB"; then
+else case e in #(
+  e) if test -n "$RANLIB"; then
   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
@@ -4978,11 +5058,12 @@
   fi
 done
   done
 IFS=$as_save_IFS
 
-fi
+fi ;;
+esac
 fi
 RANLIB=$ac_cv_prog_RANLIB
 if test -n "$RANLIB"; then
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
 printf "%s\n" "$RANLIB" >&6; }
@@ -5000,12 +5081,12 @@
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_ac_ct_RANLIB+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  if test -n "$ac_ct_RANLIB"; then
+else case e in #(
+  e) if test -n "$ac_ct_RANLIB"; then
   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
@@ -5023,11 +5104,12 @@
   fi
 done
   done
 IFS=$as_save_IFS
 
-fi
+fi ;;
+esac
 fi
 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
 if test -n "$ac_ct_RANLIB"; then
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
 printf "%s\n" "$ac_ct_RANLIB" >&6; }
@@ -5101,12 +5183,12 @@
 	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the compiler understands -pipe" >&5
 printf %s "checking if the compiler understands -pipe... " >&6; }
 if test ${tcl_cv_cc_pipe+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+  e)
 	    hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
 	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -5118,15 +5200,17 @@
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   tcl_cv_cc_pipe=yes
-else $as_nop
-  tcl_cv_cc_pipe=no
+else case e in #(
+  e) tcl_cv_cc_pipe=no ;;
+esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-	    CFLAGS=$hold_cflags
+	    CFLAGS=$hold_cflags ;;
+esac
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_pipe" >&5
 printf "%s\n" "$tcl_cv_cc_pipe" >&6; }
 	if test $tcl_cv_cc_pipe = yes; then
 	    CFLAGS="$CFLAGS -pipe"
@@ -5146,12 +5230,12 @@
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
 printf %s "checking whether byte ordering is bigendian... " >&6; }
 if test ${ac_cv_c_bigendian+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  ac_cv_c_bigendian=unknown
+else case e in #(
+  e) ac_cv_c_bigendian=unknown
     # See if we're dealing with a universal compiler.
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #ifndef __APPLE_CC__
 	       not a universal capable compiler
@@ -5193,12 +5277,12 @@
 	     #include <sys/param.h>
 
 int
 main (void)
 {
-#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
-		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \\
+		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \\
 		     && LITTLE_ENDIAN)
 	      bogus endian macros
 	     #endif
 
   ;
@@ -5225,12 +5309,13 @@
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   ac_cv_c_bigendian=yes
-else $as_nop
-  ac_cv_c_bigendian=no
+else case e in #(
+  e) ac_cv_c_bigendian=no ;;
+esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
     fi
@@ -5270,12 +5355,13 @@
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   ac_cv_c_bigendian=yes
-else $as_nop
-  ac_cv_c_bigendian=no
+else case e in #(
+  e) ac_cv_c_bigendian=no ;;
+esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
     fi
@@ -5298,37 +5384,39 @@
 		unsigned short int ebcdic_mm[] =
 		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
 		int use_ebcdic (int i) {
 		  return ebcdic_mm[i] + ebcdic_ii[i];
 		}
-		extern int foo;
-
-int
-main (void)
-{
-return use_ascii (foo) == use_ebcdic (foo);
-  ;
-  return 0;
-}
+		int
+		main (int argc, char **argv)
+		{
+		  /* Intimidate the compiler so that it does not
+		     optimize the arrays away.  */
+		  char *p = argv[0];
+		  ascii_mm[1] = *p++; ebcdic_mm[1] = *p++;
+		  ascii_ii[1] = *p++; ebcdic_ii[1] = *p++;
+		  return use_ascii (argc) == use_ebcdic (*p);
+		}
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"
+if ac_fn_c_try_link "$LINENO"
 then :
-  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
+  if grep BIGenDianSyS conftest$ac_exeext >/dev/null; then
 	      ac_cv_c_bigendian=yes
 	    fi
-	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+	    if grep LiTTleEnDian conftest$ac_exeext >/dev/null ; then
 	      if test "$ac_cv_c_bigendian" = unknown; then
 		ac_cv_c_bigendian=no
 	      else
 		# finding both strings is unlikely to happen, but who knows?
 		ac_cv_c_bigendian=unknown
 	      fi
 	    fi
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-else $as_nop
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 $ac_includes_default
 int
 main (void)
 {
@@ -5347,18 +5435,21 @@
 }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
   ac_cv_c_bigendian=no
-else $as_nop
-  ac_cv_c_bigendian=yes
+else case e in #(
+  e) ac_cv_c_bigendian=yes ;;
+esac
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
 fi
 
-    fi
+    fi ;;
+esac
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
 printf "%s\n" "$ac_cv_c_bigendian" >&6; }
  case $ac_cv_c_bigendian in #(
    yes)
@@ -5375,11 +5466,10 @@
  esac
 
 
 
 #-----------------------------------------------------------------------
-# __CHANGE__
 # Specify the C source files to compile in TEA_ADD_SOURCES,
 # public headers that need to be installed in TEA_ADD_HEADERS,
 # stub library C source files to compile in TEA_ADD_STUB_SOURCES,
 # and runtime Tcl library files in TEA_ADD_TCL_SOURCES.
 # This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS
@@ -5477,11 +5567,11 @@
     done
 
 
 
 
-    vars="library/tls.tcl"
+    vars="library/tls.tcl license.terms README.txt"
     for i in $vars; do
 	# check for existence, be strict because it is installed
 	if test ! -f "${srcdir}/$i" ; then
 	    as_fn_error $? "could not find tcl source file '${srcdir}/$i'" "$LINENO" 5
 	fi
@@ -5489,29 +5579,31 @@
     done
 
 
 
 #--------------------------------------------------------------------
-#
 # You can add more files to clean if your extension creates any extra
 # files by extending CLEANFILES.
 # Add pkgIndex.tcl if it is generated in the Makefile instead of ./configure
 # and change Makefile.in to move it from CONFIG_CLEAN_FILES to BINARIES var.
 #
 # 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 Makefile pkgIndex.tcl tcltls.a.linkadd tcltls.syms"
+
+    CLEANFILES="$CLEANFILES pkgIndex.tcl generic/tls.tcl.h tlsUuid.h"
+
+
 if test "${TEA_PLATFORM}" = "windows" ; then
-    printf "%s\n" "#define BUILD_tls 1" >>confdefs.h
 
-    printf "%s\n" "#define WINDOWS 1" >>confdefs.h
+    CLEANFILES="$CLEANFILES *.lib *.dll *.exp *.ilk *.pdb vc*.pch"
 
-    CLEANFILES="pkgIndex.tcl *.lib *.dll *.exp *.ilk *.pdb vc*.pch"
 else
-    CLEANFILES="pkgIndex.tcl *.so"
+
+    CLEANFILES="$CLEANFILES *.so"
+
 fi
 
 
 #--------------------------------------------------------------------
 # Choose which headers you need.  Extension authors should try very
@@ -5534,12 +5626,12 @@
 
 
     if test ${ac_cv_c_tclh+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+  e)
 	# Use the value from --with-tclinclude, if it was given
 
 	if test x"${with_tclinclude}" != x ; then
 	    if test -f "${with_tclinclude}/tcl.h" ; then
 		ac_cv_c_tclh=${with_tclinclude}
@@ -5584,11 +5676,12 @@
 		    ac_cv_c_tclh=$i
 		    break
 		fi
 	    done
 	fi
-
+     ;;
+esac
 fi
 
 
     # Print a message based on how we determined the include path
 
@@ -5621,12 +5714,13 @@
 
     # Check whether --enable-threads was given.
 if test ${enable_threads+y}
 then :
   enableval=$enable_threads; tcl_ok=$enableval
-else $as_nop
-  tcl_ok=yes
+else case e in #(
+  e) tcl_ok=yes ;;
+esac
 fi
 
 
     if test "${enable_threads+set}" = set; then
 	enableval="$enable_threads"
@@ -5660,20 +5754,26 @@
 	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthread" >&5
 printf %s "checking for pthread_mutex_init in -lpthread... " >&6; }
 if test ${ac_cv_lib_pthread_pthread_mutex_init+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+  e) ac_check_lib_save_LIBS=$LIBS
 LIBS="-lpthread  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init ();
+   builtin and then its argument prototype would still apply.
+   The 'extern "C"' is for builds by C++ compilers;
+   although this is not generally supported in C code supporting it here
+   has little cost and some practical benefit (sr 110532).  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_mutex_init (void);
 int
 main (void)
 {
 return pthread_mutex_init ();
   ;
@@ -5681,24 +5781,27 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
   ac_cv_lib_pthread_pthread_mutex_init=yes
-else $as_nop
-  ac_cv_lib_pthread_pthread_mutex_init=no
+else case e in #(
+  e) ac_cv_lib_pthread_pthread_mutex_init=no ;;
+esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5
 printf "%s\n" "$ac_cv_lib_pthread_pthread_mutex_init" >&6; }
 if test "x$ac_cv_lib_pthread_pthread_mutex_init" = xyes
 then :
   tcl_ok=yes
-else $as_nop
-  tcl_ok=no
+else case e in #(
+  e) tcl_ok=no ;;
+esac
 fi
 
 	    if test "$tcl_ok" = "no"; then
 		# Check a little harder for __pthread_mutex_init in the same
 		# library, as some systems hide it there until pthread.h is
@@ -5708,20 +5811,26 @@
 		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __pthread_mutex_init in -lpthread" >&5
 printf %s "checking for __pthread_mutex_init in -lpthread... " >&6; }
 if test ${ac_cv_lib_pthread___pthread_mutex_init+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+  e) ac_check_lib_save_LIBS=$LIBS
 LIBS="-lpthread  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-char __pthread_mutex_init ();
+   builtin and then its argument prototype would still apply.
+   The 'extern "C"' is for builds by C++ compilers;
+   although this is not generally supported in C code supporting it here
+   has little cost and some practical benefit (sr 110532).  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char __pthread_mutex_init (void);
 int
 main (void)
 {
 return __pthread_mutex_init ();
   ;
@@ -5729,24 +5838,27 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
   ac_cv_lib_pthread___pthread_mutex_init=yes
-else $as_nop
-  ac_cv_lib_pthread___pthread_mutex_init=no
+else case e in #(
+  e) ac_cv_lib_pthread___pthread_mutex_init=no ;;
+esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5
 printf "%s\n" "$ac_cv_lib_pthread___pthread_mutex_init" >&6; }
 if test "x$ac_cv_lib_pthread___pthread_mutex_init" = xyes
 then :
   tcl_ok=yes
-else $as_nop
-  tcl_ok=no
+else case e in #(
+  e) tcl_ok=no ;;
+esac
 fi
 
 	    fi
 
 	    if test "$tcl_ok" = "yes"; then
@@ -5756,20 +5868,26 @@
 		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthreads" >&5
 printf %s "checking for pthread_mutex_init in -lpthreads... " >&6; }
 if test ${ac_cv_lib_pthreads_pthread_mutex_init+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+  e) ac_check_lib_save_LIBS=$LIBS
 LIBS="-lpthreads  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init ();
+   builtin and then its argument prototype would still apply.
+   The 'extern "C"' is for builds by C++ compilers;
+   although this is not generally supported in C code supporting it here
+   has little cost and some practical benefit (sr 110532).  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_mutex_init (void);
 int
 main (void)
 {
 return pthread_mutex_init ();
   ;
@@ -5777,24 +5895,27 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
   ac_cv_lib_pthreads_pthread_mutex_init=yes
-else $as_nop
-  ac_cv_lib_pthreads_pthread_mutex_init=no
+else case e in #(
+  e) ac_cv_lib_pthreads_pthread_mutex_init=no ;;
+esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5
 printf "%s\n" "$ac_cv_lib_pthreads_pthread_mutex_init" >&6; }
 if test "x$ac_cv_lib_pthreads_pthread_mutex_init" = xyes
 then :
   tcl_ok=yes
-else $as_nop
-  tcl_ok=no
+else case e in #(
+  e) tcl_ok=no ;;
+esac
 fi
 
 		if test "$tcl_ok" = "yes"; then
 		    # The space is needed
 		    THREADS_LIBS=" -lpthreads"
@@ -5802,20 +5923,26 @@
 		    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lc" >&5
 printf %s "checking for pthread_mutex_init in -lc... " >&6; }
 if test ${ac_cv_lib_c_pthread_mutex_init+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+  e) ac_check_lib_save_LIBS=$LIBS
 LIBS="-lc  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init ();
+   builtin and then its argument prototype would still apply.
+   The 'extern "C"' is for builds by C++ compilers;
+   although this is not generally supported in C code supporting it here
+   has little cost and some practical benefit (sr 110532).  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_mutex_init (void);
 int
 main (void)
 {
 return pthread_mutex_init ();
   ;
@@ -5823,42 +5950,51 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
   ac_cv_lib_c_pthread_mutex_init=yes
-else $as_nop
-  ac_cv_lib_c_pthread_mutex_init=no
+else case e in #(
+  e) ac_cv_lib_c_pthread_mutex_init=no ;;
+esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_pthread_mutex_init" >&5
 printf "%s\n" "$ac_cv_lib_c_pthread_mutex_init" >&6; }
 if test "x$ac_cv_lib_c_pthread_mutex_init" = xyes
 then :
   tcl_ok=yes
-else $as_nop
-  tcl_ok=no
+else case e in #(
+  e) tcl_ok=no ;;
+esac
 fi
 
 		    if test "$tcl_ok" = "no"; then
 			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lc_r" >&5
 printf %s "checking for pthread_mutex_init in -lc_r... " >&6; }
 if test ${ac_cv_lib_c_r_pthread_mutex_init+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+  e) ac_check_lib_save_LIBS=$LIBS
 LIBS="-lc_r  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init ();
+   builtin and then its argument prototype would still apply.
+   The 'extern "C"' is for builds by C++ compilers;
+   although this is not generally supported in C code supporting it here
+   has little cost and some practical benefit (sr 110532).  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_mutex_init (void);
 int
 main (void)
 {
 return pthread_mutex_init ();
   ;
@@ -5866,24 +6002,27 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
   ac_cv_lib_c_r_pthread_mutex_init=yes
-else $as_nop
-  ac_cv_lib_c_r_pthread_mutex_init=no
+else case e in #(
+  e) ac_cv_lib_c_r_pthread_mutex_init=no ;;
+esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5
 printf "%s\n" "$ac_cv_lib_c_r_pthread_mutex_init" >&6; }
 if test "x$ac_cv_lib_c_r_pthread_mutex_init" = xyes
 then :
   tcl_ok=yes
-else $as_nop
-  tcl_ok=no
+else case e in #(
+  e) tcl_ok=no ;;
+esac
 fi
 
 			if test "$tcl_ok" = "yes"; then
 			    # The space is needed
 			    THREADS_LIBS=" -pthread"
@@ -5939,12 +6078,13 @@
 printf %s "checking how to build libraries... " >&6; }
     # Check whether --enable-shared was given.
 if test ${enable_shared+y}
 then :
   enableval=$enable_shared; shared_ok=$enableval
-else $as_nop
-  shared_ok=yes
+else case e in #(
+  e) shared_ok=yes ;;
+esac
 fi
 
 
     if test "${enable_shared+set}" = set; then
 	enableval="$enable_shared"
@@ -5955,12 +6095,13 @@
 
     # Check whether --enable-stubs was given.
 if test ${enable_stubs+y}
 then :
   enableval=$enable_stubs; stubs_ok=$enableval
-else $as_nop
-  stubs_ok=yes
+else case e in #(
+  e) stubs_ok=yes ;;
+esac
 fi
 
 
     if test "${enable_stubs+set}" = set; then
 	enableval="$enable_stubs"
@@ -6018,12 +6159,12 @@
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_RANLIB+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  if test -n "$RANLIB"; then
+else case e in #(
+  e) if test -n "$RANLIB"; then
   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
@@ -6041,11 +6182,12 @@
   fi
 done
   done
 IFS=$as_save_IFS
 
-fi
+fi ;;
+esac
 fi
 RANLIB=$ac_cv_prog_RANLIB
 if test -n "$RANLIB"; then
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
 printf "%s\n" "$RANLIB" >&6; }
@@ -6063,12 +6205,12 @@
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_ac_ct_RANLIB+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  if test -n "$ac_ct_RANLIB"; then
+else case e in #(
+  e) if test -n "$ac_ct_RANLIB"; then
   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
@@ -6086,11 +6228,12 @@
   fi
 done
   done
 IFS=$as_save_IFS
 
-fi
+fi ;;
+esac
 fi
 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
 if test -n "$ac_ct_RANLIB"; then
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
 printf "%s\n" "$ac_ct_RANLIB" >&6; }
@@ -6123,12 +6266,13 @@
 printf %s "checking if 64bit support is requested... " >&6; }
     # Check whether --enable-64bit was given.
 if test ${enable_64bit+y}
 then :
   enableval=$enable_64bit; do64bit=$enableval
-else $as_nop
-  do64bit=no
+else case e in #(
+  e) do64bit=no ;;
+esac
 fi
 
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $do64bit" >&5
 printf "%s\n" "$do64bit" >&6; }
 
@@ -6138,12 +6282,13 @@
 printf %s "checking if 64bit Sparc VIS support is requested... " >&6; }
     # Check whether --enable-64bit-vis was given.
 if test ${enable_64bit_vis+y}
 then :
   enableval=$enable_64bit_vis; do64bitVIS=$enableval
-else $as_nop
-  do64bitVIS=no
+else case e in #(
+  e) do64bitVIS=no ;;
+esac
 fi
 
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $do64bitVIS" >&5
 printf "%s\n" "$do64bitVIS" >&6; }
     # Force 64bit on with VIS
@@ -6158,12 +6303,12 @@
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler supports visibility \"hidden\"" >&5
 printf %s "checking if compiler supports visibility \"hidden\"... " >&6; }
 if test ${tcl_cv_cc_visibility_hidden+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+  e)
 	hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
 	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 	    extern __attribute__((__visibility__("hidden"))) void f(void);
@@ -6177,16 +6322,18 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
   tcl_cv_cc_visibility_hidden=yes
-else $as_nop
-  tcl_cv_cc_visibility_hidden=no
+else case e in #(
+  e) tcl_cv_cc_visibility_hidden=no ;;
+esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
-	CFLAGS=$hold_cflags
+	CFLAGS=$hold_cflags ;;
+esac
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_visibility_hidden" >&5
 printf "%s\n" "$tcl_cv_cc_visibility_hidden" >&6; }
     if test $tcl_cv_cc_visibility_hidden = yes
 then :
@@ -6206,12 +6353,13 @@
 printf %s "checking if rpath support is requested... " >&6; }
     # Check whether --enable-rpath was given.
 if test ${enable_rpath+y}
 then :
   enableval=$enable_rpath; doRpath=$enableval
-else $as_nop
-  doRpath=yes
+else case e in #(
+  e) doRpath=yes ;;
+esac
 fi
 
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $doRpath" >&5
 printf "%s\n" "$doRpath" >&6; }
 
@@ -6222,12 +6370,12 @@
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking system version" >&5
 printf %s "checking system version... " >&6; }
 if test ${tcl_cv_sys_version+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+  e)
 	# TEA specific:
 	if test "${TEA_PLATFORM}" = "windows" ; then
 	    tcl_cv_sys_version=windows
 	else
 	    tcl_cv_sys_version=`uname -s`-`uname -r`
@@ -6242,11 +6390,12 @@
 		if test "`uname -s`" = "NetBSD" -a -f /etc/debian_version ; then
 		    tcl_cv_sys_version=NetBSD-Debian
 		fi
 	    fi
 	fi
-
+     ;;
+esac
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_sys_version" >&5
 printf "%s\n" "$tcl_cv_sys_version" >&6; }
     system=$tcl_cv_sys_version
 
@@ -6276,26 +6425,27 @@
 then :
 
 	CFLAGS_OPTIMIZE=-O2
 	CFLAGS_WARNING="-Wall"
 
-else $as_nop
-
+else case e in #(
+  e)
 	CFLAGS_OPTIMIZE=-O
 	CFLAGS_WARNING=""
-
+     ;;
+esac
 fi
     if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ar; ac_word=$2
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_AR+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  if test -n "$AR"; then
+else case e in #(
+  e) if test -n "$AR"; then
   ac_cv_prog_AR="$AR" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
@@ -6313,11 +6463,12 @@
   fi
 done
   done
 IFS=$as_save_IFS
 
-fi
+fi ;;
+esac
 fi
 AR=$ac_cv_prog_AR
 if test -n "$AR"; then
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
 printf "%s\n" "$AR" >&6; }
@@ -6335,12 +6486,12 @@
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_ac_ct_AR+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  if test -n "$ac_ct_AR"; then
+else case e in #(
+  e) if test -n "$ac_ct_AR"; then
   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
@@ -6358,11 +6509,12 @@
   fi
 done
   done
 IFS=$as_save_IFS
 
-fi
+fi ;;
+esac
 fi
 ac_ct_AR=$ac_cv_prog_ac_ct_AR
 if test -n "$ac_ct_AR"; then
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
 printf "%s\n" "$ac_ct_AR" >&6; }
@@ -6389,12 +6541,13 @@
     STLIB_LD='${AR} cr'
     LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
     if test "x$SHLIB_VERSION" = x
 then :
   SHLIB_VERSION=""
-else $as_nop
-  SHLIB_VERSION=".$SHLIB_VERSION"
+else case e in #(
+  e) SHLIB_VERSION=".$SHLIB_VERSION" ;;
+esac
 fi
     case $system in
 	# TEA specific:
 	windows)
 	    MACHINE="X86"
@@ -6474,12 +6627,12 @@
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_RC+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  if test -n "$RC"; then
+else case e in #(
+  e) if test -n "$RC"; then
   ac_cv_prog_RC="$RC" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
@@ -6497,11 +6650,12 @@
   fi
 done
   done
 IFS=$as_save_IFS
 
-fi
+fi ;;
+esac
 fi
 RC=$ac_cv_prog_RC
 if test -n "$RC"; then
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
 printf "%s\n" "$RC" >&6; }
@@ -6519,12 +6673,12 @@
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_ac_ct_RC+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  if test -n "$ac_ct_RC"; then
+else case e in #(
+  e) if test -n "$ac_ct_RC"; then
   ac_cv_prog_ac_ct_RC="$ac_ct_RC" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
@@ -6542,11 +6696,12 @@
   fi
 done
   done
 IFS=$as_save_IFS
 
-fi
+fi ;;
+esac
 fi
 ac_ct_RC=$ac_cv_prog_ac_ct_RC
 if test -n "$ac_ct_RC"; then
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RC" >&5
 printf "%s\n" "$ac_ct_RC" >&6; }
@@ -6580,12 +6735,12 @@
 		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cross-compile version of gcc" >&5
 printf %s "checking for cross-compile version of gcc... " >&6; }
 if test ${ac_cv_cross+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 			    #ifdef _WIN32
 				#error cross-compiler
 			    #endif
@@ -6599,15 +6754,17 @@
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   ac_cv_cross=yes
-else $as_nop
-  ac_cv_cross=no
+else case e in #(
+  e) ac_cv_cross=no ;;
+esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+		       ;;
+esac
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cross" >&5
 printf "%s\n" "$ac_cv_cross" >&6; }
 		      if test "$ac_cv_cross" = "yes"; then
 			case "$do64bit" in
@@ -6689,19 +6846,20 @@
 then :
 
 		    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
 printf "%s\n" "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
 
-else $as_nop
-
+else case e in #(
+  e)
 		    do64bit_ok=yes
 		    CFLAGS="$CFLAGS -q64"
 		    LDFLAGS_ARCH="-q64"
 		    RANLIB="${RANLIB} -X64"
 		    AR="${AR} -X64"
 		    SHLIB_LD_FLAGS="-b64"
-
+		 ;;
+esac
 fi
 
 fi
 
 	    if test "`uname -m`" = ia64
@@ -6712,34 +6870,37 @@
 		if test "$GCC" = yes
 then :
 
 		    CC_SEARCH_FLAGS='"-Wl,-R,${LIB_RUNTIME_DIR}"'
 
-else $as_nop
-
+else case e in #(
+  e)
 		    CC_SEARCH_FLAGS='"-R${LIB_RUNTIME_DIR}"'
-
+		 ;;
+esac
 fi
 		LD_SEARCH_FLAGS='-R "${LIB_RUNTIME_DIR}"'
 
-else $as_nop
-
+else case e in #(
+  e)
 		if test "$GCC" = yes
 then :
 
 		    SHLIB_LD='${CC} -shared -Wl,-bexpall'
 
-else $as_nop
-
+else case e in #(
+  e)
 		    SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bexpall -H512 -T512 -bnoentry"
 		    LDFLAGS="$LDFLAGS -brtl"
-
+		 ;;
+esac
 fi
 		SHLIB_LD="${SHLIB_LD} ${SHLIB_LD_FLAGS}"
 		CC_SEARCH_FLAGS='"-L${LIB_RUNTIME_DIR}"'
 		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-
+	     ;;
+esac
 fi
 	    ;;
 	BeOS*)
 	    SHLIB_CFLAGS="-fPIC"
 	    SHLIB_LD='${CC} -nostart'
@@ -6753,20 +6914,26 @@
 	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lbind" >&5
 printf %s "checking for inet_ntoa in -lbind... " >&6; }
 if test ${ac_cv_lib_bind_inet_ntoa+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+  e) ac_check_lib_save_LIBS=$LIBS
 LIBS="-lbind  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-char inet_ntoa ();
+   builtin and then its argument prototype would still apply.
+   The 'extern "C"' is for builds by C++ compilers;
+   although this is not generally supported in C code supporting it here
+   has little cost and some practical benefit (sr 110532).  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char inet_ntoa (void);
 int
 main (void)
 {
 return inet_ntoa ();
   ;
@@ -6774,16 +6941,18 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
   ac_cv_lib_bind_inet_ntoa=yes
-else $as_nop
-  ac_cv_lib_bind_inet_ntoa=no
+else case e in #(
+  e) ac_cv_lib_bind_inet_ntoa=no ;;
+esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind_inet_ntoa" >&5
 printf "%s\n" "$ac_cv_lib_bind_inet_ntoa" >&6; }
 if test "x$ac_cv_lib_bind_inet_ntoa" = xyes
 then :
@@ -6832,20 +7001,26 @@
 	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lnetwork" >&5
 printf %s "checking for inet_ntoa in -lnetwork... " >&6; }
 if test ${ac_cv_lib_network_inet_ntoa+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+  e) ac_check_lib_save_LIBS=$LIBS
 LIBS="-lnetwork  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-char inet_ntoa ();
+   builtin and then its argument prototype would still apply.
+   The 'extern "C"' is for builds by C++ compilers;
+   although this is not generally supported in C code supporting it here
+   has little cost and some practical benefit (sr 110532).  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char inet_ntoa (void);
 int
 main (void)
 {
 return inet_ntoa ();
   ;
@@ -6853,16 +7028,18 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
   ac_cv_lib_network_inet_ntoa=yes
-else $as_nop
-  ac_cv_lib_network_inet_ntoa=no
+else case e in #(
+  e) ac_cv_lib_network_inet_ntoa=no ;;
+esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_inet_ntoa" >&5
 printf "%s\n" "$ac_cv_lib_network_inet_ntoa" >&6; }
 if test "x$ac_cv_lib_network_inet_ntoa" = xyes
 then :
@@ -6882,30 +7059,37 @@
 	    if test "`uname -m`" = ia64
 then :
 
 		SHLIB_SUFFIX=".so"
 
-else $as_nop
-
+else case e in #(
+  e)
 		SHLIB_SUFFIX=".sl"
-
+	     ;;
+esac
 fi
 	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
 printf %s "checking for shl_load in -ldld... " >&6; }
 if test ${ac_cv_lib_dld_shl_load+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+  e) ac_check_lib_save_LIBS=$LIBS
 LIBS="-ldld  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-char shl_load ();
+   builtin and then its argument prototype would still apply.
+   The 'extern "C"' is for builds by C++ compilers;
+   although this is not generally supported in C code supporting it here
+   has little cost and some practical benefit (sr 110532).  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load (void);
 int
 main (void)
 {
 return shl_load ();
   ;
@@ -6913,24 +7097,27 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
   ac_cv_lib_dld_shl_load=yes
-else $as_nop
-  ac_cv_lib_dld_shl_load=no
+else case e in #(
+  e) ac_cv_lib_dld_shl_load=no ;;
+esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
 printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; }
 if test "x$ac_cv_lib_dld_shl_load" = xyes
 then :
   tcl_ok=yes
-else $as_nop
-  tcl_ok=no
+else case e in #(
+  e) tcl_ok=no ;;
+esac
 fi
 
 	    if test "$tcl_ok" = yes
 then :
 
@@ -6946,14 +7133,15 @@
 then :
 
 		SHLIB_LD='${CC} -shared'
 		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
 
-else $as_nop
-
+else case e in #(
+  e)
 		CFLAGS="$CFLAGS -z"
-
+	     ;;
+esac
 fi
 
 	    # Check to enable 64-bit flags for compiler/linker
 	    if test "$do64bit" = "yes"
 then :
@@ -6977,16 +7165,17 @@
 			    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
 printf "%s\n" "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
 			    ;;
 		    esac
 
-else $as_nop
-
+else case e in #(
+  e)
 		    do64bit_ok=yes
 		    CFLAGS="$CFLAGS +DD64"
 		    LDFLAGS_ARCH="+DD64"
-
+		 ;;
+esac
 fi
 
 fi ;;
 	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
 	    SHLIB_SUFFIX=".sl"
@@ -6993,20 +7182,26 @@
 	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
 printf %s "checking for shl_load in -ldld... " >&6; }
 if test ${ac_cv_lib_dld_shl_load+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+  e) ac_check_lib_save_LIBS=$LIBS
 LIBS="-ldld  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-char shl_load ();
+   builtin and then its argument prototype would still apply.
+   The 'extern "C"' is for builds by C++ compilers;
+   although this is not generally supported in C code supporting it here
+   has little cost and some practical benefit (sr 110532).  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load (void);
 int
 main (void)
 {
 return shl_load ();
   ;
@@ -7014,24 +7209,27 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
   ac_cv_lib_dld_shl_load=yes
-else $as_nop
-  ac_cv_lib_dld_shl_load=no
+else case e in #(
+  e) ac_cv_lib_dld_shl_load=no ;;
+esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
 printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; }
 if test "x$ac_cv_lib_dld_shl_load" = xyes
 then :
   tcl_ok=yes
-else $as_nop
-  tcl_ok=no
+else case e in #(
+  e) tcl_ok=no ;;
+esac
 fi
 
 	    if test "$tcl_ok" = yes
 then :
 
@@ -7075,12 +7273,12 @@
 then :
 
 		CFLAGS="$CFLAGS -mabi=n32"
 		LDFLAGS="$LDFLAGS -mabi=n32"
 
-else $as_nop
-
+else case e in #(
+  e)
 		case $system in
 		    IRIX-6.3)
 			# Use to build 6.2 compatible binaries on 6.3.
 			CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
 			;;
@@ -7087,11 +7285,12 @@
 		    *)
 			CFLAGS="$CFLAGS -n32"
 			;;
 		esac
 		LDFLAGS="$LDFLAGS -n32"
-
+	     ;;
+esac
 fi
 	    ;;
 	IRIX64-6.*)
 	    SHLIB_CFLAGS=""
 	    SHLIB_LD="ld -n32 -shared -rdata_shared"
@@ -7112,17 +7311,18 @@
 then :
 
 	            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported by gcc" >&5
 printf "%s\n" "$as_me: WARNING: 64bit mode not supported by gcc" >&2;}
 
-else $as_nop
-
+else case e in #(
+  e)
 	            do64bit_ok=yes
 	            SHLIB_LD="ld -64 -shared -rdata_shared"
 	            CFLAGS="$CFLAGS -64"
 	            LDFLAGS_ARCH="-64"
-
+	         ;;
+esac
 fi
 
 fi
 	    ;;
 	Linux*|GNU*|NetBSD-Debian|DragonFly-*|FreeBSD-*)
@@ -7165,12 +7365,12 @@
 		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -m64 flag" >&5
 printf %s "checking if compiler accepts -m64 flag... " >&6; }
 if test ${tcl_cv_cc_m64+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+  e)
 		    hold_cflags=$CFLAGS
 		    CFLAGS="$CFLAGS -m64"
 		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -7183,16 +7383,18 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
   tcl_cv_cc_m64=yes
-else $as_nop
-  tcl_cv_cc_m64=no
+else case e in #(
+  e) tcl_cv_cc_m64=no ;;
+esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
-		    CFLAGS=$hold_cflags
+		    CFLAGS=$hold_cflags ;;
+esac
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_m64" >&5
 printf "%s\n" "$tcl_cv_cc_m64" >&6; }
 		if test $tcl_cv_cc_m64 = yes
 then :
@@ -7294,12 +7496,12 @@
 			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch ppc64 flag" >&5
 printf %s "checking if compiler accepts -arch ppc64 flag... " >&6; }
 if test ${tcl_cv_cc_arch_ppc64+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+  e)
 			    hold_cflags=$CFLAGS
 			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
 			    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -7312,16 +7514,18 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
   tcl_cv_cc_arch_ppc64=yes
-else $as_nop
-  tcl_cv_cc_arch_ppc64=no
+else case e in #(
+  e) tcl_cv_cc_arch_ppc64=no ;;
+esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
-			    CFLAGS=$hold_cflags
+			    CFLAGS=$hold_cflags ;;
+esac
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_ppc64" >&5
 printf "%s\n" "$tcl_cv_cc_arch_ppc64" >&6; }
 			if test $tcl_cv_cc_arch_ppc64 = yes
 then :
@@ -7334,12 +7538,12 @@
 			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch x86_64 flag" >&5
 printf %s "checking if compiler accepts -arch x86_64 flag... " >&6; }
 if test ${tcl_cv_cc_arch_x86_64+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+  e)
 			    hold_cflags=$CFLAGS
 			    CFLAGS="$CFLAGS -arch x86_64"
 			    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -7352,16 +7556,18 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
   tcl_cv_cc_arch_x86_64=yes
-else $as_nop
-  tcl_cv_cc_arch_x86_64=no
+else case e in #(
+  e) tcl_cv_cc_arch_x86_64=no ;;
+esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
-			    CFLAGS=$hold_cflags
+			    CFLAGS=$hold_cflags ;;
+esac
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_x86_64" >&5
 printf "%s\n" "$tcl_cv_cc_arch_x86_64" >&6; }
 			if test $tcl_cv_cc_arch_x86_64 = yes
 then :
@@ -7373,30 +7579,31 @@
 		    *)
 			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5
 printf "%s\n" "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};;
 		esac
 
-else $as_nop
-
+else case e in #(
+  e)
 		# Check for combined 32-bit and 64-bit fat build
 		if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
 		    && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '
 then :
 
 		    fat_32_64=yes
 fi
-
+	     ;;
+esac
 fi
 	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
 	    SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
 	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ld accepts -single_module flag" >&5
 printf %s "checking if ld accepts -single_module flag... " >&6; }
 if test ${tcl_cv_ld_single_module+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+  e)
 		hold_ldflags=$LDFLAGS
 		LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
 		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -7409,16 +7616,18 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
   tcl_cv_ld_single_module=yes
-else $as_nop
-  tcl_cv_ld_single_module=no
+else case e in #(
+  e) tcl_cv_ld_single_module=no ;;
+esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
-		LDFLAGS=$hold_ldflags
+		LDFLAGS=$hold_ldflags ;;
+esac
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_single_module" >&5
 printf "%s\n" "$tcl_cv_ld_single_module" >&6; }
 	    if test $tcl_cv_ld_single_module = yes
 then :
@@ -7434,12 +7643,12 @@
 	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ld accepts -search_paths_first flag" >&5
 printf %s "checking if ld accepts -search_paths_first flag... " >&6; }
 if test ${tcl_cv_ld_search_paths_first+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+  e)
 		hold_ldflags=$LDFLAGS
 		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
 		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -7452,16 +7661,18 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
   tcl_cv_ld_search_paths_first=yes
-else $as_nop
-  tcl_cv_ld_search_paths_first=no
+else case e in #(
+  e) tcl_cv_ld_search_paths_first=no ;;
+esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
-		LDFLAGS=$hold_ldflags
+		LDFLAGS=$hold_ldflags ;;
+esac
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_search_paths_first" >&5
 printf "%s\n" "$tcl_cv_ld_search_paths_first" >&6; }
 	    if test $tcl_cv_ld_search_paths_first = yes
 then :
@@ -7492,12 +7703,12 @@
 		    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit X11" >&5
 printf %s "checking for 64-bit X11... " >&6; }
 if test ${tcl_cv_lib_x11_64+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+  e)
 			for v in CFLAGS CPPFLAGS LDFLAGS; do
 			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
 			done
 			CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
 			LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
@@ -7513,18 +7724,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
   tcl_cv_lib_x11_64=yes
-else $as_nop
-  tcl_cv_lib_x11_64=no
+else case e in #(
+  e) tcl_cv_lib_x11_64=no ;;
+esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 			for v in CFLAGS CPPFLAGS LDFLAGS; do
 			    eval $v'="$hold_'$v'"'
-			done
+			done ;;
+esac
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_x11_64" >&5
 printf "%s\n" "$tcl_cv_lib_x11_64" >&6; }
 
 fi
@@ -7534,12 +7747,12 @@
 		    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit Tk" >&5
 printf %s "checking for 64-bit Tk... " >&6; }
 if test ${tcl_cv_lib_tk_64+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+  e)
 			for v in CFLAGS CPPFLAGS LDFLAGS; do
 			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
 			done
 			CPPFLAGS="$CPPFLAGS -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 ${TCL_INCLUDES} ${TK_INCLUDES}"
 			LDFLAGS="$LDFLAGS ${TCL_STUB_LIB_SPEC} ${TK_STUB_LIB_SPEC}"
@@ -7555,18 +7768,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
   tcl_cv_lib_tk_64=yes
-else $as_nop
-  tcl_cv_lib_tk_64=no
+else case e in #(
+  e) tcl_cv_lib_tk_64=no ;;
+esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 			for v in CFLAGS CPPFLAGS LDFLAGS; do
 			    eval $v'="$hold_'$v'"'
-			done
+			done ;;
+esac
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_tk_64" >&5
 printf "%s\n" "$tcl_cv_lib_tk_64" >&6; }
 
 fi
@@ -7596,14 +7811,15 @@
 	    if test "$SHARED_BUILD" = 1
 then :
 
 	        SHLIB_LD='ld -shared -expect_unresolved "*"'
 
-else $as_nop
-
+else case e in #(
+  e)
 	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
-
+	     ;;
+esac
 fi
 	    SHLIB_SUFFIX=".so"
 	    if test $doRpath = yes
 then :
 
@@ -7611,13 +7827,14 @@
 		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
 fi
 	    if test "$GCC" = yes
 then :
   CFLAGS="$CFLAGS -mieee"
-else $as_nop
-
-		CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
+else case e in #(
+  e)
+		CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee" ;;
+esac
 fi
 	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
 	    CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
 	    CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
 	    LIBS=`echo $LIBS | sed s/-lpthreads//`
@@ -7624,15 +7841,16 @@
 	    if test "$GCC" = yes
 then :
 
 		LIBS="$LIBS -lpthread -lmach -lexc"
 
-else $as_nop
-
+else case e in #(
+  e)
 		CFLAGS="$CFLAGS -pthread"
 		LDFLAGS="$LDFLAGS -pthread"
-
+	     ;;
+esac
 fi
 	    ;;
 	QNX-6*)
 	    # QNX RTP
 	    # This may work for all QNX, but it was only reported for v6.
@@ -7648,15 +7866,16 @@
 then :
 
 		SHLIB_CFLAGS="-fPIC -melf"
 		LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
 
-else $as_nop
-
+else case e in #(
+  e)
 		SHLIB_CFLAGS="-Kpic -belf"
 		LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
-
+	     ;;
+esac
 fi
 	    SHLIB_LD="ld -G"
 	    SHLIB_LD_LIBS=""
 	    SHLIB_SUFFIX=".so"
 	    CC_SEARCH_FLAGS=""
@@ -7682,16 +7901,17 @@
 
 		SHLIB_LD='${CC} -shared'
 		CC_SEARCH_FLAGS='"-Wl,-R,${LIB_RUNTIME_DIR}"'
 		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
 
-else $as_nop
-
+else case e in #(
+  e)
 		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
 		CC_SEARCH_FLAGS='-R "${LIB_RUNTIME_DIR}"'
 		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-
+	     ;;
+esac
 fi
 	    ;;
 	SunOS-5*)
 	    # Note: If _REENTRANT isn't defined, then Solaris
 	    # won't define thread-safe library routines.
@@ -7720,41 +7940,44 @@
 then :
 
 			    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5
 printf "%s\n" "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;}
 
-else $as_nop
-
+else case e in #(
+  e)
 			    do64bit_ok=yes
 			    CFLAGS="$CFLAGS -m64 -mcpu=v9"
 			    LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
 			    SHLIB_CFLAGS="-fPIC"
-
+			 ;;
+esac
 fi
 
-else $as_nop
-
+else case e in #(
+  e)
 			do64bit_ok=yes
 			if test "$do64bitVIS" = yes
 then :
 
 			    CFLAGS="$CFLAGS -xarch=v9a"
 			    LDFLAGS_ARCH="-xarch=v9a"
 
-else $as_nop
-
+else case e in #(
+  e)
 			    CFLAGS="$CFLAGS -xarch=v9"
 			    LDFLAGS_ARCH="-xarch=v9"
-
+			 ;;
+esac
 fi
 			# Solaris 64 uses this as well
 			#LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
-
+		     ;;
+esac
 fi
 
-else $as_nop
-  if test "$arch" = "amd64 i386"
+else case e in #(
+  e) if test "$arch" = "amd64 i386"
 then :
 
 		    if test "$GCC" = yes
 then :
 
@@ -7766,28 +7989,31 @@
 			    *)
 				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
 printf "%s\n" "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;};;
 			esac
 
-else $as_nop
-
+else case e in #(
+  e)
 			do64bit_ok=yes
 			case $system in
 			    SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
 				CFLAGS="$CFLAGS -m64"
 				LDFLAGS="$LDFLAGS -m64";;
 			    *)
 				CFLAGS="$CFLAGS -xarch=amd64"
 				LDFLAGS="$LDFLAGS -xarch=amd64";;
 			esac
-
+		     ;;
+esac
 fi
 
-else $as_nop
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported for $arch" >&5
-printf "%s\n" "$as_me: WARNING: 64bit mode not supported for $arch" >&2;}
-fi
+else case e in #(
+  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported for $arch" >&5
+printf "%s\n" "$as_me: WARNING: 64bit mode not supported for $arch" >&2;} ;;
+esac
+fi ;;
+esac
 fi
 
 fi
 
 	    SHLIB_SUFFIX=".so"
@@ -7811,35 +8037,37 @@
 			# for finding sparcv9 libgcc, get the regular libgcc
 			# path, remove so name and append 'sparcv9'
 			#v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
 			#CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
 
-else $as_nop
-  if test "$arch" = "amd64 i386"
+else case e in #(
+  e) if test "$arch" = "amd64 i386"
 then :
 
 			# JH: static-libgcc is necessary for core Tcl, but may
 			# not be necessary for extensions.
 			SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
 
-fi
+fi ;;
+esac
 fi
 
 fi
 
-else $as_nop
-
+else case e in #(
+  e)
 		case $system in
 		    SunOS-5.[1-9][0-9]*)
 			# TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
 			SHLIB_LD='${CC} -G -z text ${LDFLAGS_DEFAULT}';;
 		    *)
 			SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
 		esac
 		CC_SEARCH_FLAGS='"-Wl,-R,${LIB_RUNTIME_DIR}"'
 		LD_SEARCH_FLAGS='-R "${LIB_RUNTIME_DIR}"'
-
+	     ;;
+esac
 fi
 	    ;;
 	UNIX_SV* | UnixWare-5*)
 	    SHLIB_CFLAGS="-KPIC"
 	    SHLIB_LD='${CC} -G'
@@ -7850,12 +8078,12 @@
 	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld accepts -Bexport flag" >&5
 printf %s "checking for ld accepts -Bexport flag... " >&6; }
 if test ${tcl_cv_ld_Bexport+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+  e)
 		hold_ldflags=$LDFLAGS
 		LDFLAGS="$LDFLAGS -Wl,-Bexport"
 		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -7868,16 +8096,18 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
   tcl_cv_ld_Bexport=yes
-else $as_nop
-  tcl_cv_ld_Bexport=no
+else case e in #(
+  e) tcl_cv_ld_Bexport=no ;;
+esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
-	        LDFLAGS=$hold_ldflags
+	        LDFLAGS=$hold_ldflags ;;
+esac
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_Bexport" >&5
 printf "%s\n" "$tcl_cv_ld_Bexport" >&6; }
 	    if test $tcl_cv_ld_Bexport = yes
 then :
@@ -7950,16 +8180,16 @@
 	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SEH support in compiler" >&5
 printf %s "checking for SEH support in compiler... " >&6; }
 if test ${tcl_cv_seh+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  if test "$cross_compiling" = yes
+else case e in #(
+  e) if test "$cross_compiling" = yes
 then :
   tcl_cv_seh=no
-else $as_nop
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #undef WIN32_LEAN_AND_MEAN
@@ -7977,18 +8207,21 @@
 
 _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
   tcl_cv_seh=yes
-else $as_nop
-  tcl_cv_seh=no
+else case e in #(
+  e) tcl_cv_seh=no ;;
+esac
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
 fi
 
-
+	 ;;
+esac
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_seh" >&5
 printf "%s\n" "$tcl_cv_seh" >&6; }
 	if test "$tcl_cv_seh" = "no" ; then
 
@@ -8005,12 +8238,12 @@
 	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EXCEPTION_DISPOSITION support in include files" >&5
 printf %s "checking for EXCEPTION_DISPOSITION support in include files... " >&6; }
 if test ${tcl_cv_eh_disposition+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #	    define WIN32_LEAN_AND_MEAN
 #	    include <windows.h>
 #	    undef WIN32_LEAN_AND_MEAN
@@ -8026,15 +8259,17 @@
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   tcl_cv_eh_disposition=yes
-else $as_nop
-  tcl_cv_eh_disposition=no
+else case e in #(
+  e) tcl_cv_eh_disposition=no ;;
+esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+	 ;;
+esac
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_eh_disposition" >&5
 printf "%s\n" "$tcl_cv_eh_disposition" >&6; }
 	if test "$tcl_cv_eh_disposition" = "no" ; then
 
@@ -8049,12 +8284,12 @@
 	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for winnt.h that ignores VOID define" >&5
 printf %s "checking for winnt.h that ignores VOID define... " >&6; }
 if test ${tcl_cv_winnt_ignore_void+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #define VOID void
 #define WIN32_LEAN_AND_MEAN
 #include <windows.h>
@@ -8073,15 +8308,17 @@
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   tcl_cv_winnt_ignore_void=yes
-else $as_nop
-  tcl_cv_winnt_ignore_void=no
+else case e in #(
+  e) tcl_cv_winnt_ignore_void=no ;;
+esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+	 ;;
+esac
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_winnt_ignore_void" >&5
 printf "%s\n" "$tcl_cv_winnt_ignore_void" >&6; }
 	if test "$tcl_cv_winnt_ignore_void" = "yes" ; then
 
@@ -8097,12 +8334,12 @@
 	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cast to union support" >&5
 printf %s "checking for cast to union support... " >&6; }
 if test ${tcl_cv_cast_to_union+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
 main (void)
 {
@@ -8115,15 +8352,17 @@
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   tcl_cv_cast_to_union=yes
-else $as_nop
-  tcl_cv_cast_to_union=no
+else case e in #(
+  e) tcl_cv_cast_to_union=no ;;
+esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+	 ;;
+esac
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cast_to_union" >&5
 printf "%s\n" "$tcl_cv_cast_to_union" >&6; }
 	if test "$tcl_cv_cast_to_union" = "yes"; then
 
@@ -8162,12 +8401,12 @@
     tcl_flags=""
 
     if test ${tcl_cv_flag__isoc99_source+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <stdlib.h>
 int
 main (void)
 {
@@ -8177,12 +8416,12 @@
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   tcl_cv_flag__isoc99_source=no
-else $as_nop
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #define _ISOC99_SOURCE 1
 #include <stdlib.h>
 int
 main (void)
@@ -8193,16 +8432,19 @@
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   tcl_cv_flag__isoc99_source=yes
-else $as_nop
-  tcl_cv_flag__isoc99_source=no
+else case e in #(
+  e) tcl_cv_flag__isoc99_source=no ;;
+esac
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
 fi
 
     if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
 
 printf "%s\n" "#define _ISOC99_SOURCE 1" >>confdefs.h
@@ -8213,12 +8455,12 @@
     if test "${TCL_MAJOR_VERSION}" -ne 8 ; then
 
     if test ${tcl_cv_flag__file_offset_bits+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/stat.h>
 int
 main (void)
 {
@@ -8228,12 +8470,12 @@
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   tcl_cv_flag__file_offset_bits=no
-else $as_nop
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #define _FILE_OFFSET_BITS 64
 #include <sys/stat.h>
 int
 main (void)
@@ -8244,16 +8486,19 @@
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   tcl_cv_flag__file_offset_bits=yes
-else $as_nop
-  tcl_cv_flag__file_offset_bits=no
+else case e in #(
+  e) tcl_cv_flag__file_offset_bits=no ;;
+esac
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
 fi
 
     if test "x${tcl_cv_flag__file_offset_bits}" = "xyes" ; then
 
 printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h
@@ -8274,12 +8519,12 @@
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit integer type" >&5
 printf %s "checking for 64-bit integer type... " >&6; }
     if test ${tcl_cv_type_64bit+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+  e)
 	tcl_cv_type_64bit=none
 	# See if the compiler knows natively about __int64
 	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -8292,12 +8537,13 @@
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   tcl_type_64bit=__int64
-else $as_nop
-  tcl_type_64bit="long long"
+else case e in #(
+  e) tcl_type_64bit="long long" ;;
+esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 	# See if we could use long anyway  Note that we substitute in the
 	# type that is our current guess for a 64-bit type inside this check
 	# program, so it should be modified only carefully...
@@ -8316,11 +8562,12 @@
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   tcl_cv_type_64bit=${tcl_type_64bit}
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
 fi
 
     if test "${tcl_cv_type_64bit}" = none ; then
 
 printf "%s\n" "#define TCL_WIDE_INT_IS_LONG 1" >>confdefs.h
@@ -8345,12 +8592,12 @@
 	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit time_t" >&5
 printf %s "checking for 64-bit time_t... " >&6; }
 if test ${tcl_cv_time_t_64+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+  e)
 		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/types.h>
 int
 main (void)
@@ -8361,14 +8608,16 @@
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   tcl_cv_time_t_64=yes
-else $as_nop
-  tcl_cv_time_t_64=no
+else case e in #(
+  e) tcl_cv_time_t_64=no ;;
+esac
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_time_t_64" >&5
 printf "%s\n" "$tcl_cv_time_t_64" >&6; }
 	    if test "x${tcl_cv_time_t_64}" = "xno" ; then
 		# Note that _TIME_BITS=64 requires _FILE_OFFSET_BITS=64
@@ -8376,12 +8625,12 @@
 		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if _TIME_BITS=64 enables 64-bit time_t" >&5
 printf %s "checking if _TIME_BITS=64 enables 64-bit time_t... " >&6; }
 if test ${tcl_cv__time_bits+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+  e)
 		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #define _TIME_BITS 64
 #include <sys/types.h>
 int
@@ -8393,14 +8642,16 @@
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   tcl_cv__time_bits=yes
-else $as_nop
-  tcl_cv__time_bits=no
+else case e in #(
+  e) tcl_cv__time_bits=no ;;
+esac
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv__time_bits" >&5
 printf "%s\n" "$tcl_cv__time_bits" >&6; }
 		if test "x${tcl_cv__time_bits}" = "xyes" ; then
 
@@ -8413,12 +8664,12 @@
 	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct dirent64" >&5
 printf %s "checking for struct dirent64... " >&6; }
 if test ${tcl_cv_struct_dirent64+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+  e)
 	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/types.h>
 #include <dirent.h>
 int
@@ -8430,14 +8681,16 @@
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   tcl_cv_struct_dirent64=yes
-else $as_nop
-  tcl_cv_struct_dirent64=no
+else case e in #(
+  e) tcl_cv_struct_dirent64=no ;;
+esac
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_dirent64" >&5
 printf "%s\n" "$tcl_cv_struct_dirent64" >&6; }
 	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
 
@@ -8448,12 +8701,12 @@
 	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for DIR64" >&5
 printf %s "checking for DIR64... " >&6; }
 if test ${tcl_cv_DIR64+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+  e)
 	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/types.h>
 #include <dirent.h>
 int
@@ -8466,14 +8719,16 @@
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   tcl_cv_DIR64=yes
-else $as_nop
-  tcl_cv_DIR64=no
+else case e in #(
+  e) tcl_cv_DIR64=no ;;
+esac
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_DIR64" >&5
 printf "%s\n" "$tcl_cv_DIR64" >&6; }
 	if test "x${tcl_cv_DIR64}" = "xyes" ; then
 
@@ -8484,12 +8739,12 @@
 	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct stat64" >&5
 printf %s "checking for struct stat64... " >&6; }
 if test ${tcl_cv_struct_stat64+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+  e)
 	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/stat.h>
 int
 main (void)
@@ -8501,14 +8756,16 @@
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   tcl_cv_struct_stat64=yes
-else $as_nop
-  tcl_cv_struct_stat64=no
+else case e in #(
+  e) tcl_cv_struct_stat64=no ;;
+esac
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_stat64" >&5
 printf "%s\n" "$tcl_cv_struct_stat64" >&6; }
 	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
 
@@ -8532,12 +8789,12 @@
 	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for off64_t" >&5
 printf %s "checking for off64_t... " >&6; }
 	if test ${tcl_cv_type_off64_t+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+  e)
 	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/types.h>
 int
 main (void)
@@ -8549,14 +8806,16 @@
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   tcl_cv_type_off64_t=yes
-else $as_nop
-  tcl_cv_type_off64_t=no
+else case e in #(
+  e) tcl_cv_type_off64_t=no ;;
+esac
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
 fi
 
 			if test "x${tcl_cv_type_off64_t}" = "xyes" && \
 	        test "x${ac_cv_func_lseek64}" = "xyes" && \
 	        test "x${ac_cv_func_open64}" = "xyes" ; then
@@ -8583,12 +8842,13 @@
 printf %s "checking for build with symbols... " >&6; }
     # Check whether --enable-symbols was given.
 if test ${enable_symbols+y}
 then :
   enableval=$enable_symbols; tcl_ok=$enableval
-else $as_nop
-  tcl_ok=no
+else case e in #(
+  e) tcl_ok=no ;;
+esac
 fi
 
     if test "$tcl_ok" = "no"; then
 	CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE} -DNDEBUG"
 	LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
@@ -8641,18 +8901,18 @@
 # depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
 # and TEA_LOAD_TCLCONFIG macros above.
 #--------------------------------------------------------------------
 
 
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
-printf %s "checking for grep that handles long lines and -e... " >&6; }
-if test ${ac_cv_path_GREP+y}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep -e" >&5
+printf %s "checking for egrep -e... " >&6; }
+if test ${ac_cv_path_EGREP_TRADITIONAL+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  if test -z "$GREP"; then
-  ac_path_GREP_found=false
+else case e in #(
+  e) if test -z "$EGREP_TRADITIONAL"; then
+  ac_path_EGREP_TRADITIONAL_found=false
   # Loop through the user's path and test for each of PROGNAME-LIST
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
 do
   IFS=$as_save_IFS
@@ -8662,69 +8922,59 @@
     *) as_dir=$as_dir/ ;;
   esac
     for ac_prog in grep ggrep
    do
     for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
-      as_fn_executable_p "$ac_path_GREP" || continue
-# Check for GNU ac_path_GREP and select it if it is found.
-  # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
+      ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue
+# Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found.
+  # Check for GNU $ac_path_EGREP_TRADITIONAL
+case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #(
 *GNU*)
-  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+  ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;;
+#(
 *)
   ac_count=0
   printf %s 0123456789 >"conftest.in"
   while :
   do
     cat "conftest.in" "conftest.in" >"conftest.tmp"
     mv "conftest.tmp" "conftest.in"
     cp "conftest.in" "conftest.nl"
-    printf "%s\n" 'GREP' >> "conftest.nl"
-    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl"
+    "$ac_path_EGREP_TRADITIONAL" -E 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
     as_fn_arith $ac_count + 1 && ac_count=$as_val
-    if test $ac_count -gt ${ac_path_GREP_max-0}; then
+    if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then
       # Best one so far, save it but keep looking for a better one
-      ac_cv_path_GREP="$ac_path_GREP"
-      ac_path_GREP_max=$ac_count
+      ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL"
+      ac_path_EGREP_TRADITIONAL_max=$ac_count
     fi
     # 10*(2^10) chars as input seems more than enough
     test $ac_count -gt 10 && break
   done
   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
 esac
 
-      $ac_path_GREP_found && break 3
+      $ac_path_EGREP_TRADITIONAL_found && break 3
     done
   done
   done
 IFS=$as_save_IFS
-  if test -z "$ac_cv_path_GREP"; then
-    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
-  fi
-else
-  ac_cv_path_GREP=$GREP
-fi
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
-printf "%s\n" "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
-
-
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
-printf %s "checking for egrep... " >&6; }
-if test ${ac_cv_path_EGREP+y}
-then :
-  printf %s "(cached) " >&6
-else $as_nop
-  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
-   then ac_cv_path_EGREP="$GREP -E"
-   else
-     if test -z "$EGREP"; then
-  ac_path_EGREP_found=false
+  if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then
+    :
+  fi
+else
+  ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL
+fi
+
+    if test "$ac_cv_path_EGREP_TRADITIONAL"
+then :
+  ac_cv_path_EGREP_TRADITIONAL="$ac_cv_path_EGREP_TRADITIONAL -E"
+else case e in #(
+  e) if test -z "$EGREP_TRADITIONAL"; then
+  ac_path_EGREP_TRADITIONAL_found=false
   # Loop through the user's path and test for each of PROGNAME-LIST
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
 do
   IFS=$as_save_IFS
@@ -8734,58 +8984,60 @@
     *) as_dir=$as_dir/ ;;
   esac
     for ac_prog in egrep
    do
     for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
-      as_fn_executable_p "$ac_path_EGREP" || continue
-# Check for GNU ac_path_EGREP and select it if it is found.
-  # Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
+      ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue
+# Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found.
+  # Check for GNU $ac_path_EGREP_TRADITIONAL
+case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #(
 *GNU*)
-  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+  ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;;
+#(
 *)
   ac_count=0
   printf %s 0123456789 >"conftest.in"
   while :
   do
     cat "conftest.in" "conftest.in" >"conftest.tmp"
     mv "conftest.tmp" "conftest.in"
     cp "conftest.in" "conftest.nl"
-    printf "%s\n" 'EGREP' >> "conftest.nl"
-    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl"
+    "$ac_path_EGREP_TRADITIONAL" 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
     as_fn_arith $ac_count + 1 && ac_count=$as_val
-    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+    if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then
       # Best one so far, save it but keep looking for a better one
-      ac_cv_path_EGREP="$ac_path_EGREP"
-      ac_path_EGREP_max=$ac_count
+      ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL"
+      ac_path_EGREP_TRADITIONAL_max=$ac_count
     fi
     # 10*(2^10) chars as input seems more than enough
     test $ac_count -gt 10 && break
   done
   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
 esac
 
-      $ac_path_EGREP_found && break 3
+      $ac_path_EGREP_TRADITIONAL_found && break 3
     done
   done
   done
 IFS=$as_save_IFS
-  if test -z "$ac_cv_path_EGREP"; then
+  if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then
     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
   fi
 else
-  ac_cv_path_EGREP=$EGREP
-fi
-
-   fi
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
-printf "%s\n" "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
-
+  ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL
+fi
+ ;;
+esac
+fi ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP_TRADITIONAL" >&5
+printf "%s\n" "$ac_cv_path_EGREP_TRADITIONAL" >&6; }
+ EGREP_TRADITIONAL=$ac_cv_path_EGREP_TRADITIONAL
 
 
     if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
 	MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(PKG_OBJECTS)"
 	MAKE_SHARED_LIB="\${SHLIB_LD} \${LDFLAGS} \${LDFLAGS_DEFAULT} -out:\$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
@@ -8796,11 +9048,11 @@
 print("manifest needed")
 #endif
 
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "manifest needed" >/dev/null 2>&1
+  $EGREP_TRADITIONAL "manifest needed" >/dev/null 2>&1
 then :
 
 	# Could do a CHECK_PROG for mt, but should always be with MSVC8+
 	VC_MANIFEST_EMBED_DLL="if test -f \$@.manifest ; then mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;2 ; fi"
 	VC_MANIFEST_EMBED_EXE="if test -f \$@.manifest ; then mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;1 ; fi"
@@ -8929,12 +9181,12 @@
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_PKG_CONFIG+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  if test -n "$PKG_CONFIG"; then
+else case e in #(
+  e) if test -n "$PKG_CONFIG"; then
   ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
@@ -8952,11 +9204,12 @@
   fi
 done
   done
 IFS=$as_save_IFS
 
-fi
+fi ;;
+esac
 fi
 PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
 if test -n "$PKG_CONFIG"; then
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
 printf "%s\n" "$PKG_CONFIG" >&6; }
@@ -8974,12 +9227,12 @@
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_ac_ct_PKG_CONFIG+y}
 then :
   printf %s "(cached) " >&6
-else $as_nop
-  if test -n "$ac_ct_PKG_CONFIG"; then
+else case e in #(
+  e) if test -n "$ac_ct_PKG_CONFIG"; then
   ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
@@ -8997,11 +9250,12 @@
   fi
 done
   done
 IFS=$as_save_IFS
 
-fi
+fi ;;
+esac
 fi
 ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
 if test -n "$ac_ct_PKG_CONFIG"; then
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
 printf "%s\n" "$ac_ct_PKG_CONFIG" >&6; }
@@ -9028,11 +9282,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
 
 			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for disable TLS1 protocol" >&5
 printf %s "checking for disable TLS1 protocol... " >&6; }
@@ -9045,11 +9299,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
 
 			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for disable TLS1.1 protocol" >&5
 printf %s "checking for disable TLS1.1 protocol... " >&6; }
@@ -9062,11 +9316,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
 
 			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for disable TLS1.2 protocol" >&5
 printf %s "checking for disable TLS1.2 protocol... " >&6; }
@@ -9079,11 +9333,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
 
 			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for disable TLS1.3 protocol" >&5
 printf %s "checking for disable TLS1.3 protocol... " >&6; }
@@ -9099,17 +9353,18 @@
 if test ${enable_ssl_fastpath+y}
 then :
   enableval=$enable_ssl_fastpath;
 		tcltls_ssl_fastpath="$enableval"
 
-else $as_nop
-
+else case e in #(
+  e)
 		tcltls_ssl_fastpath='no'
-
+	 ;;
+esac
 fi
 
-	if test "$tcltls_ssl_fastpath" = 'yes'; then
+	if test "$tcltls_ssl_fastpath" == 'yes'; then
 
 printf "%s\n" "#define TCLTLS_SSL_USE_FASTPATH 1" >>confdefs.h
 
 	fi
 	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fast path" >&5
@@ -9122,18 +9377,19 @@
 if test ${enable_hardening+y}
 then :
   enableval=$enable_hardening;
 		tcltls_enable_hardening="$enableval"
 
-else $as_nop
-
+else case e in #(
+  e)
 		tcltls_enable_hardening='yes'
-
+	 ;;
+esac
 fi
 
-	if test "$tcltls_enable_hardening" = 'yes'; then
-		if test "$GCC" = 'yes' -o "$CC" = 'clang'; then
+	if test "$tcltls_enable_hardening" == 'yes'; then
+		if test "$GCC" == 'yes' -o "$CC" = 'clang'; then
 
     PKG_CFLAGS="$PKG_CFLAGS -fstack-protector-all"
 
 
 
@@ -9155,14 +9411,15 @@
 if test ${enable_static_ssl+y}
 then :
   enableval=$enable_static_ssl;
 		TCLEXT_TLS_STATIC_SSL="$enableval"
 
-else $as_nop
-
+else case e in #(
+  e)
 		TCLEXT_TLS_STATIC_SSL='no'
-
+	 ;;
+esac
 fi
 
 	{ 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
@@ -9174,15 +9431,16 @@
 if test ${with_openssl_dir+y}
 then :
   withval=$with_openssl_dir;
 			openssldir="$withval"
 
-else $as_nop
-
+else case e in #(
+  e)
 			openssldir=''
 
-
+	 ;;
+esac
 fi
 
 	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OpenSSL directory" >&5
 printf %s "checking for OpenSSL directory... " >&6; }
 	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $openssldir" >&5
@@ -9193,37 +9451,36 @@
 if test ${with_openssl_includedir+y}
 then :
   withval=$with_openssl_includedir;
 			opensslincludedir="$withval"
 
-else $as_nop
-
-			if test ! -z "$openssldir"; then
+else case e in #(
+  e)
+			if test -n "$openssldir"; then
 				opensslincludedir="${openssldir}/include"
 			else
 				opensslincludedir=''
 			fi
 
-
+	 ;;
+esac
 fi
 
 	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OpenSSL include directory" >&5
 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 ! -z "$opensslincludedir"; then
+		if test -n "$opensslincludedir"; then
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ssl.h" >&5
+printf %s "checking for ssl.h... " >&6; }
 		if test -f "$opensslincludedir/openssl/ssl.h"; then
 			TCLTLS_SSL_CFLAGS="-I$opensslincludedir"
 			TCLTLS_SSL_INCLUDES="-I$opensslincludedir"
-			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ssl.h" >&5
-printf %s "checking for ssl.h... " >&6; }
 			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 printf "%s\n" "yes" >&6; }
 		else
-			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ssl.h" >&5
-printf %s "checking for ssl.h... " >&6; }
 			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
 printf "%s\n" "no" >&6; }
 			as_fn_error $? "Unable to locate ssl.h" "$LINENO" 5
 		fi
 	fi
@@ -9233,42 +9490,43 @@
 if test ${with_openssl_libdir+y}
 then :
   withval=$with_openssl_libdir;
 			openssllibdir="$withval"
 
-else $as_nop
-
-			if test ! -z "$openssldir"; then
-				if test "$do64bit" == 'yes'; then
+else case e in #(
+  e)
+			if test -n "$openssldir"; then
+				if test "$do64bit" == 'yes' -a -d $openssldir/lib64; then
 					openssllibdir="$openssldir/lib64"
 				else
 					openssllibdir="$openssldir/lib"
 				fi
 			else
 				openssllibdir=''
 			fi
 
-
+	 ;;
+esac
 fi
 
 	{ 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 ! -z "$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"
-				# HPUX
-				# -Wl,-a,archive ... -Wl,-a,shared_archive
-			fi
+		SSL_LIBS_PATH=''
+	if test -n "$openssllibdir"; then
+		if test "${TCLEXT_TLS_STATIC_SSL}" == 'no'; then
+			LIBEXT=${SHLIB_SUFFIX}
+		else
+			LIBEXT='.a'
+		fi
+
+		if test -f "$openssllibdir/libssl${LIBEXT}"; then
+			SSL_LIBS_PATH="-L$openssllibdir"
 		else
-			as_fn_error $? "Unable to locate libssl${SHLIB_SUFFIX}" "$LINENO" 5
+			as_fn_error $? "Unable to locate libssl${LIBEXT}" "$LINENO" 5
 		fi
 	fi
 
 
 # Check whether --with-openssl-pkgconfig was given.
@@ -9275,45 +9533,50 @@
 if test ${with_openssl_pkgconfig+y}
 then :
   withval=$with_openssl_pkgconfig;
 			opensslpkgconfigdir="$withval"
 
-else $as_nop
-
+else case e in #(
+  e)
 			if test -d ${libdir}/../pkgconfig; then
 				opensslpkgconfigdir="$libdir/../pkgconfig"
 			else
 				opensslpkgconfigdir=''
 			fi
 
-
+	 ;;
+esac
 fi
 
 	{ 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; }
 
-
-	# 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
+		USE_PKG_CONFIG=`"${PKG_CONFIG}" --list-package-names | grep openssl`
+
+		if test -n "${PKG_CONFIG}" -a -n "${USE_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}:${PKG_CONFIG_PATH}"
 			export PKG_CONFIG_PATH
 		fi
+
+		pkgConfigExtraArgs=''
+		if test "${SHARED_BUILD}" == "0" -o "$TCLEXT_TLS_STATIC_SSL" == 'yes'; then
+			pkgConfigExtraArgs='--static'
+		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
+			TCLTLS_SSL_LIBS="$SSL_LIBS_PATH `${PKG_CONFIG} openssl --libs $pkgConfigExtraArgs`" || as_fn_error $? "Unable to get OpenSSL Configuration" "$LINENO" 5
+			if test "${TCLEXT_TLS_STATIC_SSL}" == 'yes'; then
+				TCLTLS_SSL_LIBS="-Wl,-Bstatic $TCLTLS_SSL_LIBS -Wl,-Bdynamic"
+			fi
 		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
@@ -9320,21 +9583,26 @@
 			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
 
-
-		if test -z "$TCLTLS_SSL_LIBS"; then
-		TCLTLS_SSL_LIBS="-lcrypto -lssl"
-	fi
-	if test -z "$TCLTLS_SSL_CFLAGS"; then
+		if test -z "$TCLTLS_SSL_CFLAGS"; then
 		TCLTLS_SSL_CFLAGS=""
 	fi
 	if test -z "$TCLTLS_SSL_INCLUDES"; then
 		if test -f /usr/include/openssl/ssl.h; then
 			TCLTLS_SSL_INCLUDES="-I/usr/include"
 		fi
+	fi
+	if test -z "$TCLTLS_SSL_LIBS"; then
+		if test "${TCLEXT_TLS_STATIC_SSL}" == 'no'; then
+		    TCLTLS_SSL_LIBS="$SSL_LIBS_PATH -lssl -lcrypto"
+		else
+		    # Linux and Solaris
+		    TCLTLS_SSL_LIBS="$SSL_LIBS_PATH -Wl,-Bstatic -lssl -lcrypto -Wl,-Bdynamic"
+		    # HPUX: -Wl,-a,archive ... -Wl,-a,shared_archive
+		fi
 	fi
 
 
 
 
@@ -9477,12 +9745,12 @@
 # want to keep, you may remove or edit it.
 #
 # config.status only pays attention to the cache file if you give it
 # the --recheck option to rerun configure.
 #
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# 'ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* 'ac_cv_foo' will be assigned the
 # following values.
 
 _ACEOF
 
 # The following way of writing the cache mishandles newlines in values,
@@ -9508,18 +9776,18 @@
   done
 
   (set) 2>&1 |
     case $as_nl`(ac_space=' '; set) 2>&1` in #(
     *${as_nl}ac_space=\ *)
-      # `set' does not quote correctly, so add quotes: double-quote
+      # 'set' does not quote correctly, so add quotes: double-quote
       # substitution turns \\\\ into \\, and sed turns \\ into \.
       sed -n \
 	"s/'/'\\\\''/g;
 	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
       ;; #(
     *)
-      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      # 'set' quotes correctly as required by POSIX, so do not add quotes.
       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
       ;;
     esac |
     sort
 ) |
@@ -9579,13 +9847,11 @@
 t quote
 s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
 t quote
 b any
 :quote
-s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
-s/\[/\\&/g
-s/\]/\\&/g
+s/[][	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
 s/\$/$$/g
 H
 :any
 ${
 	g
@@ -9642,25 +9908,25 @@
 ## M4sh Initialization. ##
 ## -------------------- ##
 
 # Be more Bourne compatible
 DUALCASE=1; export DUALCASE # for MKS sh
-as_nop=:
 if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
 then :
   emulate sh
   NULLCMD=:
   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
   # is contrary to our usage.  Disable this feature.
   alias -g '${1+"$@"}'='"$@"'
   setopt NO_GLOB_SUBST
-else $as_nop
-  case `(set -o) 2>/dev/null` in #(
+else case e in #(
+  e) case `(set -o) 2>/dev/null` in #(
   *posix*) :
     set -o posix ;; #(
   *) :
      ;;
+esac ;;
 esac
 fi
 
 
 
@@ -9728,11 +9994,11 @@
   done
 IFS=$as_save_IFS
 
      ;;
 esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
+# We did not find ourselves, most probably we were run as 'sh COMMAND'
 # in which case we are not to be found in the path.
 if test "x$as_myself" = x; then
   as_myself=$0
 fi
 if test ! -f "$as_myself"; then
@@ -9755,11 +10021,10 @@
     printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
   fi
   printf "%s\n" "$as_me: error: $2" >&2
   as_fn_exit $as_status
 } # as_fn_error
-
 
 
 # as_fn_set_status STATUS
 # -----------------------
 # Set $? to STATUS, without forking.
@@ -9797,15 +10062,16 @@
 then :
   eval 'as_fn_append ()
   {
     eval $1+=\$2
   }'
-else $as_nop
-  as_fn_append ()
+else case e in #(
+  e) as_fn_append ()
   {
     eval $1=\$$1\$2
-  }
+  } ;;
+esac
 fi # as_fn_append
 
 # as_fn_arith ARG...
 # ------------------
 # Perform arithmetic evaluation on the ARGs, and store the result in the
@@ -9815,15 +10081,16 @@
 then :
   eval 'as_fn_arith ()
   {
     as_val=$(( $* ))
   }'
-else $as_nop
-  as_fn_arith ()
+else case e in #(
+  e) as_fn_arith ()
   {
     as_val=`expr "$@" || test $? -eq 1`
-  }
+  } ;;
+esac
 fi # as_fn_arith
 
 
 if expr a : '\(a\)' >/dev/null 2>&1 &&
    test "X`expr 00001 : '.*\(...\)'`" = X001; then
@@ -9902,13 +10169,13 @@
 fi
 if (echo >conf$$.file) 2>/dev/null; then
   if ln -s conf$$.file conf$$ 2>/dev/null; then
     as_ln_s='ln -s'
     # ... but there are two gotchas:
-    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
-    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -pR'.
+    # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable.
+    # In both cases, we have to default to 'cp -pR'.
     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
       as_ln_s='cp -pR'
   elif ln conf$$.file conf$$ 2>/dev/null; then
     as_ln_s=ln
   else
@@ -9985,14 +10252,16 @@
 } # as_fn_executable_p
 as_test_x='test -x'
 as_executable_p=as_fn_executable_p
 
 # Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated
 
 # Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+as_tr_sh="eval sed '$as_sed_sh'" # deprecated
 
 
 exec 6>&1
 ## ----------------------------------- ##
 ## Main body of $CONFIG_STATUS script. ##
@@ -10004,11 +10273,11 @@
 # Save the log message, to keep $0 and so on meaningful, and to
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
 This file was extended by tls $as_me 1.8.0, which was
-generated by GNU Autoconf 2.71.  Invocation command line was
+generated by GNU Autoconf 2.72.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
   CONFIG_LINKS    = $CONFIG_LINKS
   CONFIG_COMMANDS = $CONFIG_COMMANDS
@@ -10031,11 +10300,11 @@
 
 _ACEOF
 
 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 ac_cs_usage="\
-\`$as_me' instantiates files and other configuration actions
+'$as_me' instantiates files and other configuration actions
 from templates according to the current configuration.  Unless the files
 and actions are specified as TAGs, all are instantiated by default.
 
 Usage: $0 [OPTION]... [TAG]...
 
@@ -10059,14 +10328,14 @@
 ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config='$ac_cs_config_escaped'
 ac_cs_version="\\
 tls config.status 1.8.0
-configured by $0, generated by GNU Autoconf 2.71,
+configured by $0, generated by GNU Autoconf 2.72,
   with options \\"\$ac_cs_config\\"
 
-Copyright (C) 2021 Free Software Foundation, Inc.
+Copyright (C) 2023 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
 
 ac_pwd='$ac_pwd'
 srcdir='$srcdir'
@@ -10119,12 +10388,12 @@
   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
   | -silent | --silent | --silen | --sile | --sil | --si | --s)
     ac_cs_silent=: ;;
 
   # This is an error.
-  -*) as_fn_error $? "unrecognized option: \`$1'
-Try \`$0 --help' for more information." ;;
+  -*) as_fn_error $? "unrecognized option: '$1'
+Try '$0 --help' for more information." ;;
 
   *) as_fn_append ac_config_targets " $1"
      ac_need_defaults=false ;;
 
   esac
@@ -10171,11 +10440,11 @@
 do
   case $ac_config_target in
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
     "pkgIndex.tcl") CONFIG_FILES="$CONFIG_FILES pkgIndex.tcl" ;;
 
-  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+  *) as_fn_error $? "invalid argument: '$ac_config_target'" "$LINENO" 5;;
   esac
 done
 
 
 # If the user did not use the arguments to specify the items to instantiate,
@@ -10189,11 +10458,11 @@
 # Have a temporary directory for convenience.  Make it in the build tree
 # simply because there is no reason against having it here, and in addition,
 # creating and moving files from /tmp can sometimes cause problems.
 # Hook for its removal unless debugging.
 # Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
+# after its creation but before its name has been assigned to '$tmp'.
 $debug ||
 {
   tmp= ac_tmp=
   trap 'exit_status=$?
   : "${ac_tmp:=$tmp}"
@@ -10213,11 +10482,11 @@
 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
 ac_tmp=$tmp
 
 # Set up the scripts for CONFIG_FILES section.
 # No need to generate them if there are no CONFIG_FILES.
-# This happens for instance with `./config.status config.h'.
+# This happens for instance with './config.status config.h'.
 if test -n "$CONFIG_FILES"; then
 
 
 ac_cr=`echo X | tr X '\015'`
 # On cygwin, bash can eat \r inside `` if the user requested igncr.
@@ -10379,11 +10648,11 @@
   case $ac_tag in
   :[FHLC]) ac_mode=$ac_tag; continue;;
   esac
   case $ac_mode$ac_tag in
   :[FHL]*:*);;
-  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+  :L* | :C*:*) as_fn_error $? "invalid tag '$ac_tag'" "$LINENO" 5;;
   :[FH]-) ac_tag=-:-;;
   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
   esac
   ac_save_IFS=$IFS
   IFS=:
@@ -10401,23 +10670,23 @@
     do
       case $ac_f in
       -) ac_f="$ac_tmp/stdin";;
       *) # Look for the file first in the build tree, then in the source tree
 	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
-	 # because $ac_f cannot contain `:'.
+	 # because $ac_f cannot contain ':'.
 	 test -f "$ac_f" ||
 	   case $ac_f in
 	   [\\/$]*) false;;
 	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
 	   esac ||
-	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+	   as_fn_error 1 "cannot find input file: '$ac_f'" "$LINENO" 5;;
       esac
       case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
       as_fn_append ac_file_inputs " '$ac_f'"
     done
 
-    # Let's still pretend it is `configure' which instantiates (i.e., don't
+    # Let's still pretend it is 'configure' which instantiates (i.e., don't
     # use $as_me), people would be surprised to read:
     #    /* config.h.  Generated by config.status.  */
     configure_input='Generated from '`
 	  printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
 	`' by configure.'
@@ -10537,11 +10806,11 @@
   s&@mandir@&$mandir&g
   s&\\\${datarootdir}&$datarootdir&g' ;;
 esac
 _ACEOF
 
-# Neutralize VPATH when `$srcdir' = `.'.
+# Neutralize VPATH when '$srcdir' = '.'.
 # Shell code in configure.ac might set extrasub.
 # FIXME: do we really want to maintain this feature?
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_sed_extra="$ac_vpsub
 $extrasub
@@ -10566,13 +10835,13 @@
 
 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
   { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
       "$ac_tmp/out"`; test -z "$ac_out"; } &&
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable 'datarootdir'
 which seems to be undefined.  Please make sure it is defined" >&5
-printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable 'datarootdir'
 which seems to be undefined.  Please make sure it is defined" >&2;}
 
   rm -f "$ac_tmp/stdin"
   case $ac_file in
   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;

Index: configure.ac
==================================================================
--- configure.ac
+++ configure.ac
@@ -1,19 +1,16 @@
 #!/bin/bash -norc
 dnl	This file is an input file used by the GNU "autoconf" program to
 dnl	generate the file "configure", which is run during Tcl installation
 dnl	to configure the system for the local environment.
 
-#
 #-----------------------------------------------------------------------
 # This is the configure.ac for the TclTLS extension.  The only places you
 # should need to modify this file are marked by the string __CHANGE__.
 #-----------------------------------------------------------------------
 
 #-----------------------------------------------------------------------
-# Set your package name and version numbers here.
-#
 # This initializes the environment with PACKAGE_NAME and PACKAGE_VERSION
 # set as provided.  These will also be added as -D defs in your Makefile
 # so you can encode the package version directly into the source files.
 # This will also define a special symbol for Windows (BUILD_<PACKAGE_NAME>
 # so that we create the export library with the dll.
@@ -60,11 +57,10 @@
 #-----------------------------------------------------------------------
 
 TEA_SETUP_COMPILER
 
 #-----------------------------------------------------------------------
-# __CHANGE__
 # Specify the C source files to compile in TEA_ADD_SOURCES,
 # public headers that need to be installed in TEA_ADD_HEADERS,
 # stub library C source files to compile in TEA_ADD_STUB_SOURCES,
 # and runtime Tcl library files in TEA_ADD_TCL_SOURCES.
 # This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS
@@ -75,30 +71,28 @@
 TEA_ADD_HEADERS([generic/tls.h])
 TEA_ADD_INCLUDES([])
 TEA_ADD_LIBS([])
 TEA_ADD_CFLAGS([])
 TEA_ADD_STUB_SOURCES([])
-TEA_ADD_TCL_SOURCES([library/tls.tcl])
+TEA_ADD_TCL_SOURCES([library/tls.tcl license.terms README.txt])
 
 #--------------------------------------------------------------------
-#
 # You can add more files to clean if your extension creates any extra
 # files by extending CLEANFILES.
 # Add pkgIndex.tcl if it is generated in the Makefile instead of ./configure
 # and change Makefile.in to move it from CONFIG_CLEAN_FILES to BINARIES var.
 #
 # 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 Makefile pkgIndex.tcl tcltls.a.linkadd tcltls.syms"
+TEA_ADD_CLEANFILES([pkgIndex.tcl generic/tls.tcl.h tlsUuid.h])
+
 if test "${TEA_PLATFORM}" = "windows" ; then
-    AC_DEFINE(BUILD_tls)
-    AC_DEFINE(WINDOWS)
-    CLEANFILES="pkgIndex.tcl *.lib *.dll *.exp *.ilk *.pdb vc*.pch"
+    TEA_ADD_CLEANFILES([*.lib *.dll *.exp *.ilk *.pdb vc*.pch])
 else
-    CLEANFILES="pkgIndex.tcl *.so"
+    TEA_ADD_CLEANFILES([*.so])
 fi
 AC_SUBST(CLEANFILES)
 
 #--------------------------------------------------------------------
 # Choose which headers you need.  Extension authors should try very

Index: doc/tls.html
==================================================================
--- doc/tls.html
+++ doc/tls.html
@@ -7,37 +7,37 @@
 <link rel="stylesheet" href="docs.css" type="text/css" media="all">
 </head>
 
 <body class="vsc-initialized">
 
-<h2>Tcl Tls Extension Documentation</h2>
+<h2>TCL Tls Extension Documentation</h2>
 
 <dl>
     <dd><a href="#NAME">NAME</a>
     <dl>
 	<dd><b>tls</b> - binding to <b>OpenSSL</b> library
-	for socket and I/O channel communications.</dd>
+	for encrypted socket and I/O channel communications.</dd>
     </dl>
     </dd>
     <dd><a href="#SYNOPSIS">SYNOPSIS</a> </dd>
     <dd><dl>
-	    <dd><b>package require Tcl</b> <em>?<b>8.5</b>?</em></dd>
-	    <dd><b>package require tls</b></dd>
-	    <dt>&nbsp;</dt>
-	    <dd><b>tls::init</b> <em>?options?</em> </dd>
-	    <dd><b>tls::socket</b> <em>?options? host port</em></dd>
-	    <dd><b>tls::socket</b> <em>?-server command? ?options? port</em></dd>
-	    <dd><b>tls::handshake</b> <em> channel</em></dd>
-	    <dd><b>tls::status</b> <em>?-local? channel</em></dd>
-	    <dd><b>tls::connection</b> <em>channel</em></dd>
-	    <dd><b>tls::import</b> <em>channel ?options?</em></dd>
-	    <dd><b>tls::unimport</b> <em>channel</em></dd>
-	    <dt>&nbsp;</dt>
-	    <dd><b>tls::protocols</b></dd>
-	    <dd><b>tls::version</b></dd>
-	</dl>
-    </dd>
+	<dd><b>package require Tcl</b> <em>?<b>8.5-</b>?</em></dd>
+	<dd><b>package require tls</b> <em>?<b>1.8-</b>?</em></dd>
+	<dt>&nbsp;</dt>
+	<dd><b>tls::init</b> <em>?options?</em> </dd>
+	<dd><b>tls::socket</b> <em>?options? host port</em></dd>
+	<dd><b>tls::socket</b> <em>?-server command? ?options? port</em></dd>
+	<dd><b>tls::handshake</b> <em> channel</em></dd>
+	<dd><b>tls::status</b> <em>?-local? channel</em></dd>
+	<dd><b>tls::connection</b> <em>channel</em></dd>
+	<dd><b>tls::import</b> <em>channel ?options?</em></dd>
+	<dd><b>tls::unimport</b> <em>channel</em></dd>
+	<dt>&nbsp;</dt>
+	<dd><b>tls::ciphers</b> <em>?protocol? ?verbose? ?supported?</em></dd>
+	<dd><b>tls::protocols</b></dd>
+	<dd><b>tls::version</b></dd>
+    </dl></dd>
     <dd><a href="#COMMANDS">COMMANDS</a></dd>
     <dd><a href="#CALLBACK OPTIONS">CALLBACK OPTIONS</a></dd>
     <dd><a href="#HTTPS EXAMPLE">HTTPS EXAMPLE</a></dd>
     <dd><a href="#SEE ALSO">SPECIAL CONSIDERATIONS</a></dd>
     <dd><a href="#SEE ALSO">SEE ALSO</a></dd>
@@ -46,16 +46,18 @@
 <hr>
 
 <h3><a name="NAME">NAME</a></h3>
 
 <p><strong>tls</strong> - binding to <strong>OpenSSL</strong> library
-for socket and I/O channel communications.</p>
+for encrypted socket and I/O channel communications.</p>
+
+<hr>
 
 <h3><a name="SYNOPSIS">SYNOPSIS</a></h3>
 
-<p><b>package require Tcl</b> <em>?<b>8.5</b>?</em><br>
-<b>package require tls</b><br>
+<p><b>package require Tcl</b> <em>?<b>8.5-</b>?</em><br>
+<b>package require tls</b> <em>?<b>1.8-</b>?</em><br>
 <br>
 <a href="#tls::init"><b>tls::init</b> <i>?options?</i></a><br>
 <a href="#tls::socket"><b>tls::socket</b> <i>?options? host port</i><br>
 <a href="#tls::socket"><b>tls::socket</b> <i>?-server command? ?options? port</i></a><br>
 <a href="#tls::status"><b>tls::status</b> <i>?-local? channel</i></a><br>
@@ -62,149 +64,140 @@
 <a href="#tls::connection"><b>tls::connection</b> <i>channel</i></a><br>
 <a href="#tls::handshake"><b>tls::handshake</b> <i>channel</i></a><br>
 <a href="#tls::import"><b>tls::import</b> <i>channel ?options?</i></a><br>
 <a href="#tls::unimport"><b>tls::unimport</b> <i>channel</i></a><br>
 <br>
+<a href="#tls::ciphers"><b>tls::ciphers</b> <i>?protocol? ?verbose? ?supported?</i></a><br>
 <a href="#tls::protocols"><b>tls::protocols</b></a><br>
 <a href="#tls::version"><b>tls::version</b></a><br>
 </p>
+
+<hr>
 
 <h3><a name="DESCRIPTION">DESCRIPTION</a></h3>
 
 <p>This extension provides TCL script access to secure socket communications
 using the Transport Layer Security (TLS) protocol. It provides a generic
-binding to <a href="http://www.openssl.org/">OpenSSL</a>, utilizing the
-<strong>Tcl_StackChannel</strong> API in Tcl 8.4 and higher.
+binding to <a href="https://www.openssl.org/">OpenSSL</a>, utilizing the
+<strong>Tcl_StackChannel</strong> API in TCL 8.4 and higher.
 These sockets behave exactly the same as channels created using the built-in
 <strong>socket</strong> command, along with additional options for controlling
-the SSL session.
+the SSL/TLS session.
 </p>
+
+<hr>
 
 <h3><a name="COMMANDS">COMMANDS</a></h3>
 
 <p>Typically one would use the <strong>tls::socket </strong>command
-which provides compatibility with the native Tcl <strong>socket</strong>
+which provides compatibility with the native TCL <strong>socket</strong>
 command. In such cases <strong>tls::import</strong> should not be
 used directly.</p>
-
 <dl>
     <dt><a name="tls::init"><b>tls::init </b><i>?options?</i></a></dt>
     <dd>Optional function to set the default options used by
 	<strong>tls::socket</strong>. If you call <strong>tls::import</strong>
-	directly this routine has no effect. Any of the options
-	that <strong>tls::socket</strong> accepts can be set
-	using this command, though you should limit your options
-	to only TLS related ones.</dd>
+	directly, this command has no effect. This command supports all of the
+	same options as the <strong>tls::socket</strong> command, though you
+	should limit your options to only TLS related ones.</dd>
     <dt>&nbsp;</dt>
     <dt><a name="tls::socket"><b>tls::socket </b><em>?options?
 	host port</em></a></dt>
     <dt><b>tls::socket</b><em> ?-server command? ?options? port</em></dt>
-    <dd>This is a helper function that utilizes the underlying
-	commands (<strong>tls::import</strong>). It behaves
-	exactly the same as the native Tcl <strong>socket</strong>
-	command except the options can also include any of the
-	applicable <a href="#tls::import"><strong>tls:import</strong></a>
-	options with one additional option:</dd>
-<blockquote>
-    <dl>
+    <dd>This is a helper function that utilizes the underlying commands
+	(<strong>socket</strong> and <strong>tls::import</strong>) to create
+	the connection. It behaves the same as the native TCL <strong>socket</strong>
+	command, but also supports the <a href="#tls::import"><strong>tls:import</strong></a>
+	command options and one additional option:</dd>
+    <dl><blockquote>
 	<dt><strong>-autoservername</strong> <em>bool</em></dt>
 	<dd>Automatically set the -servername argument to the <em>host</em>
-	    argument (default is <em>false</em>).</dd>
-    </dl>
-</blockquote>
+	argument (default is <em>false</em>).</dd>
+    </blockquote></dl>
 
     <dt><a name="tls::import"><b>tls::import </b><i>channel
 	?options?</i></a></dt>
-    <dd>Add SSL/TLS encryption to a regular Tcl channel. It need
+    <dd>Add SSL/TLS encryption to a regular TCL channel. It need
 	not be a socket, but must provide bi-directional flow. Also
 	set session parameters for SSL handshake.</dd>
-
-<blockquote>
-    <dl>
+    <dl><blockquote>
 	<dt><strong>-alpn</strong> <em>list</em></dt>
 	<dd>List of protocols to offer during Application-Layer
 	    Protocol Negotiation (ALPN). For example: <em>h2</em> and
 	    <em>http/1.1</em>, but not <em>h3</em> or <em>quic</em>.</dd>
 	<dt><strong>-cadir</strong> <em>dir</em></dt>
-	<dd>Set the CA certificates path. The default directory is platform
-	    specific and can be set at compile time. This can be overridden
-	    via the <b>SSL_CERT_DIR</b> environment variable.</dd>
+	<dd>Specifies the directory where the Certificate Authority (CA)
+	    certificates are stored. The default is platform specific and can be
+	    set at compile time. This can be overridden via the <b>SSL_CERT_DIR</b>
+	    environment variable.</dd>
 	<dt><strong>-cafile </strong><em>filename</em></dt>
-	<dd>Set the certificate authority (CA) certificates file. The default
-	    is the cert.pem file in the OpsnSSL directory. This can also be
-	    overridden via the <b>SSL_CERT_FILE</b> environment variable.</dd>
+	<dd>Specifies the file with the Certificate Authority (CA) certificates
+	    to use. The default is <b>cert.pem</b>, in the OpenSSL directory. This can
+	    also be overridden via the <b>SSL_CERT_FILE</b> environment variable.</dd>
 	<dt><strong>-certfile</strong> <em>filename</em></dt>
-	<dd>Specify the filename with the certificate to use.</dd>
-	<dt><strong>-cert</strong> <em>filename</em></dt>
-	<dd>Specify the contents of a certificate to use, as a DER
-	    encoded binary value (X.509 DER).</dd>
+	<dd>Specifies the file with the certificate to use in PEM format.
+	    This also contains the public key.</dd>
+	<dt><strong>-cert</strong> <em>binary_string</em></dt>
+	<dd>Specifies the certificate to use as a DER encoded string (X.509 DER).</dd>
 	<dt><strong>-cipher</strong> <em>string</em></dt>
-	<dd>List of ciphers to use. String is a colon (":") separated list
-	    of ciphers. Ciphers can be combined
-	    using the <b>+</b> character. Prefixes can be used to permanently
-	    remove ("!"), delete ("-"), or move a cypher to the end of
-	    the list ("+"). Keywords <b>@STRENGTH</b> (sort by algorithm
-	    key length), <b>@SECLEVEL=</b><i>n</i> (set security level to
-	    n), and <b>DEFAULT</b> (use default cipher list, at start only)
-	    can also be specified. See OpenSSL documentation for the full
-	    list of valid values. (TLS 1.2 and earlier only)</dd>
+	<dd>Specifies the list of ciphers to use for TLS 1.2 and earlier. String is a
+	    colon (":") separated list of ciphers. Ciphers can be combined using the
+	    <b>+</b> character. Prefixes can be used to permanently remove ("!"),
+	    delete ("-"), or move a cipher to the end of the list ("+"). Keywords
+	    <b>@STRENGTH</b> (sort by algorithm key length), <b>@SECLEVEL=</b><i>n</i>
+	    (set security level to n), and <b>DEFAULT</b> (use default cipher list,
+	    at start only) can also be specified. See OpenSSL documentation for the
+	    full list of valid values.</dd>
 	<dt><strong>-ciphersuites</strong> <em>string</em></dt>
-	<dd>List of cipher suites to use. String is a colon (":")
-	    separated list of cipher suite names. (TLS 1.3 only)</dd>
+	<dd>Specifies the list of cipher suites to use for TLS 1.3. String is a colon
+	    (":") separated list of cipher suite names.</dd>
 	<dt><strong>-command</strong> <em>callback</em></dt>
-	<dd>Callback command to invoke at several points during the handshake.
-	    This is used to pass errors and tracing information, and
-	    it can allow Tcl scripts to perform their own certificate
-	    validation in place of the default validation provided by
-	    OpenSSL. See <a href="#CALLBACK OPTIONS">CALLBACK OPTIONS</a>
-	    for further discussion.</dd>
+	<dd>Specifies the callback command to be invoked at several points during the
+	    handshake to pass errors, tracing information, and protocol messages.
+	    See <a href="#CALLBACK OPTIONS">CALLBACK OPTIONS</a> for more info.</dd>
 	<dt><strong>-dhparams </strong><em>filename</em></dt>
-	<dd>Specify the Diffie-Hellman parameters file.</dd>
+	<dd>Specifies the Diffie-Hellman (DH) parameters file.</dd>
 	<dt><strong>-keyfile</strong> <em>filename</em></dt>
-	<dd>Specify the private key file. (default is
-	    value of -certfile)</dd>
+	<dd>Specifies the private key file. (default is value of -certfile).</dd>
 	<dt><strong>-key</strong> <em>filename</em></dt>
-	<dd>Specify the private key to use as a DER encoded value (PKCS#1 DER)</dd>
+	<dd>Specifies the private key to use as a DER encoded string (PKCS#1 DER).</dd>
 	<dt><strong>-model</strong> <em>channel</em></dt>
 	<dd>Force this channel to share the same <em><strong>SSL_CTX</strong></em>
 	    structure as the specified <em>channel</em>, and
 	    therefore share callbacks etc.</dd>
 	<dt><strong>-password</strong> <em>callback</em></dt>
-	<dd>Callback command to invoke when OpenSSL needs to obtain a password.
-	    Typically used to unlock the private key of a certificate. The
-	    callback should return a string which represents the password
-	    to be used. See <a href="#CALLBACK OPTIONS">CALLBACK OPTIONS</a>
-	    for further discussion.</dd>
+	<dd>Specifies the callback command to invoke when OpenSSL needs to
+	    obtain a password. This is typically used to unlock the private key of
+	    a certificate. The callback should return a password string.
+	    See <a href="#CALLBACK OPTIONS">CALLBACK OPTIONS</a> for more info.</dd>
 	<dt><strong>-post_handshake</strong> <em>bool</em></dt>
-	<dd>Allow post-handshake ticket updates.</dd>
+	<dd>Allow post-handshake session ticket updates.</dd>
 	<dt><strong>-request </strong><em>bool</em></dt>
-	<dd>Request a certificate from peer during SSL handshake.
-	    (default is <em>true</em>)</dd>
+	<dd>Request a certificate from peer during the SSL handshake. This is
+	    needed to do certificate validation. (default is <em>true</em>)</dd>
 	<dt><strong>-require</strong> <em>bool</em></dt>
-	<dd>Require a valid certificate from peer during SSL handshake.
-	    If this is set to true, then <strong>-request</strong> must
-	    also be set to true and a either a -cadir, -cafile, or platform
-	    default must be provided in order to validate against.
-	    (default is <em>false</em>)</dd>
+	<dd>Require a valid certificate from peer during SSL handshake. If this
+	    is set to true, then <strong>-request</strong> must also be set to true
+	    and a either a -cadir, -cafile, or platform default must be provided in
+	    order to validate against. (default is <em>false</em>)</dd>
 	<dt><strong>-security_level</strong> <em>integer</em></dt>
-	<dd>Set security level. Must be 0 to 5. The security level affects
-	    the cipher suite encryption algorithms, supported ECC curves,
-	    supported signature algorithms, DH parameter sizes, certificate
-	    key sizes and signature algorithms. The default is 1.
-	    Level 3 and higher disable support for session tickets and only
-	    accept cipher suites that provide forward secrecy.</dd>
+	<dd>Specifies the security level (value from 0 to 5). The security level
+	    affects the cipher suite encryption algorithms, supported ECC curves,
+	    supported signature algorithms, DH parameter sizes, certificate key
+	    sizes and signature algorithms. The default is 1. Level 3 and higher
+	    disable support for session tickets and only accept cipher suites that
+	    provide forward secrecy.</dd>
 	<dt><strong>-server</strong> <em>bool</em></dt>
-	<dd>Set to act as a server and respond with a server handshake when
-	    a client connects and provides a client handshake.
+	<dd>Specifies whether to act as a server and respond with a server
+	    handshake when a client connects and provides a client handshake.
 	    (default is <em>false</em>)</dd>
 	<dt><strong>-servername</strong> <em>host</em></dt>
-	<dd>Specify server's hostname. Used to set the TLS 'Server Name
-	    Indication' (SNI) extension. Set to the expected servername
-	    in the server's certificate or one of the subjectAltName
-	    alternates.</dd>
+	<dd>Specify server's hostname. This is used to set the TLS Server Name
+	    Indication (SNI) extension. Set this to the expected servername in the
+	   server's certificate or one of the subjectAltName alternates.</dd>
 	<dt><strong>-session_id</strong> <em>string</em></dt>
-	<dd>Session id to resume session.</dd>
+	<dd>Specifies the session id to resume session.</dd>
 	<dt><strong>-ssl2</strong> <em>bool</em></dt>
 	<dd>Enable use of SSL v2. (default is <em>false</em>)</dd>
 	<dt><strong>-ssl3 </strong><em>bool</em></dt>
 	<dd>Enable use of SSL v3. (default is <em>false</em>)</dd>
 	<dt>-<strong>tls1</strong> <em>bool</em></dt>
@@ -214,44 +207,44 @@
 	<dt>-<strong>tls1.2</strong> <em>bool</em></dt>
 	<dd>Enable use of TLS v1.2 (default is <em>true</em>)</dd>
 	<dt>-<strong>tls1.3</strong> <em>bool</em></dt>
 	<dd>Enable use of TLS v1.3 (default is <em>true</em>)</dd>
 	<dt><strong>-validatecommand</strong> <em>callback</em></dt>
-	<dd>Callback command to invoke to verify or validate protocol config
-	    parameters during the protocol negotiation phase. See
-	    <a href="#CALLBACK OPTIONS">CALLBACK OPTIONS</a>
-	    for further discussion.</dd>
-    </dl>
-</blockquote>
-
+	<dd>Specifies the callback command to invoke to validate protocol
+	    config parameters during the protocol negotiation phase. This can be
+	    used by TCL scripts to perform their own certificate validation to
+	    supplement the default validation provided by OpenSSL. The script must
+	    return a boolean true to continue the negotiation. See
+	    <a href="#CALLBACK OPTIONS">CALLBACK OPTIONS</a> for more info.</dd>
+    </blockquote></dl>
     <dt><a name="tls::unimport"><b>tls::unimport </b><i>channel</i></a></dt>
     <dd>Provided for symmetry to <strong>tls::import</strong>, this
-      unstacks the encryption of a regular Tcl channel. An error
-      is thrown if TLS is not the top stacked channel type.</dd>
+	unstacks the encryption of a regular TCL channel. An error
+	is thrown if TLS is not the top stacked channel type.</dd>
     <dt>&nbsp;</dt>
     <dt><a name="tls::handshake"><strong>tls::handshake</strong>
 	<em>channel</em></a></dt>
     <dd>Forces handshake to take place, and returns 0 if
 	handshake is still in progress (non-blocking), or 1 if
 	the handshake was successful. If the handshake failed
 	this routine will throw an error.</dd>
     <dt>&nbsp;</dt>
     <dt><a name="tls::status"><strong>tls::status</strong>
-    <em>?</em><b>-local</b><em>? channel</em></a></dt>
+	<em>?</em><b>-local</b><em>? channel</em></a></dt>
     <dd>Returns the current status of an SSL channel. The result is a list
 	of key-value pairs describing the SSL, certificate, and certificate
 	verification status. If the SSL handshake has not yet completed,
 	an empty list is returned. If <b>-local</b> is specified, then the
 	local certificate is used.</dd>
-<blockquote>
-	<b>SSL Status</b>
+    <blockquote>
+    <b>SSL Status</b>
     <dl>
 	<dt><strong>alpn</strong> <em>protocol</em></dt>
 	<dd>The protocol selected after Application-Layer Protocol
 	    Negotiation (ALPN).</dd>
 	<dt><strong>cipher</strong> <em>cipher</em></dt>
-	<dd>The current cipher in use between for the channel.</dd>
+	<dd>The current cipher in use for the session.</dd>
 	<dt><strong>peername</strong> <em>name</em></dt>
 	<dd>The peername from the certificate.</dd>
 	<dt><strong>protocol</strong> <em>version</em></dt>
 	<dd>The protocol version used for the connection:
 	    SSL2, SSL3, TLS1, TLS1.1, TLS1.2, TLS1.3, or unknown.</dd>
@@ -269,38 +262,34 @@
 	<dt><strong>verifyResult</strong> <em>result</em></dt>
 	<dd>Certificate verification result.</dd>
 	<dt><strong>ca_names</strong> <em>list</em></dt>
 	<dd>List of the Certificate Authorities used to create the certificate.</dd>
     </dl>
-</blockquote>
-<blockquote>
-	<b>Certificate Status</b>
+    <b>Certificate Status</b>
     <dl>
 	<dt><strong>all</strong> <em>string</em></dt>
 	<dd>Dump of all certificate info.</dd>
-
 	<dt><strong>version</strong> <em>value</em></dt>
 	<dd>The certificate version.</dd>
 	<dt><strong>serialNumber</strong> <em>n</em></dt>
 	<dd>The serial number of the certificate as a hex string.</dd>
 	<dt><strong>signature</strong> <em>algorithm</em></dt>
 	<dd>Cipher algorithm used for certificate signature.</dd>
 	<dt><strong>issuer</strong> <em>dn</em></dt>
 	<dd>The distinguished name (DN) of the certificate issuer.</dd>
 	<dt><strong>notBefore</strong> <em>date</em></dt>
-	<dd>The begin date for the validity of the certificate.</dd>
+	<dd>The beginning date of the certificate validity.</dd>
 	<dt><strong>notAfter</strong> <em>date</em></dt>
-	<dd>The expiration date for the certificate.</dd>
+	<dd>The expiration date of the certificate validity.</dd>
 	<dt><strong>subject</strong> <em>dn</em></dt>
 	<dd>The distinguished name (DN) of the certificate subject.
 	    Fields include: Common Name (CN), Organization (O), Locality
 	    or City (L), State or Province (S), and Country Name (C).</dd>
 	<dt><strong>issuerUniqueID</strong> <em>string</em></dt>
 	<dd>The issuer unique id.</dd>
 	<dt><strong>subjectUniqueID</strong> <em>string</em></dt>
 	<dd>The subject unique id.</dd>
-
 	<dt><strong>num_extensions</strong> <em>n</em></dt>
 	<dd>Number of certificate extensions.</dd>
 	<dt><strong>extensions</strong> <em>list</em></dt>
 	<dd>List of certificate extension names.</dd>
 	<dt><strong>authorityKeyIdentifier</strong> <em>string</em></dt>
@@ -307,21 +296,19 @@
 	<dd>(AKI) Key identifier of the Issuing CA certificate that signed
 	    the SSL certificate as a hex string. This value matches the SKI
 	    value of the Intermediate CA certificate.</dd>
 	<dt><strong>subjectKeyIdentifier</strong> <em>string</em></dt>
 	<dd>(SKI) Hash of the public key inside the certificate as a hex
-	   string. Used to identify certificates that contain a particular
-	   public key.</dd>
+	    string. Used to identify certificates that contain a particular
+	    public key.</dd>
 	<dt><strong>subjectAltName</strong> <em>list</em></dt>
 	<dd>List of all of the alternative domain names, sub domains,
 	    and IP addresses that are secured by the certificate.</dd>
 	<dt><strong>ocsp</strong> <em>list</em></dt>
 	<dd>List of all Online Certificate Status Protocol (OCSP) URLs.</dd>
-
 	<dt><strong>certificate</strong> <em>cert</em></dt>
 	<dd>The PEM encoded certificate.</dd>
-
 	<dt><strong>signatureAlgorithm</strong> <em>algorithm</em></dt>
 	<dd>Cipher algorithm used for the certificate signature.</dd>
 	<dt><strong>signatureValue</strong> <em>string</em></dt>
 	<dd>Certificate signature as a hex string.</dd>
 	<dt><strong>signatureDigest</strong> <em>version</em></dt>
@@ -332,24 +319,23 @@
 	<dd>Certificate signature public key as a hex string.</dd>
 	<dt><strong>bits</strong> <em>n</em></dt>
 	<dd>Number of bits used for certificate signature key.</dd>
 	<dt><strong>self_signed</strong> <em>boolean</em></dt>
 	<dd>Whether the certificate signature is self signed.</dd>
-
 	<dt><strong>sha1_hash</strong> <em>hash</em></dt>
 	<dd>The SHA1 hash of the certificate as a hex string.</dd>
 	<dt><strong>sha256_hash</strong> <em>hash</em></dt>
 	<dd>The SHA256 hash of the certificate as a hex string.</dd>
     </dl>
-</blockquote>
+    </blockquote>
 
     <dt><a name="tls::connection"><strong>tls::connection</strong>
     <em>channel</em></a></dt>
     <dd>Returns the current connection status of an SSL channel. The
 	result is a list of key-value pairs describing the connection.</dd>
-<blockquote>
-	<b>SSL Status</b>
+    <blockquote>
+    <b>SSL Status</b>
     <dl>
 	<dt><strong>state</strong> <em>state</em></dt>
 	<dd>State of the connection.</dd>
 	<dt><strong>servername</strong> <em>name</em></dt>
 	<dd>The name of the connected to server.</dd>
@@ -369,13 +355,11 @@
 	<dt><strong>expansion</strong> <em>mode</em></dt>
 	<dd>Expansion method.</dd>
 	<dt><strong>caList</strong> <em>list</em></dt>
 	<dd>List of Certificate Authorities (CA) for X.509 certificate.</dd>
     </dl>
-</blockquote>
-<blockquote>
-	<b>Cipher Info</b>
+    <b>Cipher Info</b>
     <dl>
 	<dt><strong>cipher</strong> <em>cipher</em></dt>
 	<dd>The current cipher in use for the connection.</dd>
 	<dt><strong>standard_name</strong> <em>name</em></dt>
 	<dd>The standard RFC name of cipher.</dd>
@@ -385,21 +369,19 @@
 	<dd>The number of secret bits used for cipher.</dd>
 	<dt><strong>min_version</strong> <em>version</em></dt>
 	<dd>The minimum protocol version for cipher.</dd>
 	<dt><strong>cipher_is_aead</strong> <em>boolean</em></dt>
 	<dd>Whether the cipher is Authenticated Encryption with
-	Associated Data (AEAD).</dd>
+	    Associated Data (AEAD).</dd>
 	<dt><strong>cipher_id</strong> <em>id</em></dt>
 	<dd>The OpenSSL cipher id.</dd>
 	<dt><strong>description</strong> <em>string</em></dt>
 	<dd>A text description of the cipher.</dd>
 	<dt><strong>handshake_digest</strong> <em>boolean</em></dt>
 	<dd>Digest used during handshake.</dd>
     </dl>
-</blockquote>
-<blockquote>
-	<b>Session Info</b>
+    <b>Session Info</b>
     <dl>
 	<dt><strong>alpn</strong> <em>protocol</em></dt>
 	<dd>The protocol selected after Application-Layer Protocol
 	    Negotiation (ALPN).</dd>
 	<dt><strong>resumable</strong> <em>boolean</em></dt>
@@ -419,21 +401,34 @@
 	<dt><strong>master_key</strong> <em>binary_string</em></dt>
 	<dd>Unique session master key.</dd>
 	<dt><strong>session_cache_mode</strong> <em>mode</em></dt>
 	<dd>Server cache mode (client, server, or both).</dd>
     </dl>
-</blockquote>
+    </blockquote>
 
+    <dt><a name="tls::ciphers"><strong>tls::ciphers</strong>
+	<em>?protocol? ?verbose? ?supported?</em></a></dt>
+    <dd>Without any args, returns a list of all symmetric ciphers for use
+	with the <strong>-cipher</strong> option. With <em>protocol</em>,
+	only the ciphers supported for that protocol are returned. See
+	<a href="#tls::protocols"><strong>tls::protocols</strong></a> command
+	for the supported protocols. If <em>verbose</em> is specified as true
+	then a verbose, human readable list is returned with additional
+	information on the cipher. If <em>supported</em> is specified as true,
+	then only the ciphers supported for protocol will be listed.</dd>
+    <dt>&nbsp;</dt>
     <dt><a name="tls::protocols"><strong>tls::protocols</strong></a></dt>
-    <dd>Returns a list of the supported protocols. Valid values are:
+    <dd>Returns a list of the supported SSL/TLS protocols. Valid values are:
 	<b>ssl2</b>, <b>ssl3</b>, <b>tls1</b>, <b>tls1.1</b>, <b>tls1.2</b>,
 	and <b>tls1.3</b>. Exact list depends on OpenSSL version and
 	compile time flags.</dd>
-
+    <dt>&nbsp;</dt>
     <dt><a name="tls::version"><strong>tls::version</strong></a></dt>
     <dd>Returns the OpenSSL version string.</dd>
 </dl>
+
+<hr>
 
 <h3><a name="CALLBACK OPTIONS">CALLBACK OPTIONS</a></h3>
 
 <p>
 As indicated above, individual channels can be given their own callbacks
@@ -443,251 +438,223 @@
 <strong>tls::socket</strong> or <strong>tls::import</strong>.
 If the callback generates an error, the <b>bgerror</b> command will be
 invoked with the error information.
 </p>
 
-<blockquote>
 <dl>
-
     <dt><strong>-command</strong> <em>callback</em></dt>
     <dd>
 	Invokes the specified <em>callback</em> script at several points
 	during the OpenSSL handshake and use. See below for the possible
 	arguments passed to the callback script. Values returned from the
 	callback are ignored.
-
-	<br>
-	<br>
-
-	<dl>
-
-	<dt>
-	  <strong>error</strong> <em>channelId message</em>
-	</dt>
-	<dd>
-	  This form of callback is invoked whenever an error occurs during the
-	  initial connection, handshake, or I/O operations. The <em>message</em>
-	  argument can be from the Tcl_ErrnoMsg, OpenSSL function
-	  <code>ERR_reason_error_string()</code>, or a custom message.
-	</dd>
-
-	<br>
-
-	<dt>
-	  <strong>info</strong> <em>channelId major minor message type</em>
-	</dt>
-	<dd>
-	  This form of callback is invoked by the OpenSSL function
-	  <code>SSL_set_info_callback()</code> during the initial connection
-	  and handshake operations. The <em>type</em> argument is new for
-	  TLS 1.8. The arguments are:
-	  <br>
-	  <ul>
-	  <li>Possible values for <em>major</em> are:
-	  <code>handshake, alert, connect, accept</code>.</li>
-	  <li>Possible values for <em>minor</em> are:
-	  <code>start, done, read, write, loop, exit</code>.</li>
-	  <li>The <em>message</em> argument is a descriptive string which may
-	  be generated either by <code>SSL_state_string_long()</code> or by
-	  <code>SSL_alert_desc_string_long()</code>, depending on the context.</li>
-	  <li>For alerts, the possible values for <em>type</em> are:
-	  <code>warning, fatal, and unknown</code>. For others,
-	  <code>info</code> is used.</li>
-	  </ul>
-	</dd>
-
-	<dt>
-	  <strong>message</strong> <em>channelId direction version content_type message</em>
-	</dt>
-	<dd>
-	  This form of callback is invoked by the OpenSSL function
-	  <code>SSL_set_msg_callback()</code> whenever a message is sent or
-	  received during the initial connection, handshake, or I/O operations.
-	  It is only available when OpenSSL is complied with the
-	  <em>enable-ssl-trace</em> option. Arguments are: <em>direction</em> 
-	  is <b>Sent</b> or <b>Received</b>, <em>version</em> is the protocol
-	  version, <em>content_type</em> is the message content type, and
-	  <em>message</em> is more info from the <code>SSL_trace</code> API.
-	  This callback is new for TLS 1.8.
-	</dd>
-	<br>
-
-	<dt>
-	  <strong>session</strong> <em>channelId session_id ticket lifetime</em>
-	</dt>
-	<dd>
-	  This form of callback is invoked by the OpenSSL function
-	  <code>SSL_CTX_sess_set_new_cb()</code> whenever a new session id is
-	  sent by the server during the initial connection and handshake, but
-	  can also be received later if the <b>-post_handshake</b> option is
-	  used. Arguments are: <em>session_id</em> is the current
-	  session identifier, <em>ticket</em> is the session ticket info, and
-	  <em>lifetime</em> is the the ticket lifetime in seconds.
-	  This callback is new for TLS 1.8.
-	</dd>
-	<br>
-	</dl>
-    </dd>
-
-    <br>
-
+    <br>
+    <dl>
+	<dt>
+	<strong>error</strong> <em>channelId message</em>
+	</dt>
+	<dd>
+	    This form of callback is invoked whenever an error occurs during the
+	    initial connection, handshake, or I/O operations. The <em>message</em>
+	    argument can be from the Tcl_ErrnoMsg, OpenSSL function
+	    <code>ERR_reason_error_string()</code>, or a custom message.
+	</dd>
+	<br>
+	<dt>
+	    <strong>info</strong> <em>channelId major minor message type</em>
+	</dt>
+	<dd>
+	     This form of callback is invoked by the OpenSSL function
+	    <code>SSL_set_info_callback()</code> during the initial connection
+	    and handshake operations. The <em>type</em> argument is new for
+	    TLS 1.8. The arguments are:
+	<br>
+	<ul>
+	<li>Possible values for <em>major</em> are:
+	    <code>handshake, alert, connect, accept</code>.</li>
+	<li>Possible values for <em>minor</em> are:
+	    <code>start, done, read, write, loop, exit</code>.</li>
+	<li>The <em>message</em> argument is a descriptive string which may
+	    be generated either by <code>SSL_state_string_long()</code> or by
+	    <code>SSL_alert_desc_string_long()</code>, depending on the context.</li>
+	<li>For alerts, the possible values for <em>type</em> are:
+	    <code>warning, fatal, and unknown</code>. For others,
+	    <code>info</code> is used.</li>
+	</ul>
+	</dd>
+	<dt>
+	<strong>message</strong> <em>channelId direction version content_type message</em>
+	</dt>
+	<dd>
+	    This form of callback is invoked by the OpenSSL function
+	    <code>SSL_set_msg_callback()</code> whenever a message is sent or
+	    received during the initial connection, handshake, or I/O operations.
+	    It is only available when OpenSSL is complied with the
+	    <em>enable-ssl-trace</em> option. Arguments are: <em>direction</em>
+	    is <b>Sent</b> or <b>Received</b>, <em>version</em> is the protocol
+	    version, <em>content_type</em> is the message content type, and
+	    <em>message</em> is more info from the <code>SSL_trace</code> API.
+	    This callback is new for TLS 1.8.
+	</dd>
+	<br>
+	<dt>
+	<strong>session</strong> <em>channelId session_id ticket lifetime</em>
+	</dt>
+	<dd>
+	    This form of callback is invoked by the OpenSSL function
+	    <code>SSL_CTX_sess_set_new_cb()</code> whenever a new session id is
+	    sent by the server during the initial connection and handshake, but
+	    can also be received later if the <b>-post_handshake</b> option is
+	    used. Arguments are: <em>session_id</em> is the current
+	    session identifier, <em>ticket</em> is the session ticket info, and
+	    <em>lifetime</em> is the the ticket lifetime in seconds.
+	    This callback is new for TLS 1.8.
+	</dd>
+    </dl>
+    </dd>
+</dl>
+<br>
+<dl>
     <dt><strong>-password</strong> <em>callback</em></dt>
     <dd>
 	Invokes the specified <em>callback</em> script when OpenSSL needs to
 	obtain a password. See below for the possible arguments passed to
 	the callback script. See below for valid return values.
-
 	<br>
-	<br>
-
 	<dl>
-
-	<dt>
-	  <strong>password</strong> <em>rwflag size</em>
-	</dt>
-	<dd>
-	  Invoked when loading or storing a PEM certificate with encryption.
-	  Where <em>rwflag</em> is 0 for reading/decryption or 1 for
-	  writing/encryption (can prompt user to confirm) and
-	  <em>size</em> is the max password length in bytes.
-	  The callback should return the password as a string.
-	  Both arguments are new for TLS 1.8.
-	</dd>
-    </dd>
-
-    <br>
-
-
+	    <dt>
+	    <strong>password</strong> <em>rwflag size</em>
+	    </dt>
+	    <dd>
+		Invoked when loading or storing a PEM certificate with encryption.
+		Where <em>rwflag</em> is 0 for reading/decryption or 1 for
+		writing/encryption (can prompt user to confirm) and <em>size</em> is
+		the max password length in bytes. The callback should return the
+		password as a string. Both arguments are new for TLS 1.8.
+	    </dd>
+	</dl>
+    </dd>
+</dl>
+<br>
+<dl>
     <dt><strong>-validatecommand</strong> <em>callback</em></dt>
     <dd>
 	Invokes the specified <em>callback</em> script during handshake in
 	order to validate the provided value(s). See below for the possible
 	arguments passed to the callback script. If not specified, OpenSSL
 	will accept valid certificates and extensions.
 	To reject the value and abort the connection, the callback should return 0.
 	To accept the value and continue the connection, it should return 1.
 	To reject the value, but continue the connection, it should return 2.
-
 	<br>
-	<br>
-
 	<dl>
-
-	<dt>
-	  <strong>alpn</strong> <em>channelId protocol match</em>
-	</dt>
-	<dd>
-	  For servers, this form of callback is invoked when the client ALPN
-	  extension is received. If <em>match</em> is true, <em>protocol</em>
-	  is the first <b>-alpn</b> option specified protocol common to both
-	  the client and server. If not, the first client specified protocol is
-	  used. It is called after the hello and ALPN callbacks.
-	  This callback is new for TLS 1.8.
-	</dd>
-
-	<br>
-
-	<dt>
-	  <strong>hello</strong> <em>channelId servername</em>
-	</dt>
-	<dd>
-	  For servers, this form of callback is invoked during client hello
-	  message processing. The purpose is so the server can select the
-	  appropriate certificate to present to the client, and to make other
-	  configuration adjustments relevant to that server name and its
-	  configuration. It is called before the SNI and ALPN callbacks.
-	  This callback is new for TLS 1.8.
-	</dd>
-
-	<br>
-
-	<dt>
-	  <strong>sni</strong> <em>channelId servername</em>
-	</dt>
-	<dd>
-	  For servers, this form of callback is invoked when the Server Name
-	  Indication (SNI) extension is received. The <em>servername</em>
-	  argument is the client provided server name in the <b>-servername</b>
-	  option. The purpose is so when a server supports multiple names, the
-	  right certificate can be used. It is called after the hello callback
-	  but before the ALPN callback.
-	  This callback is new for TLS 1.8.
-	</dd>
-
-	<br>
-
-	<dt>
-	  <strong>verify</strong> <em>channelId depth cert status error</em>
-	</dt>
-	<dd>
-	  This form of callback is invoked by OpenSSL when a new certificate
-	  is received from the peer. It allows the client to check the
-	  certificate verification results and choose whether to continue
-	  or not. It is called for each certificate in the certificate chain.
-	  <ul>
-	  <li>The <em>depth</em> argument is the integer depth of the
-	  certificate in the certificate chain, where 0 is the peer certificate
-	  and higher values going up to the Certificate Authority (CA).</li>
-	  <li>The <em>cert</em> argument is a list of key-value pairs similar
-	  to those returned by
-	  <a href="#tls::status"><strong>tls::status</strong></a>.</li>
-	  <li>The <em>status</em> argument is the boolean validity of the
-	  current certificate where 0 is invalid and 1 is valid.</li>
-	  <li>The <em>error</em> argument is the error message, if any, generated
-	  by <code>X509_STORE_CTX_get_error()</code>.</li>
-	  </ul>
-	</dd>
-	<br>
+	    <dt>
+		<strong>alpn</strong> <em>channelId protocol match</em>
+		</dt>
+	    <dd>
+		For servers, this form of callback is invoked when the client ALPN
+		extension is received. If <em>match</em> is true, <em>protocol</em>
+		is the first <b>-alpn</b> option specified protocol common to both
+		the client and server. If not, the first client specified protocol is
+		used. It is called after the hello and ALPN callbacks.
+		This callback is new for TLS 1.8.
+	    </dd>
+	    <br>
+	    <dt>
+		<strong>hello</strong> <em>channelId servername</em>
+	    </dt>
+	    <dd>
+		For servers, this form of callback is invoked during client hello
+		message processing. The purpose is so the server can select the
+		appropriate certificate to present to the client, and to make other
+		configuration adjustments relevant to that server name and its
+		configuration. It is called before the SNI and ALPN callbacks.
+		This callback is new for TLS 1.8.
+	    </dd>
+	    <br>
+	    <dt>
+		<strong>sni</strong> <em>channelId servername</em>
+	    </dt>
+	    <dd>
+		For servers, this form of callback is invoked when the Server Name
+		Indication (SNI) extension is received. The <em>servername</em>
+		argument is the client provided server name in the <b>-servername</b>
+		option. The purpose is so when a server supports multiple names, the
+		right certificate can be used. It is called after the hello callback
+		but before the ALPN callback.
+		This callback is new for TLS 1.8.
+	    </dd>
+	    <br>
+	    <dt>
+		<strong>verify</strong> <em>channelId depth cert status error</em>
+	    </dt>
+	    <dd>
+		This form of callback is invoked by OpenSSL when a new certificate
+		is received from the peer. It allows the client to check the
+		certificate verification results and choose whether to continue
+		or not. It is called for each certificate in the certificate chain.
+		<ul>
+		<li>The <em>depth</em> argument is the integer depth of the
+		certificate in the certificate chain, where 0 is the peer certificate
+		and higher values going up to the Certificate Authority (CA).</li>
+		<li>The <em>cert</em> argument is a list of key-value pairs similar
+		to those returned by
+		<a href="#tls::status"><strong>tls::status</strong></a>.</li>
+		<li>The <em>status</em> argument is the boolean validity of the
+		current certificate where 0 is invalid and 1 is valid.</li>
+		<li>The <em>error</em> argument is the error message, if any, generated
+		by <code>X509_STORE_CTX_get_error()</code>.</li>
+		</ul>
+	    </dd>
+	    <br>
 	</dl>
     </dd>
 </dl>
-</blockquote>
 
 <p>
 Reference implementations of these callbacks are provided in the
 distribution as <strong>tls::callback</strong>, <strong>tls::password</strong>,
-and <strong>tls::validate_command</strong> respectively.  Note that these are
-<em>sample</em> implementations only.  In a more realistic deployment
+and <strong>tls::validate_command</strong> respectively. Note that these are
+<em>sample</em> implementations only. In a more realistic deployment
 you would specify your own callback scripts on each TLS channel using the
-<strong>-command</strong>, <strong>-password</strong>, and <strong>-validate_command</strong> options.
+<strong>-command</strong>, <strong>-password</strong>, and
+<strong>-validate_command</strong> options.
 </p>
-
 <p>
 The default behavior when the <strong>-command</strong> and <strong>-validate_command</strong>
 options are not specified is for TLS to process the associated library callbacks
 internally. The default behavior when the <strong>-password</strong> option is not
 specified is for TLS to process the associated library callbacks by attempting
 to call <strong>tls::password</strong>.
 The difference between these two behaviors is a consequence of maintaining
 compatibility with earlier implementations.
 </p>
-
 <p>
 <em>
 The use of the reference callbacks <strong>tls::callback</strong>,
 <strong>tls::password</strong>, and <strong>tls::validate_command</strong>
-is not recommended.  They may be removed from future releases.
+is not recommended. They may be removed from future releases.
 </em>
 </p>
+
+<hr>
 
 <h3><a name="DEBUG">DEBUG</a></h3>
 
 TLS key logging can be enabled by setting the environment variable
 <b>SSLKEYLOGFILE</b> to the name of the file to log to. Then whenever TLS
 key material is generated or received it will be logged to the file. This
 is useful for logging key data for network logging tools to use to
 decrypt the data.
-
 <p>
 The <strong>tls::debug</strong> variable provides some additional
-control over these reference callbacks.  Its value is zero by default.
+control over these reference callbacks. Its value is zero by default.
 Higher values produce more diagnostic output, and will also force the
 verify method in <strong>tls::callback</strong> to accept the
 certificate, even when it is invalid if the <b>tls::validate_command</b>
 callback is used for the <b>-validatecommand</b> option.
 </p>
-
 <p>
 <em>
 The use of the variable <strong>tls::debug</strong> is not recommended.
 It may be removed from future releases.
 </em>
@@ -697,13 +664,12 @@
 
 <p>These examples use the default Unix platform SSL certificates. For standard
 installations, -cadir and -cafile should not be needed. If your certificates
 are in non-standard locations, update -cadir or use -cafile as needed.</p>
 <br>
-Example #1: Use HTTP package
 
-
+<p>Example #1: Use HTTP package</p>
 <pre><code>
 package require http
 package require tls
 set url "https://www.tcl.tk/"
 
@@ -722,11 +688,11 @@
 
 # Cleanup
 ::http::cleanup $token
 </code></pre>
 
-Example #2: Use raw socket
+<p>Example #2: Use raw socket</p>
 <pre><code>
 package require tls
 
 set url "www.tcl-lang.org"
 set port 443
@@ -749,19 +715,19 @@
 parray status
 parray conn
 parray chan
 </code></pre>
 
+<hr>
 
 <h3><a name="HTTPS EXAMPLE">HTTPS EXAMPLE</a></h3>
 
 <p>These examples use the default Unix platform SSL certificates. For standard
 installations, -cadir and -cafile should not be needed. If your certificates
 are in non-standard locations, update -cadir or use -cafile as needed.</p>
 
-Example #1: Get web page
-
+<p>Example #1: Get web page</p>
 <pre><code>
 package require http
 package require tls
 set url "https://www.tcl.tk/"
 
@@ -779,12 +745,11 @@
 
 # Cleanup
 ::http::cleanup $token
 </code></pre>
 
-Example #2: Download file
-
+<p>Example #2: Download file</p>
 <pre><code>
 package require http
 package require tls
 
 set url "https://wiki.tcl-lang.org/sitemap.xml"
@@ -798,23 +763,27 @@
 
 # Cleanup
 close $ch
 ::http::cleanup $token
 </code></pre>
+
+<hr>
 
 <h3><a name="SPECIAL CONSIDERATIONS">SPECIAL CONSIDERATIONS</a></h3>
 
 <p>The capabilities of this package can vary enormously based upon how the
 linked to OpenSSL library was configured and built. New versions may obsolete
 older protocol versions, add or remove ciphers, change default values, etc.
 Use the <strong>tls::protocols</strong> commands to obtain the supported
 protocol versions.</p>
+
+<hr>
 
 <h3><a name="SEE ALSO">SEE ALSO</a></h3>
 
 <p><strong>socket</strong>, <strong>fileevent</strong>, <strong>http</strong>,
-<a href="http://www.openssl.org/"><strong>OpenSSL</strong></a></p>
+<a href="https://www.openssl.org/"><strong>OpenSSL</strong></a></p>
 
 <hr>
 
 <pre>
 Copyright &copy; 1999 Matt Newman.

Index: generic/tls.c
==================================================================
--- generic/tls.c
+++ generic/tls.c
@@ -158,11 +158,11 @@
 static void
 InfoCallback(const SSL *ssl, int where, int ret) {
     State *statePtr = (State*)SSL_get_app_data((SSL *)ssl);
     Tcl_Interp *interp	= statePtr->interp;
     Tcl_Obj *cmdPtr;
-    char *major; char *minor;
+    char *major, *minor;
 
     dprintf("Called");
 
     if (statePtr->callback == (Tcl_Obj*)NULL)
 	return;
@@ -1446,12 +1446,10 @@
     statePtr->ctx = ctx;
 
     /*
      * We need to make sure that the channel works in binary (for the
      * encryption not to get goofed up).
-     * We only want to adjust the buffering in pre-v2 channels, where
-     * each channel in the stack maintained its own buffers.
      */
     Tcl_DStringInit(&upperChannelTranslation);
     Tcl_DStringInit(&upperChannelBlocking);
     Tcl_DStringInit(&upperChannelEOFChar);
     Tcl_DStringInit(&upperChannelEncoding);
@@ -1468,10 +1466,14 @@
     if (statePtr->self == (Tcl_Channel) NULL) {
 	/*
 	 * No use of Tcl_EventuallyFree because no possible Tcl_Preserve.
 	 */
 	Tls_Free((tls_free_type *) statePtr);
+	Tcl_DStringFree(&upperChannelTranslation);
+	Tcl_DStringFree(&upperChannelEncoding);
+	Tcl_DStringFree(&upperChannelEOFChar);
+	Tcl_DStringFree(&upperChannelBlocking);
 	return TCL_ERROR;
     }
 
     Tcl_SetChannelOption(interp, statePtr->self, "-translation", Tcl_DStringValue(&upperChannelTranslation));
     Tcl_SetChannelOption(interp, statePtr->self, "-encoding", Tcl_DStringValue(&upperChannelEncoding));
@@ -1700,15 +1702,12 @@
 		"\": not a TLS channel", (char *) NULL);
 	    Tcl_SetErrorCode(interp, "TLS", "UNIMPORT", "CHANNEL", "INVALID", (char *) NULL);
 	return TCL_ERROR;
     }
 
-    if (Tcl_UnstackChannel(interp, chan) == TCL_ERROR) {
-	return TCL_ERROR;
-    }
-
-    return TCL_OK;
+    /* Flush and pop channel from stack */
+    return Tcl_UnstackChannel(interp, chan);
 }
 
 /*
  *-------------------------------------------------------------------
  *
@@ -2188,17 +2187,20 @@
 	res = SSL_get_signature_nid(statePtr->ssl, &nid);
     }
     if (!res) {nid = 0;}
     LAPPEND_STR(interp, objPtr, "signatureHashAlgorithm", OBJ_nid2ln(nid), -1);
 
+    /* Added in OpenSSL 1.1.1a */
+#if OPENSSL_VERSION_NUMBER > 0x10101000L
     if (objc == 2) {
 	res = SSL_get_peer_signature_type_nid(statePtr->ssl, &nid);
     } else {
 	res = SSL_get_signature_type_nid(statePtr->ssl, &nid);
     }
     if (!res) {nid = 0;}
     LAPPEND_STR(interp, objPtr, "signatureType", OBJ_nid2ln(nid), -1);
+#endif
 
     Tcl_SetObjResult(interp, objPtr);
     return TCL_OK;
 }
 
@@ -3018,36 +3020,11 @@
     OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS | OPENSSL_INIT_LOAD_CRYPTO_STRINGS
 	| OPENSSL_INIT_ADD_ALL_CIPHERS | OPENSSL_INIT_ADD_ALL_DIGESTS, NULL);
 
     BIO_new_tcl(NULL, 0);
 
-#if 0
-    /*
-     * XXX:TODO: Remove this code and replace it with a check
-     * for enough entropy and do not try to create our own
-     * terrible entropy
-     */
-    /*
-     * Seed the random number generator in the SSL library,
-     * using the do/while construct because of the bug note in the
-     * OpenSSL FAQ at http://www.openssl.org/support/faq.html#USER1
-     *
-     * The crux of the problem is that Solaris 7 does not have a
-     * /dev/random or /dev/urandom device so it cannot gather enough
-     * entropy from the RAND_seed() when TLS initializes and refuses
-     * to go further. Earlier versions of OpenSSL carried on regardless.
-     */
-    srand((unsigned int) time((time_t *) NULL));
-    do {
-	for (i = 0; i < 16; i++) {
-	    rnd_seed[i] = 1 + (char) (255.0 * rand()/(RAND_MAX+1.0));
-	}
-	RAND_seed(rnd_seed, sizeof(rnd_seed));
-    } while (RAND_status() != 1);
-#endif
-
 #if defined(OPENSSL_THREADS) && defined(TCL_THREADS)
 	Tcl_MutexUnlock(&init_mx);
 #endif
 
     return status;
 }

Index: generic/tlsInt.h
==================================================================
--- generic/tlsInt.h
+++ generic/tlsInt.h
@@ -1,35 +1,44 @@
 /*
+ *----------------------------------------------------------------------
  * Copyright (C) 1997-2000 Matt Newman <matt@novadigm.com>
  *
- * TLS (aka SSL) Channel - can be layered on any bi-directional
- * Tcl_Channel (Note: Requires Trf Core Patch)
- *
- * This was built from scratch based upon observation of OpenSSL 0.9.2B
+ *	Macro and structure definitions
  *
  * Addition credit is due for Andreas Kupries (a.kupries@westend.com), for
  * providing the Tcl_ReplaceChannel mechanism and working closely with me
  * to enhance it to support full fileevent semantics.
  *
  * Also work done by the follow people provided the impetus to do this "right":-
  *	tclSSL (Colin McCormack, Shared Technology)
  *	SSLtcl (Peter Antman)
- *
+ *----------------------------------------------------------------------
  */
 #ifndef _TLSINT_H
 #define _TLSINT_H
+
+/* Platform unique definitions */
+#ifdef _WIN32
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#include <wincrypt.h> /* OpenSSL needs this on Windows */
+#endif
 
 #include "tls.h"
 #include <errno.h>
 #include <string.h>
 #include <stdint.h>
+#include <openssl/ssl.h>
+#include <openssl/err.h>
+#include <openssl/rand.h>
+#include <openssl/opensslv.h>
 
-#ifdef _WIN32
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#include <wincrypt.h> /* OpenSSL needs this on Windows */
-#endif
+/* Windows needs to know which symbols to export. */
+#ifdef BUILD_tls
+#undef TCL_STORAGE_CLASS
+#define TCL_STORAGE_CLASS DLLEXPORT
+#endif /* BUILD_udp */
 
 /* Handle TCL 8.6 CONST changes */
 #ifndef CONST86
 #   if TCL_MAJOR_VERSION > 8
 #	define CONST86 const
@@ -40,29 +49,32 @@
 
 /*
  * Backwards compatibility for size type change
  */
 #if TCL_MAJOR_VERSION < 9 && TCL_MINOR_VERSION < 7
+    #include <limits.h>
+    #define TCL_SIZE_MAX INT_MAX
+
     #ifndef Tcl_Size
         typedef int Tcl_Size;
     #endif
 
     #define TCL_SIZE_MODIFIER ""
+    #define Tcl_GetSizeIntFromObj Tcl_GetIntFromObj
+    #define Tcl_NewSizeIntObj     Tcl_NewIntObj
+    #define Tcl_NewSizeIntFromObj Tcl_NewWideIntObj
 #endif
 
-#include <openssl/ssl.h>
-#include <openssl/err.h>
-#include <openssl/rand.h>
-#include <openssl/opensslv.h>
-
+/* Define missing POSIX error codes */
 #ifndef ECONNABORTED
 #define ECONNABORTED	130	/* Software caused connection abort */
 #endif
 #ifndef ECONNRESET
 #define ECONNRESET	131	/* Connection reset by peer */
 #endif
 
+/* Debug and error macros */
 #ifdef TCLEXT_TCLTLS_DEBUG
 #include <ctype.h>
 #define dprintf(...) { \
 	char dprintfBuffer[8192], *dprintfBuffer_p; \
 	dprintfBuffer_p = &dprintfBuffer[0]; \

Index: pkgIndex.tcl.in
==================================================================
--- pkgIndex.tcl.in
+++ pkgIndex.tcl.in
@@ -1,25 +1,32 @@
 # -*- tcl -*-
 # Tcl package index file, version 1.1
 #
 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@]]
-    set initScript [file join $dir @PACKAGE_NAME@.tcl]
-    if {[file exists $initScript]} {
-	source -encoding utf-8 $initScript
-    }
+    package ifneeded @PACKAGE_NAME@ @PACKAGE_VERSION@ [list apply {{dir} {
+	# Load library
+	load [file join $dir @PKG_LIB_FILE9@] [string totitle @PACKAGE_NAME@]
+
+	# Source init file
+	set initScript [file join $dir @PACKAGE_NAME@.tcl]
+	if {[file exists $initScript]} {
+	    source -encoding utf-8 $initScript
+	}
+    }} $dir]
 } else {
     if {![package vsatisfies [package provide Tcl] 8.5]} {return}
     package ifneeded @PACKAGE_NAME@ @PACKAGE_VERSION@ [list apply {{dir} {
+	# Load library
 	if {[string tolower [file extension @PKG_LIB_FILE8@]] in [list .dll .dylib .so]} {
 	    # Load dynamic library
 	    load [file join $dir @PKG_LIB_FILE8@] [string totitle @PACKAGE_NAME@]
 	} else {
 	    # Static library
 	    load {} [string totitle @PACKAGE_NAME@]
 	}
+
+	# Source init file
 	set initScript [file join $dir @PACKAGE_NAME@.tcl]
 	if {[file exists $initScript]} {
 	    source -encoding utf-8 $initScript
 	}
     }} $dir]

Index: tests/ciphers.test
==================================================================
--- tests/ciphers.test
+++ tests/ciphers.test
@@ -18,11 +18,26 @@
 foreach protocol $protocols {::tcltest::testConstraint $protocol 0}
 foreach protocol [::tls::protocols] {::tcltest::testConstraint $protocol 1}
 ::tcltest::testConstraint OpenSSL [string match "OpenSSL*" [::tls::version]]
 
 # Helper functions
-proc lcompare {list1 list2} {set m "";set u "";foreach i $list1 {if {$i ni $list2} {lappend m $i}};foreach i $list2 {if {$i ni $list1} {lappend u $i}};return [list "missing" $m "unexpected" $u]}
+proc lcompare {list1 list2} {
+    set m ""
+    set u ""
+    foreach i $list1 {
+        if {$i ni $list2} {
+            lappend m $i
+        }
+    }
+    foreach i $list2 {
+        if {$i ni $list1} {
+            lappend u $i
+        }
+    }
+    return [list "missing" $m "unexpected" $u]
+}
+
 proc exec_get {delim args} {return [split [exec openssl {*}$args] $delim]}
 
 # Test protocols
 
 
@@ -31,85 +46,85 @@
     } -result {missing {ssl2 ssl3} unexpected {}}
 
 # Test ciphers
 
 
-test CiphersAll-2.1 {SSL2} -constraints {ssl2} -body {
+test Ciphers_By_Protocol-2.1 {SSL2} -constraints {ssl2} -body {
 	lcompare [exec_get ":" ciphers -ssl2] [::tls::ciphers ssl2]
     } -result {missing {} unexpected {}}
 
-test CiphersAll-2.2 {SSL3} -constraints {ssl3} -body {
+test Ciphers_By_Protocol-2.2 {SSL3} -constraints {ssl3} -body {
 	lcompare [exec_get ":" ciphers -ssl3] [::tls::ciphers ssl3]
     } -result {missing {} unexpected {}}
 
-test CiphersAll-2.3 {TLS1} -constraints {tls1} -body {
+test Ciphers_By_Protocol-2.3 {TLS1.0} -constraints {tls1} -body {
 	lcompare [exec_get ":" ciphers -tls1] [::tls::ciphers tls1]
     } -result {missing {} unexpected {}}
 
-test CiphersAll-2.4 {TLS1.1} -constraints {tls1.1} -body {
+test Ciphers_By_Protocol-2.4 {TLS1.1} -constraints {tls1.1} -body {
 	lcompare [exec_get ":" ciphers -tls1_1] [::tls::ciphers tls1.1]
     } -result {missing {} unexpected {}}
 
-test CiphersAll-2.5 {TLS1.2} -constraints {tls1.2} -body {
+test Ciphers_By_Protocol-2.5 {TLS1.2} -constraints {tls1.2} -body {
 	lcompare [exec_get ":" ciphers -tls1_2] [::tls::ciphers tls1.2]
     } -result {missing {} unexpected {}}
 
-test CiphersAll-2.6 {TLS1.3} -constraints {tls1.3} -body {
+test Ciphers_By_Protocol-2.6 {TLS1.3} -constraints {tls1.3} -body {
 	lcompare [exec_get ":" ciphers -tls1_3] [::tls::ciphers tls1.3]
     } -result {missing {} unexpected {}}
 
 # Test cipher descriptions
 
 
-test CiphersDesc-3.1 {SSL2} -constraints {ssl2} -body {
+test Ciphers_With_Descriptions-3.1 {SSL2} -constraints {ssl2} -body {
 	lcompare [exec_get "\r\n" ciphers -ssl2 -v] [split [string trim [::tls::ciphers ssl2 1]] \n]
     } -result {missing {} unexpected {}}
 
-test CiphersDesc-3.2 {SSL3} -constraints {ssl3} -body {
+test Ciphers_With_Descriptions-3.2 {SSL3} -constraints {ssl3} -body {
 	lcompare [exec_get "\r\n" ciphers -ssl3 -v] [split [string trim [::tls::ciphers ssl3 1]] \n]
     } -result {missing {} unexpected {}}
 
-test CiphersDesc-3.3 {TLS1} -constraints {tls1} -body {
+test Ciphers_With_Descriptions-3.3 {TLS1.0} -constraints {tls1} -body {
 	lcompare [exec_get "\r\n" ciphers -tls1 -v] [split [string trim [::tls::ciphers tls1 1]] \n]
     } -result {missing {} unexpected {}}
 
-test CiphersDesc-3.4 {TLS1.1} -constraints {tls1.1} -body {
+test Ciphers_With_Descriptions-3.4 {TLS1.1} -constraints {tls1.1} -body {
 	lcompare [exec_get "\r\n" ciphers -tls1_1 -v] [split [string trim [::tls::ciphers tls1.1 1]] \n]
     } -result {missing {} unexpected {}}
 
-test CiphersDesc-3.5 {TLS1.2} -constraints {tls1.2} -body {
+test Ciphers_With_Descriptions-3.5 {TLS1.2} -constraints {tls1.2} -body {
 	lcompare [exec_get "\r\n" ciphers -tls1_2 -v] [split [string trim [::tls::ciphers tls1.2 1]] \n]
     } -result {missing {} unexpected {}}
 
-test CiphersDesc-3.6 {TLS1.3} -constraints {tls1.3} -body {
+test Ciphers_With_Descriptions-3.6 {TLS1.3} -constraints {tls1.3} -body {
 	lcompare [exec_get "\r\n" ciphers -tls1_3 -v] [split [string trim [::tls::ciphers tls1.3 1]] \n]
     } -result {missing {} unexpected {}}
 
 # Test protocol specific ciphers
 
 
-test CiphersSpecific-4.1 {SSL2} -constraints {ssl2} -body {
+test Ciphers_Protocol_Specific-4.1 {SSL2} -constraints {ssl2} -body {
 	lcompare [exec_get ":" ciphers -ssl2 -s] [::tls::ciphers ssl2 0 1]
     } -result {missing {} unexpected {}}
 
-test CiphersSpecific-4.2 {SSL3} -constraints {ssl3} -body {
+test Ciphers_Protocol_Specific-4.2 {SSL3} -constraints {ssl3} -body {
 	lcompare [exec_get ":" ciphers -ssl3 -s] [::tls::ciphers ssl3 0 1]
     } -result {missing {} unexpected {}}
 
-test CiphersSpecific-4.3 {TLS1} -constraints {tls1} -body {
+test Ciphers_Protocol_Specific-4.3 {TLS1.0} -constraints {tls1} -body {
 	lcompare [exec_get ":" ciphers -tls1 -s] [::tls::ciphers tls1 0 1]
     } -result {missing {} unexpected {}}
 
-test CiphersSpecific-4.4 {TLS1.1} -constraints {tls1.1} -body {
+test Ciphers_Protocol_Specific-4.4 {TLS1.1} -constraints {tls1.1} -body {
 	lcompare [exec_get ":" ciphers -tls1_1 -s] [::tls::ciphers tls1.1 0 1]
     } -result {missing {} unexpected {}}
 
-test CiphersSpecific-4.5 {TLS1.2} -constraints {tls1.2} -body {
+test Ciphers_Protocol_Specific-4.5 {TLS1.2} -constraints {tls1.2} -body {
 	lcompare [exec_get ":" ciphers -tls1_2 -s] [::tls::ciphers tls1.2 0 1]
     } -result {missing {} unexpected {}}
 
-test CiphersSpecific-4.6 {TLS1.3} -constraints {tls1.3} -body {
+test Ciphers_Protocol_Specific-4.6 {TLS1.3} -constraints {tls1.3} -body {
 	lcompare [exec_get ":" ciphers -tls1_3 -s] [::tls::ciphers tls1.3 0 1]
     } -result {missing {} unexpected {}}
 
 # Test version
 

Index: tests/make_test_files.tcl
==================================================================
--- tests/make_test_files.tcl
+++ tests/make_test_files.tcl
@@ -72,10 +72,11 @@
     set in [open $filename r]
     array set cases [list]
 
     # Open output test file
     set out [open [format %s.test [file rootname $filename]] w]
+    fconfigure $out -encoding utf-8 -translation {auto lf}
     array set cases [list]
 
     # Add setup commands to test file
     puts $out [format "# Auto generated test cases for %s" [file tail $filename]]
     #puts $out [format "# Auto generated test cases for %s created on %s" [file tail $filename] [clock format [clock seconds]]]

Index: win/makefile.vc
==================================================================
--- win/makefile.vc
+++ win/makefile.vc
@@ -1,22 +1,26 @@
 #------------------------------------------------------------- -*- makefile -*-
 #
-# Makefile for TclTLS extensions.
+# Makefile for TCL TLS extension
 #
 # Basic build, test and install
-#   nmake /f makefile.vc INSTALLDIR=c:\path\to\tcl
-#   nmake /f makefile.vc INSTALLDIR=c:\path\to\tcl test
-#   nmake /f makefile.vc INSTALLDIR=c:\path\to\tcl install
+#   nmake /f makefile.vc INSTALLDIR=c:\path\to\tcl TCLDIR=c:\path\to\tcl\sources
+#   nmake /f makefile.vc INSTALLDIR=c:\path\to\tcl TCLDIR=c:\path\to\tcl\sources test
+#   nmake /f makefile.vc INSTALLDIR=c:\path\to\tcl TCLDIR=c:\path\to\tcl\sources install
 #
 # For other build options (debug, static etc.),
 # See TIP 477 (https://core.tcl-lang.org/tips/doc/main/tip/477.md) for
 # detailed documentation.
 #
 # See the file "license.terms" for information on usage and redistribution
 # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 #
 #------------------------------------------------------------------------------
+
+#-------------------------------------------------------------------------
+# Project specific information
+#-------------------------------------------------------------------------
 
 # The name of the package
 PROJECT=tls
 
 !include "rules-ext.vc"
@@ -30,14 +34,14 @@
 	$(TMP_DIR)\tlsIO.obj \
 	$(TMP_DIR)\tlsX509.obj
 
 # Define any additional project include flags
 # SSL_INSTALL_FOLDER = with the OpenSSL installation folder following.
-PRJ_INCLUDES = -I"$(SSL_INSTALL_FOLDER)\include" -I"$(OPENSSL_INSTALL_DIR)\include"
+PRJ_INCLUDES = -I"$(SSL_INSTALL_FOLDER)\include" -I"$(OPENSSL_INSTALL_DIR)\include" -I"$(TMP_DIR)"
 
 # Define any additional compiler flags that might be required for the project
-PRJ_DEFINES = -D NO_SSL2 -D NO_SSL3 -D _CRT_SECURE_NO_WARNINGS
+PRJ_DEFINES = -D NO_SSL2 -D NO_SSL3 /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE /D__STDC_WANT_SECURE_LIB__=1
 
 #
 # SSL Libs:
 #    1. ${LIBCRYPTO}.dll
 #    2. ${LIBSSL}.dll
@@ -47,50 +51,59 @@
 # On *nix libcrypto.so.* and libssl.so.* (where suffix is a version indicator).
 #
 PRJ_LIBS = \
 	"$(SSL_INSTALL_FOLDER)\lib\libssl.lib" \
 	"$(SSL_INSTALL_FOLDER)\lib\libcrypto.lib" \
-	WS2_32.LIB GDI32.LIB ADVAPI32.LIB CRYPT32.LIB USER32.LIB
+	User32.Lib WS2_32.Lib Gdi32.Lib AdvAPI32.Lib Crypt32.Lib
 
-# Define the standard targets
+# Define the standard targets which calls rules.vc
 !include "targets.vc"
 
+#---------------------------------------------------------------------
 # Project specific targets
+#---------------------------------------------------------------------
 
-all: default-target
+all: setup default-target
 
 clean: default-clean
-	@if exist $(WIN_DIR)\tlsUuid.h del $(WIN_DIR)\tlsUuid.h
 
 realclean: default-hose
-	@if exist $(WIN_DIR)\tlsUuid.h del $(WIN_DIR)\tlsUuid.h
 
 # We must define a pkgindex target that will create a pkgIndex.tcl
 # file in the $(OUT_DIR) directory. We can just redirect to the
 # default-pkgindex target for our sample extension.
 pkgindex: default-pkgindex-tea
 
+# Manifest which defines fossil/git commit id for build-info command
 $(ROOT)\manifest.uuid:
-   copy $(WIN_DIR)\gitmanifest.in $(ROOT)\manifest.uuid
-   git rev-parse HEAD >>$(ROOT)\manifest.uuid
+    if not exist $(ROOT)\manifest.uuid (
+	copy $(WIN_DIR)\gitmanifest.in $(ROOT)\manifest.uuid
+	where git
+	if ERRORLEVEL 0 (
+	    git rev-parse HEAD >>$(ROOT)\manifest.uuid
+	) else (
+	    echo unknown >>$(ROOT)\manifest.uuid
+	)
+    )
 
-$(WIN_DIR)\tlsUuid.h:	$(ROOT)\manifest.uuid
-	copy $(WIN_DIR)\tlsUuid.h.in+$(ROOT)\manifest.uuid $(WIN_DIR)\tlsUuid.h
+$(TMP_DIR)\tlsUuid.h:	$(ROOT)\manifest.uuid
+	copy $(WIN_DIR)\tlsUuid.h.in+$(ROOT)\manifest.uuid $(TMP_DIR)\tlsUuid.h
+	echo: >>$(TMP_DIR)\tlsUuid.h
 
 
 # The default install target only installs binaries and scripts so add
 # an additional target for our documentation. Note this *adds* a target
 # since no commands are listed after it. The original targets for
 # install (from targets.vc) will remain.
-install: default-pkgindex-tea default-install default-install-docs-html
+install: pkgindex default-install default-install-docs-html
     if exist "$(SSL_INSTALL_FOLDER)\bin\libcrypto-*-x64.dll" (
         xcopy /c /y "$(SSL_INSTALL_FOLDER)\bin\libcrypto-*-x64.dll" "$(PRJ_INSTALL_DIR)"
     )
     if exist "$(SSL_INSTALL_FOLDER)\bin\libssl-*-x64.dll" (
         xcopy /c /y "$(SSL_INSTALL_FOLDER)\bin\libssl-*-x64.dll" "$(PRJ_INSTALL_DIR)"
     )
 
 # Explicit dependency rules
-$(GENERICDIR)\tls.c: $(WIN_DIR)\tlsUuid.h
+$(GENERICDIR)\tls.c: $(TMP_DIR)\tlsUuid.h
 
 # Test package
 test: default-test