Index: Makefile.in ================================================================== --- Makefile.in +++ Makefile.in @@ -22,10 +22,12 @@ mv @TCLEXT_BUILD@-@EXTENSION_TARGET@ @EXTENSION_TARGET@ # The shared object target shared-@EXTENSION_TARGET@: tls.o tlsBIO.o tlsIO.o tlsX509.o Makefile $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o shared-@EXTENSION_TARGET@ tls.o tlsBIO.o tlsIO.o tlsX509.o $(LIBS) + -@WEAKENSYMS@ shared-@EXTENSION_TARGET@ + -@REMOVESYMS@ shared-@EXTENSION_TARGET@ # The static target static-@EXTENSION_TARGET@: tls.o tlsBIO.o tlsIO.o tlsX509.o Makefile $(AR) rcu static-@EXTENSION_TARGET@ tls.o tlsBIO.o tlsIO.o tlsX509.o -$(RANLIB) static-@EXTENSION_TARGET@ Index: aclocal/tcltls_openssl.m4 ================================================================== --- aclocal/tcltls_openssl.m4 +++ aclocal/tcltls_openssl.m4 @@ -117,12 +117,12 @@ fi PKG_CONFIG_PATH="${PKG_CONFIG_PATH_SAVE}" if test "$TCLEXT_BUILD" = "static"; then dnl If we are doing a static build, save the linker flags for other programs to consume - rm -f tcltls.a.linkadd - AS_ECHO(["$TCLTLS_SSL_LIBS"]) > tcltls.a.linkadd + rm -f tcltls.${AREXT}.linkadd + AS_ECHO(["$TCLTLS_SSL_LIBS"]) > tcltls.${AREXT}.linkadd fi dnl If we have been asked to statically link to the SSL library, specifically tell the linker to do so if test "$TCLEXT_TLS_STATIC_SSL" = 'yes'; then dnl Don't bother doing this if we aren't actually doing the runtime linking Index: configure.ac ================================================================== --- configure.ac +++ configure.ac @@ -242,8 +242,15 @@ DC_SYNC_RPATH([no]) else DC_SYNC_RPATH([yes]) fi fi + +dnl Enable a stable ABI +DC_SETUP_STABLE_API([${srcdir}/tcltls.vers], tcltls.syms) +if test "$tcltls_debug" = 'true'; then + WEAKENSYMS=':' + REMOVESYMS=':' +fi dnl Produce output -AC_OUTPUT(Makefile pkgIndex.tcl) +AC_OUTPUT(Makefile pkgIndex.tcl tcltls.syms) ADDED tcltls.syms.in Index: tcltls.syms.in ================================================================== --- /dev/null +++ tcltls.syms.in @@ -0,0 +1,1 @@ +@SYMPREFIX@Tls_Init ADDED tcltls.vers Index: tcltls.vers ================================================================== --- /dev/null +++ tcltls.vers @@ -0,0 +1,6 @@ +{ + global: + Tls_Init; + local: + *; +};